- #1

- 3

- 0

I figured out the pattern -- it is a simple digit manipulation

Input --> Encoded Output

-------- ----------------------

271678 --> 01303032373136373875

261268 --> 01303032363132363875

220091 --> 01303032323030393175

202995 --> 01303032303239393575

15020802 --> 01313530323038303275

269154 --> 01303032363931353475

Output = 013 + D1 + 3 + D2 + 3 + D3 + 3 + D4 + 3 + D5 + 3 + D6 + 3 + D7 + 3 + D8 + 75

(the above is "string" append operation ... not arithmetic addition)

where D1 through D8 are digits in the input number (padded with leading zeroes to make it 8 digits)

Can you help me find a simple math operation that will do this input to output transformation?

I can do it using Remainder/Modulo operations but it will be very tedious.

I can see the problem as this:

Output, y = 01303030303030303075 + f(x)*100

(arithmetic addition here)

Where the function f(x) "explodes" the input number x as in the example below ...

f(00123456) = 000010203040506

Do we have an elegant definition for f(x)?

Thanks in advance!