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!)
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 (list; graph; refs; listen; history; text; internal format)
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

Bence Bernáth, Table of n, a(n) for n = 1..10000

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

Cf. A007504, A070748.

Sequence in context: A341945 A280535 A221171 * A319610 A288739 A111621

Adjacent sequences:  A333685 A333686 A333687 * A333689 A333690 A333691

KEYWORD

sign

AUTHOR

Bence Bernáth, Apr 02 2020

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 September 18 11:38 EDT 2021. Contains 347527 sequences. (Running on oeis4.)