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!)
A173753 Let f(j) = j^2 + j + 17 and g(j) = j^2 - j + 17. Sequence gives pi(f(j)) - pi(g(j)) as j runs through those nonnegative integers for which both f(j) and g(j) are prime. 0
0, 1, 1, 1, 2, 3, 2, 4, 3, 4, 3, 4, 5, 6, 3, 6, 6, 7, 5, 9, 9, 8, 9, 7, 8, 15, 13, 12, 11, 14, 16, 14, 16, 17, 20, 19, 23, 17, 20, 26, 22, 27, 30, 23, 25, 28, 26, 32, 36, 26, 35, 25, 30, 31, 33, 34, 33, 40, 41, 36, 39, 43, 36, 40, 41, 49, 43, 48, 47, 51, 55, 53, 47, 58, 54, 56, 63, 60 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
LINKS
EXAMPLE
a(1) = 7 - 7 = 0 where 0^2 + 0 + 17 = 17 = prime(7) and 0^2 - 0 + 17 = 17 = prime(7);
a(2) = 8 - 7 = 1 where 1^2 + 1 + 17 = 19 = prime(8) and 1^2 - 1 + 17 = 17 = prime(7);
a(3) = 9 - 8 = 1 where 2^2 + 2 + 17 = 23 = prime(9) and 2^2 - 2 + 17 = 19 = prime(8);
a(4) = 10 - 9 = 1 where 3^2 + 3 + 17 = 29 = prime(10) and 3^2 - 3 + 17 = 23 = prime(9).
MAPLE
for x from 0 to 1000 do mp := x^2+x+17 ; kp := x^2-x+17 ; if isprime(mp) and isprime(kp) then m := numtheory[pi](mp) ; k := numtheory[pi](kp) ; printf("%d, ", m-k) ; end if; end do : # R. J. Mathar, Mar 01 2010
MATHEMATICA
f[n_]:=Module[{c=n^2+17, a, b}, a=c+n; b=c-n; If[And@@PrimeQ[{a, b}], PrimePi[a]- PrimePi[b], 0]]; Join[{0}, Select[Array[f, 400, 0], #!=0&]] (* Harvey P. Dale, Jul 13 2011 *)
CROSSREFS
Cf. A007635.
Sequence in context: A335616 A004596 A118653 * A295753 A144968 A239328
KEYWORD
nonn,less
AUTHOR
EXTENSIONS
a(31) and a(33) corrected and sequence extended by R. J. Mathar, Mar 01 2010
Name edited by Jon E. Schoenfield, Jan 30 2019
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 23 12:27 EDT 2024. Contains 371912 sequences. (Running on oeis4.)