OFFSET
0,3
COMMENTS
a(0)=0, meaning the smallest m such that if the transformation is never applied (or is applied zero times) what you get is m itself.
For any pair of consecutive digits 'L' and 'R', the digit on the left is replaced by (L+R) mod 10. The least significant digit is replaced by the sum mod 10 of itself and the most significant digit. If we change the rule (digit on the right replaced by (L+R) mod 10 and most significant digit replaced by sum mod 10 of itself and the least significant digit) we get a similar sequence where only a(2)=2486 is different.
If through the transform leading zeros are created they are kept for the next calculation (see example for n = 3, 6, 12 and 15).
a(n) is the smallest k whose first return to itself occurs on the n-th iteration. For instance, if the iterations were continued, 22 would return to itself on iterations 4, 8, 12, etc., but 101 (not 22) is a(12).
In the file "Other possible entries" are listed some possible candidates. Other intermediate steps and numbers could be missing and the listed numbers may not be the minima.
LINKS
Paolo P. Lava, Other possible entries
EXAMPLE
n=2: 2684 -> 8426 -> 2684.
n=3: 505 -> 550 -> 055 -> 505.
n=4: 22 -> 44 -> 88 -> 66 -> 22.
n=6: 109 -> 190 -> 091 -> 901 -> 910 -> 019 -> 109.
n=12: 101 -> 112 -> 233 -> 565 -> 110 -> 211 -> 323 -> 556 -> 011 -> 121 -> 332 -> 655 -> 101.
n=15: 50005 -> 50050 -> 50555 -> 55000 -> 05005 -> 55055 -> 05500 -> 50500 -> 55505 -> 00550 -> 05050 -> 55550 -> 00055 -> 00505 -> 05555 -> 50005.
Etc.
MAPLE
# Maple program lists {step, least number} when found (not in order).
P:=proc(q) local a, b, c, d, j, k, n, ok, v;
v:=array(1..5000); for k from 1 to 5000 do v[k]:=0; od;
for n from 10 to q do a:=[]; b:=n; while b>0 do a:=[b mod 10, op(a)];
b:=trunc(b/10); od; b:=0; c:=a; ok:=0;
for k from 1 to 10^nops(a) do b:=b+1; d:=(c[nops(c)]+c[1]) mod 10;
for j from 1 to nops(c)-1 do c[j]:=(c[j]+c[j+1]) mod 10; od; c[nops(c)]:=d;
if a=c then ok:=1; break; fi; od; if ok=1 then if v[b]=0 then v[b]:=n;
print(n); fi; fi; od; end: P(10^10);
MATHEMATICA
g[n_] := Block[{e = 1 + Floor@ Log10@ n, id = Reverse@ IntegerDigits@ n}, PrependTo[id, id[[-1]]]; Sum[10^(k - 1)*Mod[id[[k]] + id[[k + 1]], 10], {k, e}]]; f[n_] := Block[{lst = NestWhileList[ g@# &, n, UnsameQ || ## != 0, All]}, If[ lst[[-1]] == n, Length@ lst - 1, 0]];
CROSSREFS
KEYWORD
sign,base,more
AUTHOR
Paolo P. Lava and Robert G. Wilson v, Jun 17 2014
STATUS
approved