login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A000015 Smallest prime power >= n. 9
1, 2, 3, 4, 5, 7, 7, 8, 9, 11, 11, 13, 13, 16, 16, 16, 17, 19, 19, 23, 23, 23, 23, 25, 25, 27, 27, 29, 29, 31, 31, 32, 37, 37, 37, 37, 37, 41, 41, 41, 41, 43, 43, 47, 47, 47, 47, 49, 49, 53, 53, 53, 53, 59, 59, 59, 59, 59, 59, 61, 61, 64, 64, 64, 67, 67, 67, 71, 71, 71, 71, 73 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

David W. Wilson, Table of n, a(n) for n = 1..10000

Eric Weisstein's World of Mathematics, Prime Power

FORMULA

a(A110654(n+1)) = A188666(n). - Reinhard Zumkeller, Apr 25 2011, corrected by M. F. Hasler, Jul 25 2015

a(n) = A188666(2n-1). - M. F. Hasler, Jul 25 2015

MAPLE

N:= 1000: # to get all terms <= N

Primes:= select(isprime, {$1..N}):

PPs:= {1} union Primes:

for k from 1 to ilog2(N) do

   PPs:= PPs union map(`^`, select(`<=`, Primes, floor(N^(1/k))), k)

od:

PPs:= sort(convert(PPs, list)):

1, seq(PPs[i]$(PPs[i]-PPs[i-1]), i=2..nops(PPs)); # Robert Israel, Jul 23 2015

MATHEMATICA

Insert[Table[m:=n; While[Not[Length[FactorInteger[m]]==1], m++ ]; m, {n, 2, 100}], 1, 1] (* Stefan Steinerberger, Apr 17 2006 *)

a[n_] := NestWhile[# + 1 &, n, Not@*PrimePowerQ]; (* Matthew House, Jul 14 2015, v6.0+ *)

PROG

(PARI) a(n)=if(n<1, 0, while(matsize(factor(n))[1]>1, n++); n)

(PARI) a(n)=if(n>1, while(!isprimepower(n), n++)); n \\ Charles R Greathouse IV, Feb 01 2013

(Sage) [next_prime_power(n) for n in xrange(0, 72)] # Zerinvary Lajos, Jun 13 2009

(Haskell)

a000015 n = a000015_list !! (n-1)

a000015_list = 1 : concat

   (zipWith(\pp qq -> replicate (fromInteger (pp - qq)) pp)

           (tail a000961_list) a000961_list)

-- Reinhard Zumkeller, Nov 17 2011, Apr 25 2011

CROSSREFS

Cf. A000961, A031218.

Sequence in context: A255545 A034152 A114707 * A122411 A117174 A237824

Adjacent sequences:  A000012 A000013 A000014 * A000016 A000017 A000018

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane

EXTENSIONS

More terms from Michael Somos, Jul 16 2002

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

License Agreements, Terms of Use, Privacy Policy .

Last modified July 25 15:34 EDT 2017. Contains 289795 sequences.