login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A377512
a(n) = number of iterations of x -> 2 x - 3 to reach a nonprime, starting with prime(n).
5
4, 3, 2, 5, 3, 1, 4, 1, 2, 3, 2, 3, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 3, 2, 1, 3, 1, 4, 3, 1, 2, 1, 1, 1, 3, 1, 3, 1, 1, 2, 2, 2, 1, 1, 2, 3, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 1, 1, 7, 1, 1, 2, 1, 3, 2, 1, 2, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 1, 2, 1, 2
OFFSET
1,1
COMMENTS
See A377120 for a guide to related sequences.
EXAMPLE
prime(3) = 5 -> 7 -> 11 -> 19 -> 35 = 5*7, so a(1) = 4.
MATHEMATICA
Table[p = Prime[n]; c = 1; While[p = 2*p + 7; PrimeQ[p], c++]; c, {n, 200}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Nov 05 2024
STATUS
approved