login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A067849 a(n) = max{k: f(n),...,f^k(n) are prime}, where f(m) = 2m+1 and f^k denotes composition of f with itself k times. 3
2, 4, 1, 0, 3, 1, 0, 1, 1, 0, 2, 0, 0, 2, 1, 0, 0, 1, 0, 3, 1, 0, 1, 0, 0, 2, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 2, 0, 0, 6, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 2, 0, 0, 5, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
From Glen Whitney, Sep 14 2022: (Start)
If a(n) > 3 and n > 5, then the final digit of n is 4 or 9.
a(n) > 0 if and only if n appears in A005097.
More generally, a(n) > m if and only if all of 2^k(n+1) - 1 for 0 <= k <= m are in A005097.
Creating a tile labeled by a multiple of p for a prime p with a relatively large value of a(p) is considered valuable in the game DIVE (see links). (End)
LINKS
Number-theoretic puzzle game DIVE
EXAMPLE
f(2) = 5, f(f(2)) = 11, f(f(f(2))) = 23, f(f(f(f(2)))) = 47, all prime, but f^5(2) = 95 is not prime, so a(2) = 4.
MATHEMATICA
f[n_] := Module[{a = 2n + 1, i = 0}, While[PrimeQ[a], i++; a = 2a + 1]; i]; Table[f[i], {i, 1, 60}]
PROG
(PARI) a(n) = {my(nb = 0, newn); while (isprime(newn=2*n+1), nb++; n = newn); nb; } \\ Michel Marcus, Nov 10 2018
CROSSREFS
Sequence in context: A354499 A070678 A124091 * A164268 A294390 A152433
KEYWORD
nonn
AUTHOR
Joseph L. Pe, Feb 14 2002
EXTENSIONS
More terms from Michel Marcus, Nov 10 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 17 20:28 EDT 2024. Contains 374377 sequences. (Running on oeis4.)