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.

A030664 Product of largest prime <= n and smallest prime >= n.

Original entry on oeis.org

1, 1, 4, 9, 15, 25, 35, 49, 77, 77, 77, 121, 143, 169, 221, 221, 221, 289, 323, 361, 437, 437, 437, 529, 667, 667, 667, 667, 667, 841, 899, 961, 1147, 1147, 1147, 1147, 1147, 1369, 1517, 1517, 1517, 1681, 1763, 1849, 2021, 2021, 2021, 2209, 2491, 2491, 2491
Offset: 0

Views

Author

Keywords

Comments

Symmetrical about zero, a(n)=a(-n) if n>1, if negative primes are recognized. - Robert G. Wilson v, Feb 28 2011
Iff n is a prime then a(n)=n^2, otherwise a(n) is a semiprime. - Robert G. Wilson v, Feb 28 2011

Crossrefs

Programs

  • Haskell
    a030664 n = a007917 n * a007918 n -- Reinhard Zumkeller, May 22 2015, Feb 24 2011
    
  • Mathematica
    f[n_] := If[Abs[n] < 2, 1, NextPrime[n + 1, -1] NextPrime[n - 1]]; Array[f, 51, 0] (* Robert G. Wilson v, Feb 28 2011 *)
  • MuPAD
    numlib::prevprime(i)*nextprime(i) $ i = 0..50 // Zerinvary Lajos, Feb 26 2007
    
  • PARI
    a(n) = if (n < 2, 1, precprime(n)*nextprime(n)); \\ Michel Marcus, Mar 21 2015

Formula

For n > 1: a(n) = A007917(n)*A007918(n). - Reinhard Zumkeller, May 22 2015

Extensions

More terms from Erich Friedman