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.

A381018 a(n) is the number of primes in A000328 for r <= n.

Original entry on oeis.org

1, 2, 3, 3, 3, 4, 5, 6, 6, 7, 7, 7, 7, 8, 9, 10, 10, 11, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 22, 22, 22, 22, 22, 22, 23, 23, 23
Offset: 1

Views

Author

Michel Marcus, Feb 12 2025

Keywords

Comments

Number of Gauss circle primes for r <= n.

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n, isprime(1 + 4*sum(j=0, k^2\4, k^2\(4*j+1) - k^2\(4*j+3))));
    
  • Python
    from math import isqrt
    from sympy import isprime
    def A381018(n): return sum(1 for m in range(1,n+1) if isprime(1+(sum(isqrt(k*((m<<1)-k)) for k in range(1,m+1))<<2))) # Chai Wah Wu, Feb 13 2025