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!)
A064940 Values of k for which A065358(k) is 0. 3
0, 2, 6, 34, 38, 42, 50, 54, 78, 86, 90, 106, 110, 114, 834, 842, 1390, 1406, 1410, 1470, 1578, 1586, 1650, 1662, 1842, 1850, 3382, 3490, 3506, 3514, 3518, 3546, 3658, 3690, 3718, 3746, 3778, 3818, 3822, 3842, 3850, 3854, 3870, 3898, 3938, 3946, 3986, 3990 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Robert G. Wilson v, Table of n, a(n) for n = 1..11631 (first 151 terms from Harry J. Smith)

Alberto Fraile, Roberto Martínez, and Daniel Fernández, Jacob's Ladder: Prime numbers in 2d, arXiv preprint arXiv:1801.01540 [math.HO], 2017. [They describe essentially the same sequence as A065358 except with offset 1 instead of 0, so their values for this sequence, which are given in A299300, differ by 1. - N. J. A. Sloane, Feb 20 2018]

Hans Havermann, Graph of first 30 million terms of A065358.

Hans Havermann, A064940 organized by axis crossing. The last number in a line is the axis crosser. Any number preceding it is a bouncer.

Don Reble, Table of n, a(n) for n = 1..97863 (The last term in the file is a(97863) = 694777169210.)

MAPLE

m:= -1:

t:= 0:

Res:= 0, 2:

for i from 3 to 5*10^7 by 2 do

  if isprime(i) then m:= -m fi;

  t:= t+2*m;

  if t = 0 then Res:= Res, i+1 fi;

od:

Res; # Robert Israel, Feb 20 2018

MATHEMATICA

A065358 := Table[Sum[(-1)^(PrimePi[k]), {k, 1, n}], {n, 0, 500}]; Select[Range[300], A065358[[#]] == 0 &] - 1  (* G. C. Greubel, Feb 20 2018 *)

c = s = 0; k = 1; lst = {0}; While[k < 100000, c = Mod[c + Boole[PrimeQ[k]], 2]; s = s + (-1)^c; If[s == 0, AppendTo[lst, k]]; k++]; lst (* Robert G. Wilson v, Feb 20 2018 *)

PROG

(PARI) { n=s=0; for (m=1, 10^9, s+=(-1)^primepi(m); if (s==0, write("b064940.txt", n++, " ", m); if (n==150, return)) ) } \\ Harry J. Smith, Sep 30 2009

(Python)

from sympy import nextprime

A064940_list, p, d, n, r = [], 2, -1, 0, False

while n <= 10**6:

    pn, k = p-n, d if r else -d

    if 0 < k <= pn:

        A064940_list.append(n+k-1)

    d += -pn if r else pn

    r, n, p = not r, p, nextprime(p) # Chai Wah Wu, Feb 21 2018

CROSSREFS

Cf. A065357, A299300.

Sequence in context: A259436 A278611 A088125 * A105142 A227306 A192537

Adjacent sequences:  A064937 A064938 A064939 * A064941 A064942 A064943

KEYWORD

nonn

AUTHOR

Jason Earls, Oct 31 2001

EXTENSIONS

Initial term 0 added by N. J. A. Sloane, Feb 20 2018

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 22 01:32 EDT 2021. Contains 345367 sequences. (Running on oeis4.)