This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A103271 #43 Mar 16 2025 15:42:38 %S A103271 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, %T A103271 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, %U A103271 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 %N A103271 a(n) = (prime(n)+prime(n+1)) mod 4. %C A103271 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 %C A103271 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 %H A103271 Harvey P. Dale, <a href="/A103271/b103271.txt">Table of n, a(n) for n = 1..1000</a> %H A103271 R. J. Lemke Oliver and K. Soundararajan, <a href="http://arxiv.org/abs/1603.03720">Unexpected biases in the distribution of consecutive primes</a>, arXiv:1603.03720 [math.NT], 2016. %F A103271 a(n) = A001043(n) mod 4. - _Michel Marcus_, Apr 14 2016 %p A103271 seq(ithprime(n)+ithprime(n+1) mod 4, n=1..150); # _Emeric Deutsch_, May 31 2005 %t A103271 Table[Mod[Prime@ n + Prime[n + 1], 4], {n, 120}] (* _Michael De Vlieger_, Apr 27 2016 *) %t A103271 Mod[Total[#],4]&/@Partition[Prime[Range[120]],2,1] (* _Harvey P. Dale_, Mar 16 2025 *) %o A103271 (PARI) a(n) = (prime(n) + prime(n+1)) % 4; \\ _Michel Marcus_, Apr 14 2016 %Y A103271 Cf. A001043, A039702. %K A103271 nonn %O A103271 1,4 %A A103271 _Yasutoshi Kohmoto_, Jan 27 2005 %E A103271 More terms from _Emeric Deutsch_, May 31 2005 %E A103271 Prepended a(1) = 1, _Joerg Arndt_, Apr 14 2016