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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A025475 1 and the prime powers p^m where m >= 2, thus excluding the primes. 163
1, 4, 8, 9, 16, 25, 27, 32, 49, 64, 81, 121, 125, 128, 169, 243, 256, 289, 343, 361, 512, 529, 625, 729, 841, 961, 1024, 1331, 1369, 1681, 1849, 2048, 2187, 2197, 2209, 2401, 2809, 3125, 3481, 3721, 4096, 4489, 4913, 5041, 5329, 6241, 6561, 6859, 6889, 7921, 8192 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Also nonprime n such that sigma(n)*phi(n)>(n-1)^2. - Benoit Cloitre, Apr 12 2002

Subsequence of A000961. - Reinhard Zumkeller, Jun 22 2011

A192280(a(n)) = 0 for n>1. - Reinhard Zumkeller, Aug 26 2011

A014963(a(n)) - A089026(a(n)) = A014963(a(n)) - 1. - Eric Desbiaux, May 18 2013

If p is a term of the sequence, then the index n for which a(n) = p is given by n := b(p) := 1 + sum_{k>=2} PrimePi(p^(1/k)). Here, the sum has floor(log_2(p)) positive terms. For any m > 0, the greatest number n such that a(n) <= m is also given by b(m), thus, b(m) is the number of such prime powers <= m. - Hieronymus Fischer, May 31 2013

That 8 and 9 are the only two consecutive integers in this sequence is known as Catalan's Conjecture and was proven in 2002 by Preda Mihailescu. - Geoffrey Critzer, Nov 15 2015

LINKS

T. D. Noe, Table of n, a(n) for n = 1..10000

Romeo Meštrović, Generalizations of Carmichael numbers I, arXiv:1305.1867v1 [math.NT], May 4, 2013.

Preda Mihailescu, On Catalan’s Conjecture, Kuwait Foundation Lecture 30 - April 28, 2003.

Eric Weisstein's World of Mathematics, Prime Power

FORMULA

A005171(a(n))*A010055(a(n)) = 1. - Reinhard Zumkeller, Nov 01 2009

From Hieronymus Fischer, May 31 2013: (Start)

The greatest number n such that a(n) <= m is given by 1 + sum_{k>=2} A000720(floor(m^(1/k))).

Example 1:  m = 10^10 ==> n = 10085;

Example 2:  m = 10^11 ==> n = 28157;

Example 3:  m = 10^12 ==> n = 80071;

Example 4:  m = 10^15 ==> n = 1962690. (End)

MAPLE

with(numtheory); A025475:=proc(q) local n; print(1);

for n from 2 to q do if not isprime(n) then

  if type(phi(n)/(n-phi(n)), integer) then print(n);

fi; fi; od; end: A025475(10^6); # Paolo P. Lava, May 23 2013

# alternative implementation from R. J. Mathar, Jun 06 2013:

isA025475 := proc(n)

    if n < 1 then

        false;

    elif n = 1 then

        true;

    elif isprime(n) then

        false;

    elif nops(numtheory[factorset](n)) = 1 then

        true;

    else

        false;

    end if;

end proc:

A025475 := proc(n)

    option remember;

    local a;

    if n = 1 then

        1;

    else

        for a from procname(n-1)+1 do

            if isA025475(a) then

                return a;

            end if;

        end do:

    end if;

end proc:

# another alternative

N:= 10^5: # to get all terms <= N

Primes:= select(isprime, [2, (2*i+1 $ i = 1 .. floor((sqrt(N)-1)/2))]):

sort([1, seq(seq(p^i, i=2..floor(log[p](N))), p=Primes)]); # Robert Israel, Jul 27 2015

MATHEMATICA

A025475 = Select[ Range[ 2, 10000 ], ! PrimeQ[ # ] && Mod[ #, # - EulerPhi[ # ] ] == 0 & ]

A025475 = Sort[ Flatten[ Table[ Prime[n]^i, {n, 1, PrimePi[ Sqrt[10^4]]}, {i, 2, Log[ Prime[n], 10^4]}]]]

{1}~Join~Select[Range[10^4], And[! PrimeQ@ #, PrimePowerQ@ #] &] (* Michael De Vlieger, Jul 04 2016 *)

PROG

(PARI) for(n=1, 10000, if(sigma(n)*eulerphi(n)*(1-isprime(n))>(n-1)^2, print1(n, ", ")))

(PARI) is_A025475(n)={ ispower(n, , &p) && isprime(p) || n==1 }  \\ M. F. Hasler, Sep 25 2011

(PARI) list(lim)=my(v=List([1]), L=log(lim+.5)); forprime(p=2, (lim+.5)^(1/3), for(e=3, L\log(p), listput(v, p^e))); vecsort(concat(Vec(v), apply(n->n^2, primes(primepi(sqrtint(lim\1)))))) \\ Charles R Greathouse IV, Nov 12 2012

(PARI) list(lim)=my(v=List([1])); for(m=2, logint(lim\=1, 2), forprime(p=2, sqrtnint(lim, m), listput(v, p^m))); Set(v) \\ Charles R Greathouse IV, Aug 26 2015

(Haskell)

a025475 n = a025475_list !! (n-1)

a025475_list = filter ((== 0) . a010051) a000961_list

-- Reinhard Zumkeller, Jun 22 2011

(Python)

from sympy import primerange

A025475_list, m = [1], 10*2

m2 = m**2

for p in primerange(1, m):

....a = p**2

....while a < m2:

........A025475_list.append(a)

........a *= p

A025475_list = sorted(A025475_list) # Chai Wah Wu, Sep 08 2014

CROSSREFS

Cf. A001597, A193166, A000720.

Differences give A053707.

Cf. A076048 (number of terms < 10^n).

Sequence in context: A227476 A134611 A134612 * A246547 A195942 A125643

Adjacent sequences:  A025472 A025473 A025474 * A025476 A025477 A025478

KEYWORD

nonn,easy,nice

AUTHOR

David W. Wilson

EXTENSIONS

Edited by Daniel Forgues, Aug 18 2009

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 March 28 21:25 EDT 2017. Contains 284246 sequences.