login

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

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