cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A064940 Values of k for which A065358(k) is 0.

This page as a plain text file.
%I A064940 #59 Mar 02 2019 03:52:34
%S A064940 0,2,6,34,38,42,50,54,78,86,90,106,110,114,834,842,1390,1406,1410,
%T A064940 1470,1578,1586,1650,1662,1842,1850,3382,3490,3506,3514,3518,3546,
%U A064940 3658,3690,3718,3746,3778,3818,3822,3842,3850,3854,3870,3898,3938,3946,3986,3990
%N A064940 Values of k for which A065358(k) is 0.
%H A064940 Robert G. Wilson v, <a href="/A064940/b064940.txt">Table of n, a(n) for n = 1..11631</a> (first 151 terms from Harry J. Smith)
%H A064940 Alberto Fraile, Roberto Martínez, and Daniel Fernández, <a href="https://arxiv.org/abs/1801.01540">Jacob's Ladder: Prime numbers in 2d</a>, 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]
%H A064940 Hans Havermann, <a href="/A065358/a065358.png">Graph of first 30 million terms of A065358.</a>
%H A064940 Hans Havermann, <a href="http://chesswanks.com/num/a064940.txt">A064940 organized by axis crossing.</a> The last number in a line is the axis crosser. Any number preceding it is a bouncer.
%H A064940 Don Reble, <a href="/A064940/a064940.txt">Table of n, a(n) for n = 1..97863</a> (The last term in the file is a(97863) = 694777169210.)
%p A064940 m:= -1:
%p A064940 t:= 0:
%p A064940 Res:= 0,2:
%p A064940 for i from 3 to 5*10^7 by 2 do
%p A064940   if isprime(i) then m:= -m fi;
%p A064940   t:= t+2*m;
%p A064940   if t = 0 then Res:= Res, i+1 fi;
%p A064940 od:
%p A064940 Res; # _Robert Israel_, Feb 20 2018
%t A064940 A065358 := Table[Sum[(-1)^(PrimePi[k]), {k,1,n}], {n,0,500}]; Select[Range[300], A065358[[#]] == 0 &] - 1  (* _G. C. Greubel_, Feb 20 2018 *)
%t A064940 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 *)
%o A064940 (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
%o A064940 (Python)
%o A064940 from sympy import nextprime
%o A064940 A064940_list, p, d, n, r = [], 2, -1, 0, False
%o A064940 while n <= 10**6:
%o A064940     pn, k = p-n, d if r else -d
%o A064940     if 0 < k <= pn:
%o A064940         A064940_list.append(n+k-1)
%o A064940     d += -pn if r else pn
%o A064940     r, n, p = not r, p, nextprime(p) # _Chai Wah Wu_, Feb 21 2018
%Y A064940 Cf. A065357, A299300.
%K A064940 nonn
%O A064940 1,2
%A A064940 _Jason Earls_, Oct 31 2001
%E A064940 Initial term 0 added by _N. J. A. Sloane_, Feb 20 2018