[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
login
A071137
Number of times 2n+p is prime, with p=1 or prime p < n.
2
1, 1, 1, 1, 2, 2, 2, 3, 2, 1, 2, 2, 3, 3, 4, 2, 3, 5, 2, 5, 5, 2, 3, 5, 4, 3, 5, 5, 3, 7, 3, 3, 7, 4, 5, 6, 3, 5, 7, 4, 4, 6, 5, 4, 8, 3, 6, 9, 5, 6, 7, 4, 5, 8, 6, 3, 6, 4, 3, 11, 5, 4, 10, 5, 6, 9, 7, 7, 10, 6, 3, 10, 6, 5, 12, 7, 6, 11, 5, 9, 12, 5, 7, 12, 8, 6, 10, 6, 7, 14, 7, 6, 11, 8, 9, 12, 7, 9
OFFSET
1,5
LINKS
EXAMPLE
a(11) = 2 because 22 + 1 and 22 + 7 are primes.
MAPLE
N:= 100: # to get the first N entries
Primes:= {1} union select(isprime, {seq(2*j+1, j=1..floor(3*N/2))}):
f:= proc(n) local A; A:= select(`<`, Primes, 3*n);
nops(A intersect map(`+`, A, 2*n));
end proc;
1, seq(f(n), n=2..N); # Robert Israel, May 25 2014
MATHEMATICA
For[A071137 = {}; n = 1, n <= 100, n++, If[PrimeQ[2n + 1], cnt = 1, cnt = 0]; k = 1; While[Prime[k] < n, If[PrimeQ[2n + Prime[k]], cnt++ ]; k++ ]; AppendTo[A071137, cnt]]; A071137 (* Noe *)
Table[Length[Select[Range[PrimePi[n]], PrimeQ[2n + Prime[#]] &]] + Boole[PrimeQ[2n + 1]], {n, 80}] (* Alonso del Arte, May 25 2014 *)
CROSSREFS
Cf. A071127.
Sequence in context: A159800 A273021 A365722 * A333253 A193990 A089367
KEYWORD
easy,nonn
AUTHOR
T. D. Noe, May 28 2002
STATUS
approved