cp's OEIS Frontend

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.

A369109 a(n) is the number of pairs of twin primes p and p+2 both less than or equal to 10^n such that p is congruent to 1 modulo 4.

Original entry on oeis.org

1, 4, 19, 105, 604, 4046, 29482, 220419, 1712731, 13706592, 112196635, 935286453
Offset: 1

Views

Author

Stefano Spezia, Jan 13 2024

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Length[Select[Range[10^n-2], PrimeQ[#] && PrimeQ[#+2] && Mod[#,4] == 1 &]]; Array[a,10]
  • PARI
    lista(nmax) = {my(prev = 2, c = 0, pow = 10, n = 1, nm = nmax + 1); forprime(p = 3, , if(p > pow, print1(c, ", "); pow *= 10; n++; if(n == nm, break)); if(prev % 4 == 1 && p == prev + 2, c++); prev = p);} \\ Amiram Eldar, Jun 03 2024

Extensions

a(11)-a(12) from Amiram Eldar, Jun 03 2024