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!)
A060270 Distance of n-th primorial from previous prime. 7
1, 1, 11, 1, 1, 29, 23, 43, 41, 73, 59, 1, 89, 67, 73, 107, 89, 101, 127, 97, 83, 89, 1, 251, 131, 113, 151, 263, 251, 223, 179, 389, 281, 151, 197, 173, 239, 233, 191, 223, 223, 293, 593, 293, 457, 227, 311, 373, 257, 307, 313, 607, 347, 317, 307, 677, 467, 317 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,3
LINKS
FORMULA
a(n)=1 for n=2, 3, 5, 6, 13, 24, 66, 68, 167, ... (A057704); a(n)=A055211(n) otherwise. - Jeppe Stig Nielsen, Oct 31 2003
EXAMPLE
Before 7th primorial 510481 is the largest prime. Its distance from 510510 is a(7)=29.
MAPLE
[seq(product(ithprime(j), j=1..n)-prevprime(product(ithprime(j), j=1..n)), n=2..50)];
MATHEMATICA
Map[# - NextPrime[#, -1] &, Rest@ FoldList[Times, Prime@ Range[59]]] (* Michael De Vlieger, Aug 10 2023 *)
PROG
(PARI) a(n) = my(P=vecprod(primes(n))); P-precprime(P-1); \\ Michel Marcus, Aug 11 2023
CROSSREFS
Sequence in context: A143685 A168647 A202767 * A202678 A202971 A202675
KEYWORD
nonn
AUTHOR
Labos Elemer, Mar 23 2001
EXTENSIONS
More terms from Jeppe Stig Nielsen, Oct 31 2003
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 April 19 15:11 EDT 2024. Contains 371794 sequences. (Running on oeis4.)