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!)
A305669 Take the sum of the digits of a number, put it at the left side and delete the same number of digits at the right side. Repeat the process. Sequence lists numbers that reach themselves after some steps. 0

%I #11 Jun 28 2018 21:44:11

%S 0,1,2,3,4,5,6,7,8,9,11,13,14,17,21,32,41,51,53,54,65,81,85,95,98,101,

%T 108,109,116,171,179,210,321,632,811,910,917,1013,1071,1112,1113,1114,

%U 1116,1271,1291,1312,1313,1315,1316,1323,1375,1381,1415,1516,1517,1585

%N Take the sum of the digits of a number, put it at the left side and delete the same number of digits at the right side. Repeat the process. Sequence lists numbers that reach themselves after some steps.

%C Fixed points of the process (numbers that reach themselves in a single step) are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1818, 17171, 272727, 1313131, 2626262, 3939393, 12121212, 24242424, 36363636, 48484848, etc.

%C The number of steps to return to the original number or to enter another cycle depends on the number of digits. Here below all possible steps against the number of digits from 1 to 8:

%C Digits Steps

%C 1 1

%C 2 3, 12

%C 3 3, 9

%C 4 1, 3, 10, 31

%C 5 1, 9

%C 6 1, 4, 13, 21, 39

%C 7 1, 2, 4, 5, 6, 10, 12, 20, 23, 30, 60

%C 8 1, 3, 26, 78

%p P:=proc(q) local a,b,c,d,k,n,x;

%p for n from 1 to q do a:=convert(n,base,10); d:=a; x:=0;

%p while x<10^(ilog10(n)+1) do x:=x+1; b:=convert(a,`+`);

%p c:=ilog10(b)+1; b:=convert(b,base,10);

%p for k from 1 to nops(a)-c do a[k]:=a[k+c]; od;

%p for k from 1 to c do a[nops(a)-c+k]:=b[k]; od;

%p if a=d then print(n); break; fi; od; od; end: P(10^6);

%Y Cf. A007953.

%K nonn,easy,base

%O 0,3

%A _Paolo P. Lava_, Jun 19 2018

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 March 2 21:56 EST 2024. Contains 370498 sequences. (Running on oeis4.)