|
|
A037102
|
|
Trajectory of 3 under map n->9n+1 if n odd, n->n/2 if n even.
|
|
0
|
|
|
3, 28, 14, 7, 64, 32, 16, 8, 4, 2, 1, 10, 5, 46, 23, 208, 104, 52, 26, 13, 118, 59, 532, 266, 133, 1198, 599, 5392, 2696, 1348, 674, 337, 3034, 1517, 13654, 6827, 61444, 30722, 15361, 138250, 69125, 622126, 311063, 2799568, 1399784, 699892, 349946, 174973
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
LINKS
|
|
|
MATHEMATICA
|
NestList[If[EvenQ[#], #/2, 9#+1]&, 3, 50] (* Harvey P. Dale, Sep 06 2022 *)
|
|
PROG
|
(Python)
from itertools import accumulate
def f(n, _): return 9*n+1 if n%2 == 1 else n//2
def aupton(terms): return list(accumulate([3]*terms, f))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|