OFFSET
1,1
COMMENTS
Primitive elements for powerful numbers; every powerful is product of these numbers. The representation is not necessarily unique.
FORMULA
A178254(a(n)) = 2. - Reinhard Zumkeller, May 24 2010
Sum_{n>=1} 1/a(n) = P(2) + P(3) = 0.6270100593..., where P is the prime zeta function. - Amiram Eldar, Dec 21 2020
MATHEMATICA
m=30000; Union[Prime[Range[PrimePi[m^(1/2)]]]^2, Prime[Range[PrimePi[m^(1/3)]]]^3] (* Vladimir Joseph Stephan Orlovsky, Apr 11 2011 *)
With[{nn=50}, Take[Union[Flatten[Table[{n^2, n^3}, {n, Prime[Range[ nn]]}]]], nn]] (* Harvey P. Dale, Feb 26 2015 *)
PROG
(PARI) for(n=1, 40000, fm=factor(n); if(matsize(fm)[1]==1&(fm[1, 2]==2||fm[1, 2]==3), print1(n", ")))
(PARI) is(n)=my(k=isprimepower(n)); k && k<4 \\ Charles R Greathouse IV, May 24 2013
(Python)
from math import isqrt
from sympy import primepi, integer_nthroot
def A168363(n):
def f(x): return n+x-primepi(isqrt(x))-primepi(integer_nthroot(x, 3)[0])
m, k = n, f(n)
while m != k:
m, k = k, f(k)
return int(m) # Chai Wah Wu, Aug 09 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Franklin T. Adams-Watters, Nov 23 2009
STATUS
approved