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.

A245097 Number of primes greater than n and not greater than the smallest pseudoprime to base n.

Original entry on oeis.org

2, 67, 22, 4, 27, 8, 5, 0, 5, 7, 1, 13, 2, 0, 62, 9, 7, 2, 6, 0, 8, 11, 2, 0, 0, 0, 9, 5, 1, 5, 4, 0, 12, 0, 4, 13, 2, 0, 12, 12, 14, 33, 7, 0, 7, 18, 3, 0, 3, 0, 3, 8, 2, 0, 2, 0, 2, 16, 6, 51, 6, 0, 50, 0, 11, 6, 4, 0, 4, 20, 7, 3, 8, 0, 3, 0, 32, 47, 2, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 12 2014

Keywords

Crossrefs

Programs

  • Haskell
    a245097 n = sum $ map a010051' [n + 1 .. a007535 n]
    
  • PARI
    f(n) = forcomposite(m=n+1, , if(Mod(n, m)^(m-1)==1, return(m))); \\ A007535
    a(n) = primepi(f(n)) - primepi(n); \\ Michel Marcus, Jan 24 2022

Formula

a(n) = Sum {k=n+1..A007535(n)} A010051(k).
a(n) = A000720(A007535(n)) - A000720(n).