login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A243993 Consider a decimal number of k >= 2 digits m = d_(k)*10^(k-1) + d_(k-1)*10^(k-2) + ... + d_(2)*10 + d_(1). a(n) is the least number m such that the n-th iteration of the transform T(m) -> (d_(k) + d_(k-1) mod 10)*10^(k-1) + (d_(k-1) + d_(k-2) mod 10)*10^(k-2) + ... + (d_(2) + d_(1) mod 10)*10 + (d_(1) + d(k) mod 10) returns m, or -1 if no such number exists. 8
0, -1, 2684, 505, 22, -1, 109, 5000005, -1, -1, -1, -1, 101, -1, -1, 50005, -1, -1, -1, -1, 20000, -1, -1, -1, 100012, -1, -1, -1, 4999449, -1, -1, 5000000000000000000000000000005, -1 (list; graph; refs; listen; history; text; internal format)
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
Cf. A243994.
Sequence in context: A252202 A236594 A217335 * A157613 A233899 A350184
KEYWORD
sign,base,more
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 18 12:17 EDT 2024. Contains 374378 sequences. (Running on oeis4.)