login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A298904 a(n) is the number of distinct primes produced by starting with the n-th prime p and repeatedly looking at all the prime factors of 2p-1, and then performing the same process (double, subtract 1, find all prime factors) with those primes; a(n) = -1 if this produces infinitely many primes. 0
3, 2, 2, 4, 5, 3, 6, 6, 3, 6, 7, 6, 3, 7, 8, 5, 4, 6, 9, 9, 6, 5, 6, 5, 7, 10, 4, 10, 8, 3, 7, 7, 5, 9, 6, 8, 4, 4, 7, 4, 7, 7, 8, 6, 8, 8, 8, 6, 9, 8, 8, 6, 8, 8, 7, 5, 8, 11, 8, 7, 4, 4, 6, 4, 3, 9, 16, 10, 6, 8, 9, 7, 6, 7, 10, 7, 9, 7, 6, 12, 8, 7, 6, 5, 9, 5, 5, 7, 7, 7, 5, 10, 10, 9, 8, 10, 4, 7, 10, 10 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Inspired by and analogous to A305382.

Just as for A305382, it is conjectured that a(n) is finite for all n.

All primes less than prime(125000000) have been checked.

First occurrence of k=2,3,4,...: 2, 1, 4, 5, 7, 11, 15, 19, 26, 58, 80, 125, 169, 121, 67, 525, 808, 938, 1799, 1926, 2760, 10658, 4661, 14433, 47463, 22304, 11878, 32103, 101513, 146448, 249616, 266149, 2580007, 2060718, 2883547, 11483667, 8388622, 19786313, ..., .

LINKS

Table of n, a(n) for n=1..100.

EXAMPLE

a(5) = 5 because the 5th prime, 11 -> 21 -> 3 & 7 -> 5 & 13 -> 9 & 25 -> 3 & 5. Thus there are 5 primes in order of appearance {5, 11, 3, 7, 13}.

MATHEMATICA

g[lst_List] := Union@ Join[lst, First@# & /@ Flatten[ FactorInteger[2lst -1], 1]]; f[n_] := Length@ NestWhile[g@# &, {Prime@n}, UnsameQ, All]; Table[ f[n], {n, 100}]

PROG

(PARI) a(n) = {va = [prime(n)]; done = 0; while (! done, done = 1; for (k=1, #va, f = factor(2*va[k]-1); for (j=1, #f~, if (! vecsearch(va, f[j, 1]), va = Set(concat(va, f[j, 1])); done = 0); ); ); ); #select(x->isprime(x), va); } \\ Michel Marcus, Jul 03 2018

CROSSREFS

Cf. A305382.

Sequence in context: A235354 A058743 A117970 * A308194 A245572 A344985

Adjacent sequences:  A298901 A298902 A298903 * A298905 A298906 A298907

KEYWORD

nonn

AUTHOR

Robert G. Wilson v, Jun 18 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 25 03:53 EDT 2021. Contains 346283 sequences. (Running on oeis4.)