login
This site is supported by donations 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. 5
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; internal format)
OFFSET

0,3

COMMENTS

Symmetrical about zero, a(n)=a(-n) if n>1, if you recognize negative primes. - 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

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 (zerinvarylajos(AT)yahoo.com), Feb 26 2007

(Haskell)

a030664 n = a030664_list !! n

a030664_list = f 1 (1:a000040_list) [0..] where

   f q (p:ps) (n:ns) | n < p     = q*p : f q (p:ps) ns

                     | otherwise = p^2 : f p ps     ns

-- Reinhard Zumkeller, Feb 24 2011

CROSSREFS

Cf. A000040, A013638, A006094, A001248.

Sequence in context: A050530 A102084 A193315 * A070160 A056928 A122964

Adjacent sequences:  A030661 A030662 A030663 * A030665 A030666 A030667

KEYWORD

easy,nonn,nice

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com).

EXTENSIONS

More terms from Erich Friedman (erich.friedman(AT)stetson.edu).

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 15 21:16 EST 2012. Contains 205856 sequences.