OFFSET
1,4
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
EXAMPLE
12*a(1) = 0 and 12*a(4) = 36 are the two integers of the form m^j (m=nonnegative integer, j = integer >= 2) made by multiplying earlier terms with 12. So a(12) = 2.
MATHEMATICA
f[l_List] := Append[l, Length[Select[(Length[l] + 1)*l, # == 0 || GCD @@ Last /@ FactorInteger[ # ] > 1 &]]]; Nest[f, {}, 100] (* Ray Chandler, Oct 29 2006 *)
PROG
(PARI)
up_to = 1001;
prepare_A124372(up_to) = { my(v = vector(up_to), c); v[1] = 0; v[2] = 1; for(n=3, up_to, c=1; for(k=2, n-1, c += (0<ispower(v[k]*n))); v[n] = c); (v); };
v124372 = prepare_A124372(up_to);
A124372(n) = v124372[n]; \\ Antti Karttunen, Jul 21 2018
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, Oct 27 2006
EXTENSIONS
Extended by Ray Chandler, Oct 29 2006
STATUS
approved