login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A068374
Primes p such that positive values of p - A002110(k) are all primes for k > 0.
2
2, 5, 13, 19, 43, 73, 103, 109, 229, 313, 883, 1093, 1489, 1699, 1789, 2143, 3463, 3853, 5653, 15649, 21523, 43789, 47743, 50053, 51199, 59473, 86293, 88819, 93493, 101533, 176053, 197299, 205663, 235009, 257503, 296509, 325543, 338413, 347989
OFFSET
1,1
LINKS
MAPLE
primo:= proc(k) option remember; ithprime(k)*procname(k-1) end proc:
primo(1):= 2:
filter:= proc(p)
local k;
if not isprime(p) then return false fi;
for k from 1 do
if primo(k) >= p then return true
elif not isprime(p - primo(k)) then return false
fi
od
end proc:
select(filter, [2, seq(i, i=3..10^6, 2)]); # Robert Israel, Dec 14 2015
MATHEMATICA
s = Table[Product[Prime@ k, {k, n}], {n, 12}]; Select[Prime@ Range@ 30000, AllTrue[# - TakeWhile[s, Function[k, k < #]], PrimeQ@ # && # > 0 &] &] (* Michael De Vlieger, Dec 14 2015, Version 10 *)
PROG
(PARI) primo(n) = prod(k=1, n, prime(k));
isok(p) = {my(k=1); while ((pp=primo(k)) < p, if (! isprime(p-pp), return (0)); k++; ); return (1); }
lista(nn) = forprime(p=2, nn, if (isok(p), print1(p, ", ")); ); \\ Michel Marcus, Dec 14 2015
(MATLAB)
Primes = primes(10^8);
A = Primes;
primorial = 1;
for k =1:10
primorial = primorial*Primes(k);
j = find(A > primorial, 1, 'first');
if numel(j) == 0
break
end
A = [A(1:j-1), intersect(A(j:end), Primes + primorial)];
end
A % Robert Israel, Dec 14 2015
CROSSREFS
Cf. A002110.
Sequence in context: A094158 A307244 A191082 * A068371 A327909 A072899
KEYWORD
easy,nonn
AUTHOR
Naohiro Nomoto, Mar 01 2002
STATUS
approved