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

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A346918 a(n) is 1 plus the number of iterations of the map prime(n)# + k -> prime(n)# + lpf(prime(n)# + k) required to reach a prime, starting at k=1, where prime(n)# is the n-th primorial and lpf() is the least prime factor, or 0 if no prime is ever reached. 0
1, 1, 1, 1, 1, 2, 2, 9, 9, 2, 1, 5, 0, 0, 5, 2, 8, 4, 11, 0, 0, 5, 4, 11, 2, 11, 19, 3, 11, 3, 20, 7, 6, 6, 7, 3, 4, 16, 20, 4, 4, 4, 14, 17, 0, 26, 4, 2, 17 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,6

COMMENTS

The algorithmic process goes on like this.

Given a primorial prime(n)#.

1) Add 1 to this primorial.

2) If this number is prime, we are done.

3) If not, we look at the prime factors of the number prime(n)# + 1.

4) Now we add the smallest prime factor p1 of prime(n)# + 1 to prime(n)#.

5) If prime(n)# + p1 is prime, then we are done.

6) If not we add the smallest prime factor p2 of prime(n)# + p1 to prime(n)#.

7) If prime(n)# + p2 is prime, then we are done. If not we repeat this process until we find a prime.

8) In the case that we will never find a prime through this proces, we set the value to 0.

There are numbers n such that a(n)=0. Some known values where this happens are n = 13, 14, 20, 21, 45.

LINKS

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

FORMULA

Open question: Are there infinitely many n such that a(n)=0?

EXAMPLE

The 6th primorial is 2*3*5*7*11*13. Adding 1 gives us prime(6)# + 1 = 59*509, prime(6)# + 59 is prime. So a(6)=2.

a(14)=0 because the least prime factors that occur in the process form an infinite loop:

  prime(14)# +       1 =     167 * 78339888213593

  prime(14)# +     167 =      89 * 487 * 301842542779

  prime(14)# +      89 = 1049537 * 12465269287

  prime(14)# + 1049537 =      53 * 246844553447539

  prime(14)# +      53 =   12911 * 1013303487853

  prime(14)# +   12911 = 3393197 * 3855585553

  prime(14)# + 3393197 =      53 * 27031 * 9131906089

  ...

MATHEMATICA

a[n_] := Module[{primorial = Product[Prime[i], {i, 1, n}], ps = {}, sum, p, count = 1}, sum = primorial + 1; While[! PrimeQ[sum], p = FactorInteger[sum][[1, 1]]; If[MemberQ[ps, p], count = 0; Break[]]; AppendTo[ps, p]; sum = primorial + p; count++]; count]; Array[a, 30] (* Amiram Eldar, Aug 20 2021 *)

PROG

(PARI)

primorial=1 ; for(n=1, 35, primorial=primorial*prime(n) ; iterations=1 ; addtoprimorial=1 ; addtoprimorialvector=[]; done=0 ; while(!done, if(isprime(primorial + addtoprimorial) , print1(iterations, ", ") ; done=1 , iterations++ ; addtoprimorial=factor(primorial + addtoprimorial)[1, 1] ; if(vecsearch(addtoprimorialvector, addtoprimorial), print1(0, ", "); done=1) ; addtoprimorialvector=vecsort(concat(addtoprimorialvector, addtoprimorial)) )))

CROSSREFS

Cf. A002110, A020639.

Sequence in context: A021439 A198423 A229116 * A203904 A104681 A056856

Adjacent sequences:  A346915 A346916 A346917 * A346919 A346920 A346921

KEYWORD

nonn,more,hard

AUTHOR

Kim Hollesen, Aug 07 2021

EXTENSIONS

a(13)-a(49) from Jinyuan Wang, Aug 20 2021

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 December 7 20:40 EST 2021. Contains 349589 sequences. (Running on oeis4.)