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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A137328 a(n) = prime(n) - primorial(k), where k is the greatest number for which primorial(k) <= prime(n). 1
 0, 1, 3, 1, 5, 7, 11, 13, 17, 23, 1, 7, 11, 13, 17, 23, 29, 31, 37, 41, 43, 49, 53, 59, 67, 71, 73, 77, 79, 83, 97, 101, 107, 109, 119, 121, 127, 133, 137, 143, 149, 151, 161, 163, 167, 169, 1, 13, 17, 19, 23, 29, 31, 41, 47, 53, 59, 61, 67, 71, 73, 83, 97, 101, 103, 107, 121 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS Conjecture: Each prime number appears in this sequence at least once. Is there any general asymptotic formula for the appearance of prime(n) in this sequence? LINKS Michel Marcus, Table of n, a(n) for n = 1..10000 EXAMPLE a(6) = prime(6) - primorial(2) = 13 - 6 = 7. PROG (PARI) a(n) = {my(p=prime(n), q=1, P=1); until (P > p, q = nextprime(q+1); P *= q; ); p - P/q; } \\ Michel Marcus, Mar 14 2022 (Python) from sympy import nextprime from itertools import islice def agen(): # generator of terms pn, primk, pk, pkplus = 2, 2, 2, 3 while True: while primk * pkplus <= pn: primk, pk, pkplus = primk*pkplus, pkplus, nextprime(pkplus) yield pn - primk pn = nextprime(pn) print(list(islice(agen(), 67))) # Michael S. Branicky, Mar 14 2022 CROSSREFS Cf. A000040, A002110, A136437. Sequence in context: A354576 A049764 A136437 * A140991 A302191 A261712 Adjacent sequences: A137325 A137326 A137327 * A137329 A137330 A137331 KEYWORD easy,nonn AUTHOR Ctibor O. Zizka, Apr 07 2008 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.

Last modified July 23 06:59 EDT 2024. Contains 374544 sequences. (Running on oeis4.)