OFFSET
1,4
COMMENTS
LINKS
Neil Fernandez, An order of primeness, F(p)
FORMULA
a(n) = 0 iff n is a member of A007097.
EXAMPLE
a(10) is 3 because the tenth prime is 29 -> 10 -> 4 -> 2 and 2 is A007097(1).
MATHEMATICA
f[n_] := Length@ NestWhileList[PrimePi, n, ! MemberQ[{1, 2, 3, 5, 11, 31, 127, 709, 5381, 52711, 648391, 9737333, 174440041}, #] &] - 1; Array[f, 105]
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Oct 27 2018
STATUS
approved