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.

A066339 Number of primes p of the form 4m+1 with p <= n.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11
Offset: 1

Views

Author

Sharon Sela (sharonsela(AT)hotmail.com), Jan 01 2002

Keywords

Comments

Asymptotic expansion: a(n) ~ pi(n)/2 ~ n/(2log(n)) (pi(n) is in sequence A000720).
Partial sums of A079260. - Reinhard Zumkeller, Feb 06 2014

Crossrefs

Programs

  • Haskell
    a066339 n = a066339_list !! (n-1)
    a066339_list = scanl1 (+) $ map a079260 [1..]
    -- Reinhard Zumkeller, Feb 06 2014
  • Mathematica
    Table[ Length[ Select[ Union[ Table[ Prime[ PrimePi[i]], {i, 2, n}]], Mod[ #, 4] == 1 & ]], {n, 2, 100} ]
  • PARI
    for(n=1,200,print1(sum(i=1,n,if((i*isprime(i)-1)%4,0,1)),","))
    

Formula

a(n) + A066490(n) = A000720(n) - 1 for n >= 2. - Jianing Song, Apr 28 2021

Extensions

More terms from Robert G. Wilson v, Jan 03 2002