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!)
A103271 a(n) = (prime(n)+prime(n+1)) mod 4. 2
1, 0, 0, 2, 0, 2, 0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 2, 0, 0, 2, 0, 2, 2, 0, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 2, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 2, 0, 2, 0, 0, 2, 0, 2, 2, 2, 0, 0, 0, 0, 0, 2, 0, 2, 2, 0, 2, 2, 2, 2, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
The number of 2's among the first N terms are: count(10^3) = 381, count (10^4) = 4137, count(10^5) = 42638, count(10^6) = 437423, count(10^7) = 4448503. - M. F. Hasler, Apr 27 2016
In terms of vectors a = (p(n),p(n+1)) mod 4, as considered in the preprint arxiv:1603.03720, the 2's group together the cases a = (1,1) and (3,3) and 0's cumulate cases (1,3) and (3,1). Assuming that the two subcases of each case have roughly the same probabilities, the above counts (i.e., percentage of 44.5% : 55.5% at 10^7) are compatible with the data in the 2nd table on bottom of p.14 where respective percentages vary from 44.8% : 55.1% (at 10^10) to 46% : 54% (at 10^12). I found that at p(n) ~ 10^80, the percentages become closer than 49% : 51%. - M. F. Hasler, May 12 2016
LINKS
R. J. Lemke Oliver and K. Soundararajan, Unexpected biases in the distribution of consecutive primes, arXiv:1603.03720 [math.NT], 2016.
FORMULA
a(n) = A001043(n) mod 4. - Michel Marcus, Apr 14 2016
MAPLE
seq(ithprime(n)+ithprime(n+1) mod 4, n=1..150); # Emeric Deutsch, May 31 2005
MATHEMATICA
Table[Mod[Prime@ n + Prime[n + 1], 4], {n, 120}] (* Michael De Vlieger, Apr 27 2016 *)
PROG
(PARI) a(n) = (prime(n) + prime(n+1)) % 4; \\ Michel Marcus, Apr 14 2016
CROSSREFS
Sequence in context: A179212 A105118 A245359 * A029832 A361879 A320535
KEYWORD
nonn
AUTHOR
Yasutoshi Kohmoto, Jan 27 2005
EXTENSIONS
More terms from Emeric Deutsch, May 31 2005
Prepended a(1) = 1, Joerg Arndt, Apr 14 2016
STATUS
approved

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 23 09:48 EDT 2024. Contains 371905 sequences. (Running on oeis4.)