The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A230299 Define a sequence b_s by b_s(1)=s, b_s(k+1)=b_s(k)+(sum of digits of b_s(k)); a(n) is the number of steps needed for b_n to reach a term in one of b_0, b_1, b_3 or b_9, or a(n) = -1 if b_n never joins one of these four sequences. 2

%I #19 Jan 10 2018 11:31:19

%S 0,0,0,0,0,52,0,11,0,0,51,50,0,49,10,0,0,48,0,9,50,0,49,0,0,47,48,0,0,

%T 8,0,49,46,0,47,48,0,45,0,0,7,46,7,47,6,0,45,44,6,0,46,0,5,5,0,45,44,

%U 0,43,4,5,4,0,0,4,44,4,43,3,0,0,42,0,3,3,4,43,0

%N Define a sequence b_s by b_s(1)=s, b_s(k+1)=b_s(k)+(sum of digits of b_s(k)); a(n) is the number of steps needed for b_n to reach a term in one of b_0, b_1, b_3 or b_9, or a(n) = -1 if b_n never joins one of these four sequences.

%C We conjecture that a(n) is never -1.

%H Lars Blomberg, <a href="/A230299/b230299.txt">Table of n, a(n) for n = 0..10000</a>

%H <a href="/index/Coi#Colombian">Index entries for Colombian or self numbers and related sequences</a>

%p read transforms; # to get digsum

%p M:=2000;

%p # f(s) returns the sequence k->k+digsum(k) starting at s

%p f:=proc(s) global M; option remember; local n,k,s1;

%p s1:=[s]; k:=s;

%p for n from 1 to M do k:=k+digsum(k);

%p s1:=[op(s1),k]; od: end;

%p # g(s) returns (x,p), where x = first number in common between

%p # f(s) and one of f(1), f(3), f(9) and p is the position where it occurred.

%p # If f(s) and all of f(1), f(3), f(9) are disjoint for M terms, returns (-1,-1)

%p S1:=convert(f(1),set):

%p S3:=convert(f(3),set):

%p S9:=convert(f(9),set):

%p g:=proc(s) global f,S1,S3,S9; local t1,p,T0,T1,T2;

%p T0:=f(s):

%p T1:=convert(T0,set);

%p if ((s mod 9) = 3) or ((s mod 9) = 6) then T2:= T1 intersect S3; t1:=min(T2); if (t1 = infinity) then RETURN(-1,-1); else member(t1,T0,'p'); RETURN(t1,p-1); fi;

%p elif ((s mod 9) = 0) then T2:= T1 intersect S9; t1:=min(T2); if (t1 = infinity) then RETURN(-1,-1); else member(t1,T0,'p'); RETURN(t1,p-1); fi;

%p else T2:= T1 intersect S1; t1:=min(T2); if (t1 = infinity) then RETURN(-1,-1); else member(t1,T0,'p'); RETURN(t1,p-1); fi;

%p fi;

%p end;

%p [seq(g(n)[2],n=1..45)];

%Y Cf. A230107, A062028, A004207, A016052, A007618, A006507, A016096.

%K nonn,base,look

%O 0,6

%A _N. J. A. Sloane_ and _Reinhard Zumkeller_, Oct 21 2013

%E Terms a(46) and beyond from _Lars Blomberg_, Jan 10 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 June 1 04:03 EDT 2024. Contains 373010 sequences. (Running on oeis4.)