A075109 Odd perfect powers (1 together with numbers m^k, m odd, k >= 2).
1, 9, 25, 27, 49, 81, 121, 125, 169, 225, 243, 289, 343, 361, 441, 529, 625, 729, 841, 961, 1089, 1225, 1331, 1369, 1521, 1681, 1849, 2025, 2187, 2197, 2209, 2401, 2601, 2809, 3025, 3125, 3249, 3375, 3481, 3721, 3969, 4225, 4489, 4761, 4913, 5041, 5329, 5625
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Programs
-
Haskell
a075109 n = a075109_list !! (n-1) a075109_list = filter odd a001597_list -- Reinhard Zumkeller, Oct 04 2012
-
Magma
[1] cat [n : n in [3..6000 by 2] | IsPower(n) ]; // Vincenzo Librandi, Mar 31 2014
-
Maple
q:= n-> n=1 or n::odd and igcd(seq(i[2], i=ifactors(n)[2]))>1: select(q, [$1..6000])[]; # Alois P. Heinz, May 04 2022
-
Mathematica
Take[Union[Flatten[Table[a^b, {a, 1, 99, 2}, {b, 2, 15}]]], 50] (* Alonso del Arte, Nov 22 2011 *)
-
PARI
isok(m) = (m==1) || ((m%2) && ispower(m)); \\ Michel Marcus, May 04 2022
-
Python
from sympy import mobius, integer_nthroot def A075109(n): def bisection(f,kmin=0,kmax=1): while f(kmax) > kmax: kmax <<= 1 kmin = kmax >> 1 while kmax-kmin > 1: kmid = kmax+kmin>>1 if f(kmid) <= kmid: kmax = kmid else: kmin = kmid return kmax def f(x): return int(n-1+x+sum(mobius(k)*((integer_nthroot(x,k)[0]+1>>1)-1) for k in range(2,x.bit_length()))) return bisection(f,n,n) # Chai Wah Wu, Feb 25 2025
Formula
Sum_{n>=1} 1/a(n) = 1 + Sum_{k>=2} mu(k)*(1-zeta(k)*(2^k-1)/2^k) = 1.2890375574... - Amiram Eldar, Dec 19 2020
Extensions
Definition clarified by N. J. A. Sloane, Dec 25 2021