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!)
A064940 Values of k for which A065358(k) is 0. 3

%I #59 Mar 02 2019 03:52:34

%S 0,2,6,34,38,42,50,54,78,86,90,106,110,114,834,842,1390,1406,1410,

%T 1470,1578,1586,1650,1662,1842,1850,3382,3490,3506,3514,3518,3546,

%U 3658,3690,3718,3746,3778,3818,3822,3842,3850,3854,3870,3898,3938,3946,3986,3990

%N Values of k for which A065358(k) is 0.

%H 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 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 Hans Havermann, <a href="/A065358/a065358.png">Graph of first 30 million terms of A065358.</a>

%H 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 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 m:= -1:

%p t:= 0:

%p Res:= 0,2:

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

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

%p t:= t+2*m;

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

%p od:

%p Res; # _Robert Israel_, Feb 20 2018

%t 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 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 (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 (Python)

%o from sympy import nextprime

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

%o while n <= 10**6:

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

%o if 0 < k <= pn:

%o A064940_list.append(n+k-1)

%o d += -pn if r else pn

%o r, n, p = not r, p, nextprime(p) # _Chai Wah Wu_, Feb 21 2018

%Y Cf. A065357, A299300.

%K nonn

%O 1,2

%A _Jason Earls_, Oct 31 2001

%E Initial term 0 added by _N. J. A. Sloane_, Feb 20 2018

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 18 10:46 EDT 2024. Contains 371779 sequences. (Running on oeis4.)