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
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
FORMULA
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