login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A333688
Partial sums of A070748.
1
1, 2, 1, 2, 1, 2, 1, 2, 1, 0, -1, -2, -3, -4, -3, -2, -1, -2, -3, -2, -3, -4, -3, -2, -1, 0, 1, 2, 3, 2, 3, 2, 1, 2, 1, 2, 1, 0, -1, -2, -1, -2, -1, -2, -1, -2, -3, -2, -1, 0, 1, 2, 3, 2, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, -1, -2, -1, -2
OFFSET
1,2
COMMENTS
This sequence counts what the prime number distribution is in the intervals where the sine function gives different signs: if a(n) is positive, it means that up to n more primes fall into the interval (2k*Pi, (2k+1)*Pi) than in ((2k+1)*Pi, (2k+2)*Pi) for k=0,1,2,3... When a(n) is zero, the first n primes are distributed equally between these intervals.
LINKS
FORMULA
a(n) = Sum_{k=1..n} A070748(k). - Sean A. Irvine, May 02 2020
EXAMPLE
For n=4, a(4) = signum(sin(2)) + signum(sin(3)) + signum(sin(5)) + signum(sin(7)) = 1 + 1 - 1 + 1 = 2.
MATHEMATICA
Accumulate @ Table[Sign @ Sin @ Prime[i], {i, 1, 70}] (* Amiram Eldar, Apr 02 2020 *)
PROG
(MATLAB)
primes_up_to=1000;
sequence(1)=1;
for n=2:1:primes_up_to
if isprime(n)
sequence(numel(primes(n)))=sum(sign(sin(primes(n))));
end
end
result=transpose((sequence));
(PARI) a(n) = sum(k=1, n, sign(sin(prime(k)))); \\ Michel Marcus, May 03 2020
CROSSREFS
Sequence in context: A341945 A280535 A221171 * A319610 A288739 A111621
KEYWORD
sign
AUTHOR
Bence Bernáth, Apr 02 2020
STATUS
approved