login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A030664 Product of largest prime <= n and smallest prime >= n. 6
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
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
LINKS
FORMULA
For n > 1: a(n) = A007917(n)*A007918(n). - Reinhard Zumkeller, May 22 2015
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 *)
PROG
(MuPAD) numlib::prevprime(i)*nextprime(i) $ i = 0..50 // Zerinvary Lajos, Feb 26 2007
(Haskell)
a030664 n = a007917 n * a007918 n -- Reinhard Zumkeller, May 22 2015, Feb 24 2011
(PARI) a(n) = if (n < 2, 1, precprime(n)*nextprime(n)); \\ Michel Marcus, Mar 21 2015
CROSSREFS
Sequence in context: A278021 A102084 A193315 * A070160 A244672 A364013
KEYWORD
easy,nonn,nice
AUTHOR
EXTENSIONS
More terms from Erich Friedman
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 08:27 EDT 2024. Contains 371698 sequences. (Running on oeis4.)