A089723 a(1)=1; for n>1, a(n) gives number of ways to write n as n = x^y, 2 <= x, 1 <= y.
1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1
Offset: 1
Examples
144 = 2^4 * 3^2, gcd(4,2) = 2, d(2) = 2, so a(144) = 2. The representations are 144^1 and 12^2. From _Friedjof Tellkamp_, Jun 14 2025: (Start) n: 1, 2, 3, 4, 5, 6, 7, 8, 9, ... ---------------------------------------------------- 1st powers: 1, 1, 1, 1, 1, 1, 1, 1, 1, ... (A000012) Squares: 1, 0, 0, 1, 0, 0, 0, 0, 1, ... (A010052) Cubes: 1, 0, 0, 0, 0, 0, 0, 1, 0, ... (A010057) Quartics: 1, 0, 0, 0, 0, 0, 0, 0, 0, ... (A374016) ... Sum: oo, 1, 1, 2, 1, 1, 1, 2, 2, ... a(1)=1: 1, 1, 1, 2, 1, 1, 1, 2, 2, ... (= this sequence). (End)
Links
- N. J. A. Sloane, Table of n, a(n) for n = 1..20000
- Solomon W. Golomb, A new arithmetic function of combinatorial significance, J. Number Theory, Vol. 5, No. 3 (1973), pp. 218-223. 1973JNT.....5..218G
- Jan Mycielski, Sur les représentations des nombres naturels par des puissances à base et exposant naturels, Colloquium Mathematicum, Vol. 2 (1951), pp. 254-260. See gamma(n).
- N. J. A. Sloane, Maple programs for A007916, A278028, A278029, A052409, A089723, A277564
Crossrefs
Programs
-
Maple
with(numtheory): A089723 := proc(n) local t1,t2,g,j; if n=1 then 1 else t1:=ifactors(n)[2]; t2:=nops(t1); g := t1[1][2]; for j from 2 to t2 do g:=gcd(g,t1[j][2]); od: tau(g); fi; end; [seq(A089723(n),n=1..100)]; # N. J. A. Sloane, Nov 10 2016
-
Mathematica
Table[DivisorSigma[0, GCD @@ FactorInteger[n][[All, 2]]], {n, 100}] (* Gus Wiseman, Jun 12 2017 *)
-
PARI
a(n) = if (n==1, 1, numdiv(gcd(factor(n)[,2]))); \\ Michel Marcus, Jun 13 2017
-
Python
from math import gcd from sympy import factorint, divisor_sigma def a(n): if n == 1: return 1 e = list(factorint(n).values()) g = e[0] for ei in e[1:]: g = gcd(g, ei) return divisor_sigma(g, 0) print([a(n) for n in range(1, 105)]) # Michael S. Branicky, Jul 15 2021
Formula
If n = Product p_i^e_i, a(n) = d(gcd()). - Franklin T. Adams-Watters, Mar 10 2006
Sum_{n=1..m} a(n) = A255165(m) + 1. - Richard R. Forberg, Feb 16 2015
Sum_{n>=2} a(n)/n^s = Sum_{n>=2} 1/(n^s-1) = Sum_{k>=1} (zeta(s*k)-1) for all real s with Re(s) > 1 (Golomb, 1973). - Amiram Eldar, Nov 06 2020
For n > 1, a(n) = Sum_{i=1..floor(n/2)} floor(n^(1/i))-floor((n-1)^(1/i)). - Wesley Ivan Hurt, Dec 08 2020
Sum_{n>=1} (a(n)-1)/n = 1 (Mycielski, 1951). - Amiram Eldar, Jul 15 2021
From Friedjof Tellkamp, Jun 14 2025: (Start)
G.f.: x + Sum_{j>=2, k>=1} x^(j^k). (End)
Comments