login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) is the number of earlier terms a(k) such that a(k)*n is of the form m^j, m = integer >= 0, j = integer >= 2.
2

%I #13 Jul 21 2018 15:52:59

%S 0,1,1,3,1,1,1,6,7,1,1,2,1,1,1,12,1,3,1,1,1,1,1,2,17,1,21,2,1,1,1,24,

%T 1,1,1,25,1,1,1,2,1,1,1,1,1,1,1,4,37,5,1,1,1,4,1,1,1,1,1,1,1,1,2,53,1,

%U 1,1,2,1,1,1,10,1,1,4,1,1,1,1,2,63,1,1,2,1,1,1,1,1,2,1,1,1,1,1,3,1,10,1,77

%N a(n) is the number of earlier terms a(k) such that a(k)*n is of the form m^j, m = integer >= 0, j = integer >= 2.

%H Antti Karttunen, <a href="/A124372/b124372.txt">Table of n, a(n) for n = 1..65537</a>

%e 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.

%t f[l_List] := Append[l, Length[Select[(Length[l] + 1)*l, # == 0 || GCD @@ Last /@ FactorInteger[ # ] > 1 &]]];Nest[f, {}, 100] (* _Ray Chandler_, Oct 29 2006 *)

%o (PARI)

%o up_to = 1001;

%o 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); };

%o v124372 = prepare_A124372(up_to);

%o A124372(n) = v124372[n]; \\ _Antti Karttunen_, Jul 21 2018

%Y Cf. A124371.

%K easy,nonn

%O 1,4

%A _Leroy Quet_, Oct 27 2006

%E Extended by _Ray Chandler_, Oct 29 2006