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!)
A100380 a(n) = least k such that prime(n) + A002110(k) is prime. 3
0, 1, 1, 2, 1, 2, 1, 4, 2, 1, 2, 2, 1, 3, 2, 2, 1, 2, 2, 1, 2, 3, 2, 5, 2, 1, 2, 1, 3, 5, 3, 2, 1, 4, 1, 2, 2, 3, 2, 2, 1, 3, 1, 2, 1, 3, 3, 2, 1, 4, 2, 1, 3, 2, 2, 2, 1, 2, 2, 1, 3, 4, 2, 1, 4, 3, 2, 3, 1, 3, 2, 3, 2, 2, 3, 2, 3, 4, 3, 3, 1, 4, 1, 2, 5, 2, 3, 2, 1, 4, 4, 3, 5, 3, 4, 2, 4, 1, 4, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
Conjecture: every prime number can be written as +- p(n) -+ p(k)# where p(i)=i-th prime, p(i)#=i-th primorial.
The sequence grows remarkably slowly. The largest number occurring within the first 50000 elements is 90. - Stefan Steinerberger, Apr 10 2006
a(1) = 0 is the minimum value of a(n). It is also unrepeated in this sequence. - Altug Alkan, Dec 02 2015
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000 (corrected by Ray Chandler, Jan 19 2019)
EXAMPLE
p(8)=19;
19 + 2 = 21 = 3*7,
19 + 6 = 25 = 5*5, and
19 + 30 = 49 = 7*7, but
19 + 210 = 229, which is prime; 210=p(4)#, so a(8)=4.
MAPLE
primorial:= proc(n) option remember: ithprime(n)*procname(n-1) end proc:
primorial(0):= 1:
f:= proc(n) local k, p;
p:= ithprime(n);
for k from 0 do if isprime(p+primorial(k)) then return k fi od:
end proc:
map(f, [$1..100]); # Robert Israel, Aug 27 2015
MATHEMATICA
Table[k := 0; While[Not[PrimeQ[Prime[n]+Product[Prime[i], {i, 1, k}]]], k++ ]; k, {n, 1, 100}] (* Stefan Steinerberger, Apr 10 2006 *)
PROG
(PARI) primo(n) = prod(i=1, n, prime(i));
a(n) = {k=0; while(!isprime(prime(n)+primo(k)), k++); k; } \\ Michel Marcus, Aug 27 2015
CROSSREFS
Sequence in context: A360738 A321368 A338508 * A205403 A080825 A229724
KEYWORD
easy,nonn
AUTHOR
Pierre CAMI, Dec 30 2004
EXTENSIONS
More terms from Stefan Steinerberger, Apr 10 2006
a(1) = 0 added and name edited by Altug Alkan, Dec 02 2015
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:34 EDT 2024. Contains 371794 sequences. (Running on oeis4.)