|
|
A166510
|
|
Nearest integer to 1 / Sum_{p prime, 2^n < p <= 2^(n+1)} (Kronecker(-1/p)/p).
|
|
2
|
|
|
2, -3, 18, -71, -29, 40, -57, -61, 785, 671, -354, 2984, 10869, -1374, -13678, -4224, -3217, 9010, -20224, -23384, 21468, -34445, -23448, 165023, -466254, -146824, 174689, -399880
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
The convergence of the quasi-alternating sum S = Sum_{prime p >= 2} (Kronecker(-1/p)/p) (= A166509), where Kronecker(-1/p) = -1 if p=3 (mod 4), and +1 else (essentially the same as A070750), can be estimated by grouping together the terms for primes between consecutive powers of 2. These "partial sums" indeed go to zero, so we list here the nearest integer to their inverse. (Nearest integer means floor(x+0.5), see examples.) For more links and references, see A166509.
|
|
LINKS
|
|
|
EXAMPLE
|
a(0) = 2 is the inverse of 1/2. (For the prime p=2, Kronecker(-1/2) = +1.)
a(1) = -3 is the inverse of -1/3. (For the prime p=3, Kronecker(-1/p)=-1, as for any prime p=3 (mod 4).)
a(2) = 18 = round(17.5), since 1/5-1/7 = 2/35. (For the prime p=5, Kronecker(-1/p)=+1, as for any prime p=1 (mod 4).
a(3) = -71 = round(-71.5), since -1/11+1/13 = -2/143. (Here we summed over primes between 2^3=8 and 2^4=16. The negative half-integer value is rounded towards zero.)
|
|
MATHEMATICA
|
kron[p_] := If[Mod[p, 4] == 3, -1, 1]; a[n_] := (p = 2^n; s = 0; While[(p = NextPrime[p]) < 2^(n + 1), s += kron[p]/p]; Floor[1/s + 1/2]); a[0] = 2; Table[an = a[n]; Print[an]; an, {n, 0, 27}] (* Jean-François Alcover, Nov 09 2011, after Pari *)
|
|
PROG
|
(PARI) A166510(n)={ my(p=2^n, s=.); n=2<<n; while(n>=p=nextprime(p+1), s+=kronecker(-1, p)/p); round(1/s)}
|
|
CROSSREFS
|
|
|
KEYWORD
|
more,sign
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|