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!)
A033968 Trajectory of 1 under map n->23n+1 if n odd, n->n/2 if n even 1

%I #8 Sep 06 2021 15:31:01

%S 1,24,12,6,3,70,35,806,403,9270,4635,106606,53303,1225970,612985,

%T 14098656,7049328,3524664,1762332,881166,440583,10133410,5066705,

%U 116534216,58267108,29133554,14566777

%N Trajectory of 1 under map n->23n+1 if n odd, n->n/2 if n even

%p N:= 100: # to get a(0) to a(N)

%p A[0]:= 1:

%p for n from 1 to N do

%p if A[n-1]::even then A[n]:= A[n-1]/2

%p else A[n]:= 23*A[n-1]+1

%p fi

%p od:

%p seq(A[i],i=0..N); # _Robert Israel_, Nov 21 2014

%t NestList[If[OddQ[#],23#+1,#/2]&,1,30] (* _Harvey P. Dale_, Sep 06 2021 *)

%K nonn

%O 0,2

%A _N. J. A. Sloane_.

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 April 25 09:49 EDT 2024. Contains 371967 sequences. (Running on oeis4.)