login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A366196 The number of ways to express n^n in the form a^b for positive integers a and b. 2
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, 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, 6, 4, 8, 2, 12, 2, 4, 6, 6, 4, 8, 2, 10, 15, 4, 2, 12, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
LINKS
EXAMPLE
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.
MAPLE
a:= n-> numtheory[tau](igcd(map(i-> i[2], ifactors(n)[2])[])*n):
seq(a(n), n=2..100); # Alois P. Heinz, Oct 03 2023
MATHEMATICA
intPowCountPos[n_] := Module[{m, F, i, t},
m = n (GCD @@ FactorInteger[n][[All, 2]]);
t = 0;
While[Mod[m, 2] == 0,
t++;
m = m/2];
t = t + 1;
F = FactorInteger[m][[All, 2]];
If[m > 1,
For[i = 1, i <= Length[F], i++,
t = t (F[[i]] + 1)];
];
Return[t]]
PROG
(Python)
from math import gcd
from sympy import divisor_count, factorint
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
CROSSREFS
Sequence in context: A318312 A318474 A326306 * A278525 A357531 A318476
KEYWORD
nonn
AUTHOR
Andy Niedermaier, Oct 03 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 13 23:31 EDT 2024. Contains 374290 sequences. (Running on oeis4.)