This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A366196 #12 Oct 04 2023 19:04:02 %S A366196 2,2,4,2,4,2,8,6,4,2,6,2,4,4,7,2,6,2,6,4,4,2,8,6,4,5,6,2,8,2,12,4,4,4, %T A366196 12,2,4,4,8,2,8,2,6,6,4,2,10,6,6,4,6,2,8,4,8,4,4,2,12,2,4,6,16,4,8,2, %U A366196 6,4,8,2,12,2,4,6,6,4,8,2,10,15,4,2,12,4 %N A366196 The number of ways to express n^n in the form a^b for positive integers a and b. %e A366196 a(27) = 5, as "27^27 = a^b" has 5 positive integer solutions: 3^81, 27^27, 19683^9, 7625597484987^3, and (3^81)^1. %p A366196 a:= n-> numtheory[tau](igcd(map(i-> i[2], ifactors(n)[2])[])*n): %p A366196 seq(a(n), n=2..100); # _Alois P. Heinz_, Oct 03 2023 %t A366196 intPowCountPos[n_] := Module[{m, F, i, t}, %t A366196 m = n (GCD @@ FactorInteger[n][[All, 2]]); %t A366196 t = 0; %t A366196 While[Mod[m, 2] == 0, %t A366196 t++; %t A366196 m = m/2]; %t A366196 t = t + 1; %t A366196 F = FactorInteger[m][[All, 2]]; %t A366196 If[m > 1, %t A366196 For[i = 1, i <= Length[F], i++, %t A366196 t = t (F[[i]] + 1)]; %t A366196 ]; %t A366196 Return[t]] %o A366196 (Python) %o A366196 from math import gcd %o A366196 from sympy import divisor_count, factorint %o A366196 def A366196(n): return divisor_count((m:=n*gcd(*factorint(n).values()))>>(t:=(m-1&~m).bit_length()))*(t+1) # _Chai Wah Wu_, Oct 04 2023 %Y A366196 Cf. A000312, A366161. %K A366196 nonn %O A366196 2,1 %A A366196 _Andy Niedermaier_, Oct 03 2023