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!)
A158288 The number of twin prime pairs in the n-th century. 1
8, 7, 4, 2, 3, 2, 3, 0, 5, 0, 5, 1, 3, 2, 4, 0, 4, 2, 2, 3, 3, 3, 2, 3, 0, 2, 2, 3, 1, 1, 0, 2, 2, 4, 2, 4, 1, 1, 2, 2, 4, 2, 5, 1, 2, 2, 2, 2, 0, 2, 2, 0, 2, 0, 3, 2, 3, 1, 3, 0, 1, 2, 1, 1, 1, 2, 2, 4, 2, 2, 0, 1, 1, 3, 2, 3, 0, 1, 1, 1, 2, 0, 3, 1, 1, 2, 1, 0, 3, 1, 2, 0, 2, 1, 4, 0, 2, 2, 1, 1, 4, 1, 1, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The number of members of A001539 from 100*n-99 to 100*n-3. - Robert Israel, Jul 19 2017
LINKS
FORMULA
a(n) = A071538(100*n-3) - A071538(100*n-100). - Robert Israel, Jul 19 2017
MAPLE
f:= proc(n) local P;
P:= select(isprime, {seq(i, i=100*n-99..100*n-1, 2)});
nops(P intersect map(`+`, P, 2))
end proc:
map(f, [$1..200]); # Robert Israel, Jul 19 2017
MATHEMATICA
Table[Count[Prime@ Range[Boole[n == 1] + PrimePi[100 (n - 1) + 1], PrimePi[100 n] - 1], _?(PrimeQ[# + 2] &)], {n, 105}] (* Michael De Vlieger, Jul 20 2017 *)
PROG
(PARI) a(n)=my(s=0); forprime(p=100*n-99, 100*n-2, if(isprime(p+2), s++)); s \\ Charles R Greathouse IV, Feb 03 2011
(Python)
from sympy import primerange, isprime
def a(n):
s=0
for p in primerange(100*n - 99, 100*n - 1):
if isprime(p + 2):s+=1
return s
print([a(n) for n in range(1, 201)]) # Indranil Ghosh, Jul 20 2017, after PARI code
CROSSREFS
Sequence in context: A094883 A131081 A326919 * A193716 A268046 A260060
KEYWORD
nonn
AUTHOR
Ki Punches, Mar 15 2009
EXTENSIONS
Corrected by Ray Chandler, May 23 2009
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 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)