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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A037102 Trajectory of 3 under map n->9n+1 if n odd, n->n/2 if n even. 0

%I

%S 3,28,14,7,64,32,16,8,4,2,1,10,5,46,23,208,104,52,26,13,118,59,532,

%T 266,133,1198,599,5392,2696,1348,674,337,3034,1517,13654,6827,61444,

%U 30722,15361,138250,69125,622126,311063,2799568,1399784,699892,349946,174973

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

%t NestList[If[EvenQ[#],#/2,9#+1]&,3,50] (* _Harvey P. Dale_, Sep 06 2022 *)

%o (Python)

%o from itertools import accumulate

%o def f(n, _): return 9*n+1 if n%2 == 1 else n//2

%o def aupton(terms): return list(accumulate([3]*terms, f))

%o print(aupton(48)) # _Michael S. Branicky_, Mar 28 2021

%K nonn

%O 0,1

%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.

Last modified March 31 07:39 EDT 2023. Contains 361645 sequences. (Running on oeis4.)