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!)
A137330 a(n) = primorial(k) - prime(n) where k is the smallest number for which prime(n) <= primorial(k). 1
0, 3, 1, 23, 19, 17, 13, 11, 7, 1, 179, 173, 169, 167, 163, 157, 151, 149, 143, 139, 137, 131, 127, 121, 113, 109, 107, 103, 101, 97, 83, 79, 73, 71, 61, 59, 53, 47, 43, 37, 31, 29, 19, 17, 13, 11, 2099, 2087, 2083, 2081, 2077, 2071, 2069, 2059, 2053, 2047, 2041 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Does each prime number appear in this sequence at least once?
Answer to previous: Neither 2 nor 5 will appear, as no prime > 5 can end in a 5 or be even. - Bill McEachen, Dec 05 2020
LINKS
EXAMPLE
a(6) = primorial(3) - prime(6) = 30-13 = 17.
MATHEMATICA
Block[{a = {}, P = 2, j = 1}, Do[AppendTo[a, If[# > P, j++; P *= Prime[j], P] - #] &@ Prime[n], {n, 57}]; a] (* Michael De Vlieger, Dec 07 2020 *)
PROG
(PARI) a(n) = {my(pp=2, k=1, p=prime(n)); while (pp < p, k++; pp*=prime(k)); pp-p; } \\ Michel Marcus, Dec 06 2020
CROSSREFS
Sequence in context: A027477 A260780 A243769 * A270277 A271605 A270220
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 08:28 EDT 2024. Contains 371782 sequences. (Running on oeis4.)