OFFSET

1,2

COMMENTS

If x is in the sequence, then the digit reversal of x also belongs to the sequence.

If we consider the numbers that under this transform produce a multiple of the number itself, for n <= 10^8 we should add only 153363. Digit 1 is in position 6, 3 in position 1, 3 and 4, 5 in position 5, 6 in position 2. Finally, 613452 / 153363 = 4.

EXAMPLE

In 2413, digit 1 is in position 2, 2 in position 4, 3 in position 1, 4 in position 3. Therefore concat(2,4,1,3) = 2413 that is a fixed point.

In 56218734 digit 1 is in position 5, 2 in position 6, 3 in position 2, 4 in position 1, 5 in position 8, 6 in position 7, 7 in position 3, 8 in position 4. Therefore concat(5,6,2,1,8,7,3,4) = 56218734 that is a fixed point.

MAPLE

with(numtheory):P:=proc(q) local a, b, j, k, n;

for n from 1 to q do a:=convert(n, base, 10); b:=0;

for k from 0 to 9 do for j from 1 to nops(a) do

if a[j]=k then b:=b*10+j; fi; od;

od; if b=n then print(n); fi; od; end: P(10^9);

CROSSREFS

KEYWORD

nonn,base,fini

AUTHOR

Paolo P. Lava, Jul 24 2015

STATUS

approved