login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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

T. D. Noe, Table of n, a(n) for n = 0..1000

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

Cf. A000040, A013638, A006094, A001248.

Cf. A007917, A007918, A013638.

Sequence in context: A278021 A102084 A193315 * A070160 A244672 A056928

Adjacent sequences:  A030661 A030662 A030663 * A030665 A030666 A030667

KEYWORD

easy,nonn,nice

AUTHOR

N. J. A. Sloane

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 21:32 EDT 2020. Contains 333117 sequences. (Running on oeis4.)