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!)
A097445 Second occurrence where n# - p is prime for primes p = 3, 5, ... 0

%I #8 Oct 08 2022 00:02:07

%S 19,197,2293,30011,510463,9699653,223092809,6469693163,200560490051,

%T 7420738134703,304250263527157,13082761331669881,614889782588491313,

%U 32589158477190044641,1922760350154212638961,117288381359406970983047

%N Second occurrence where n# - p is prime for primes p = 3, 5, ...

%C Care has to be taken to start with a large enough n to be sure terms are not missed. This was for n=100. This and A097444 were difficult to obtain using PARI.

%F n# is n primorial = product of primes 2*3*5*...*p <= n.

%e 3# = 2*3 = 6. 6 - 3 = 3 (first prime), 6 - 5 = 1, not prime, thus 3# - p is omitted.

%e 5# = 2*3*5 = 30. 30 - 7 = 23 (first prime), 30 - 11 = 19 (second prime).

%o (PARI) primorm2(n) = { pr=1; for(x=1,n, f=1; pr*=prime(x); for(m=1,n, y=pr-prime(m); if(isprime(y),f=1; for(m=m+1,n, y=pr-prime(m); if(isprime(y),print1(y",");f=0;break,f=1)); ); if(f==0,break) ) ) }

%K nonn

%O 2,1

%A _Cino Hilliard_, Aug 23 2004

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 April 25 09:28 EDT 2024. Contains 371967 sequences. (Running on oeis4.)