OFFSET
1,1
COMMENTS
From Gus Wiseman, Oct 23 2016: (Start)
There is a 1-to-1 correspondence between integers N >= 2 and sequences a(x_1),a(x_2),...,a(x_k) of terms from this sequence. Every N >= 2 can be written uniquely as a "power tower"
N = a(x_1)^a(x_2)^a(x_3)^...^a(x_k),
where the exponents are to be nested from the right.
Proof: If N is not a perfect power then N = a(x) for some x, and we are done. Otherwise, write N = a(x_1)^M for some M >=2, and repeat the process. QED
Of course, prime numbers also have distinct power towers (see A164336). (End)
These numbers can be computed with a modified Sieve of Eratosthenes: (1) start at n=2; (2) if n is not crossed out, then append n to the sequence and cross out all powers of n; (3) set n = n+1 and go to step 2. - Sam Alexander, Dec 15 2003
A075802(a(n)) = 0. - Reinhard Zumkeller, Mar 19 2009
These are all numbers such that the multiplicities of the prime factors have no common divisor. The first number in the sequence whose prime multiplicities are not coprime is 180 = 2 * 2 * 3 * 3 * 5. Mathematica: CoprimeQ[2,2,1]->False. - Gus Wiseman, Jan 14 2017
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..9875
Joakim Munkhammar, The Riemann zeta function as a sum of geometric series, The Mathematical Gazette (2020) Vol. 104, Issue 561, 527-530.
F. Smarandache, Only Problems, Not Solutions!, Xiquan Publ., Phoenix-Chicago, 1993
FORMULA
Gcd(exponents in prime factorization of a(n)) = 1, cf. A124010. - Reinhard Zumkeller, Apr 13 2012
a(n) ~ n. - Charles R Greathouse IV, Jul 01 2013
EXAMPLE
Example of the power tower factorizations for the first nine positive integers: 1=1, 2=a(1), 3=a(2), 4=a(1)^a(1), 5=a(3), 6=a(4), 7=a(5), 8=a(1)^a(2), 9=a(2)^a(1). - Gus Wiseman, Oct 20 2016
MAPLE
See link.
MATHEMATICA
a = {}; Do[If[Apply[GCD, Transpose[FactorInteger[n]][[2]]] == 1, a = Append[a, n]], {n, 2, 200}];
Select[Range[2, 200], GCD@@FactorInteger[#][[All, -1]]===1&] (* Michael De Vlieger, Oct 21 2016. Corrected by Gus Wiseman, Jan 14 2017 *)
PROG
(Magma) [n : n in [2..1000] | not IsPower(n) ];
(Haskell)
a007916 n = a007916_list !! (n-1)
a007916_list = filter ((== 1) . foldl1 gcd . a124010_row) [2..]
-- Reinhard Zumkeller, Apr 13 2012
(PARI) is(n)=!ispower(n)&&n>1 \\ Charles R Greathouse IV, Jul 01 2013
(Python)
from sympy import mobius, integer_nthroot
def A007916(n):
def f(x): return int(n+1-sum(mobius(k)*(integer_nthroot(x, k)[0]-1) for k in range(2, x.bit_length())))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
return m # Chai Wah Wu, Aug 13 2024
KEYWORD
nonn,easy
AUTHOR
R. Muller
EXTENSIONS
More terms from Henry Bottomley, Sep 12 2000
Edited by Charles R Greathouse IV, Mar 18 2010
Further edited by N. J. A. Sloane, Nov 09 2016
STATUS
approved