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”).

A377510
a(n) = number of iterations of x -> 2 x + 5 to reach a nonprime, starting with prime(n).
5
1, 2, 1, 3, 1, 6, 1, 2, 1, 1, 5, 4, 1, 1, 1, 1, 1, 2, 4, 1, 4, 3, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 3, 1, 3, 1, 2, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 4, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1
OFFSET
1,2
COMMENTS
See A377120 for a guide to related sequences.
EXAMPLE
prime(6) = 13 -> 31 -> 67 -> 139 -> 283 -> 571 -> 1147 = 31*37, so a(6) = 6.
MATHEMATICA
Table[p = Prime[n]; c = 1; While[p = 2*p + 5; PrimeQ[p], c++]; c, {n, 200}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Oct 31 2024
STATUS
approved