login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A226949 Number of twin prime pairs of the form k*n +/- 1 with k <= n. 1
0, 1, 1, 2, 0, 4, 1, 0, 2, 2, 0, 4, 0, 1, 4, 2, 1, 6, 1, 3, 2, 2, 1, 5, 2, 1, 3, 1, 2, 11, 0, 1, 4, 2, 2, 6, 0, 2, 4, 3, 1, 9, 2, 3, 4, 3, 1, 7, 1, 4, 5, 5, 0, 8, 4, 1, 3, 3, 1, 15, 0, 3, 4, 4, 4, 13, 3, 4, 4, 5, 3, 10, 0, 3, 11, 2, 3, 12, 0, 6, 6, 3, 2, 13, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

LINKS

Amiram Eldar, Table of n, a(n) for n = 1..10000

EXAMPLE

a(4) = 2 because there are two twin prime pairs of the form (4k - 1,4k + 1) with 1 <= k <= 4, namely (3, 5) for k = 1 and (11, 13) for k = 3.

MATHEMATICA

a[n_] := Sum[Boole[PrimeQ[k*n - 1] && PrimeQ[k*n + 1]], {k, 1, n}]; Array[a, 100] (* Amiram Eldar, Dec 25 2019 *)

PROG

(PARI) a(n)=sum(k=1, n, isprime(k*n-1)&&isprime(k*n+1)) \\ Charles R Greathouse IV, Jun 27 2013

CROSSREFS

Cf. A014574, A071558.

Sequence in context: A112081 A265158 A210444 * A166589 A332696 A255330

Adjacent sequences:  A226946 A226947 A226948 * A226950 A226951 A226952

KEYWORD

nonn

AUTHOR

Irina Gerasimova, Jun 23 2013

EXTENSIONS

a(7), a(20), a(36) corrected by Charles R Greathouse IV, Jun 27 2013

a(54)-a(90) from Charles R Greathouse IV, Jun 27 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 5 09:58 EDT 2020. Contains 334840 sequences. (Running on oeis4.)