login
A056798
Prime powers with even nonnegative exponents.
16
1, 4, 9, 16, 25, 49, 64, 81, 121, 169, 256, 289, 361, 529, 625, 729, 841, 961, 1024, 1369, 1681, 1849, 2209, 2401, 2809, 3481, 3721, 4096, 4489, 5041, 5329, 6241, 6561, 6889, 7921, 9409, 10201, 10609, 11449, 11881, 12769, 14641, 15625, 16129, 16384
OFFSET
1,2
COMMENTS
Also numbers whose geometric mean of divisors is an integer. - Ctibor O. Zizka, Sep 29 2008
This is just a special case. In fact, the numbers whose geometric mean of divisors is an integer are all the squares of integers (A000290). - Daniel Lignon, Nov 29 2014
FORMULA
a(n) = A025473(n)^(2*A025474(n)) = A000961(n)^2;
A001222(a(n)) mod 2 = 0;
A003415(a(n)) = A192083(n); A068346(a(n)) = A192084(n). - Reinhard Zumkeller, Jun 26 2011
Sum_{n>=2} 1/a(n) = A154945. - Amiram Eldar, Sep 21 2020
MATHEMATICA
Take[Union[Flatten[Table[Prime[n]^k, {n, 31}, {k, 0, 14, 2}]]], 45] (* Alonso del Arte, Jul 05 2011 *)
PROG
(PARI) is(n)=my(e=isprimepower(n)); if(e, e%2==0, n==1) \\ Charles R Greathouse IV, Sep 18 2015
(Python)
from sympy import primepi, integer_nthroot
def A056798(n):
if n==1: return 1
def f(x): return int(n-2+x-sum(primepi(integer_nthroot(x, k)[0])for k in range(2, x.bit_length(), 2)))
kmin, kmax = 1, 2
while f(kmax) >= kmax:
kmax <<= 1
while True:
kmid = kmax+kmin>>1
if f(kmid) < kmid:
kmax = kmid
else:
kmin = kmid
if kmax-kmin <= 1:
break
return kmax # Chai Wah Wu, Aug 13 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Aug 28 2000
STATUS
approved