login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A358166
a(1) = 13; for n > 1, if a(n-1) is even, then a(n) = a(n-1)/2; otherwise, a(n) = a(n-1) + prime(a(n-1)).
1
13, 54, 27, 130, 65, 378, 189, 1318, 659, 5592, 2796, 1398, 699, 5972, 2986, 1493, 13996, 6998, 3499, 36102, 18051, 218932, 109466, 54733, 730334, 365167, 5622764, 2811382, 1405691, 23685544, 11842772, 5921386, 2960693, 52246474, 26123237, 521463688, 260731844, 130365922, 65182961, 1364229390
OFFSET
1,1
COMMENTS
Does this sequence become cyclic? All the sequences defined the same as this one but with 1 <= a(1) <= 12 are known to become cyclic.
a(81) = 1977693361846020549, so calculating a(82) will require calculating the 1977693361846020549th prime.
EXAMPLE
a(1) = 13 is odd, so a(2) = 13 + prime(13) = 13 + 41 = 54.
a(2) = 54 is even, so a(3) = a(2)/2 = 54/2 = 27.
a(3) = 27 is odd, so a(4) = 27 + prime(27) = 27 + 103 = 130, etc.
MATHEMATICA
NestList[If[EvenQ[#], #/2, # + Prime[#]] &, 13, 40]
PROG
(PARI) lista(nn) = my(va = vector(nn)); va[1] = 13; for (n=2, nn, if (va[n-1] % 2, va[n] = va[n-1] + prime(va[n-1]), va[n] = va[n-1]/2); ); va; \\ Michel Marcus, Nov 12 2022
CROSSREFS
KEYWORD
nonn,look,hard
AUTHOR
Sander G. Huisman, Nov 01 2022
STATUS
approved