%I #21 May 11 2023 23:52:06
%S 1,1,2,1,3,3,3,3,1,4,4,5,4,4,4,5,4,5,4,5,4,4,4,8,1,5,4,6,5,5,5,8,5,5,
%T 5,1,6,6,6,10,6,6,6,7,7,6,6,17,1,8,7,8,7,11,7,11,7,7,7,8,7,7,8,9,7,7,
%U 7,8,7,7,7,5,7,7,8,8,7,7,7,18,11,7,7,8,7,7,7,11,7,8,7,8,7,7,7,19,7,8,8,1,8
%N a(1)=1. For n>1, a(n) = the number of terms (from among the first n-1 terms of the sequence) that are equal to at least one exponent in the prime factorization of n.
%H Katarzyna Matylla, <a href="/A125087/b125087.txt">Table of n, a(n) for n = 1..1000</a>
%e 12 = 2^2 * 3^1, So the exponents in the prime-factorization of 12 are 1 and 2. There are 4 terms that equal 1 among the first 11 terms of the sequence. (Those terms are a(1), a(2), a(4), a(9)). There is one term (a(3)) that equals 2. So a(12) = 4+1 = 5.
%e 14 = 2^1 * 7^1. So the only distinct exponent in the prime-factorization of 14 is 1. There are 4 terms from among the first 13 terms of the sequence that equal 1. So a(14) = 4.
%t f[l_List] :=Append[l, Length @Select[l, MemberQ[Last /@ FactorInteger[Length[l] + 1], # ] &]];Nest[f, {1}, 100] (* _Ray Chandler_, Nov 21 2006 *)
%o (Maxima) /* program from _Katarzyna Matylla_, Feb 19 2008: Variable max = how much terms we need. Generating 1000 terms took a few hours: */
%o "|"(a,b):= if b=0 then true else if a=0 then false else if (floor(b/a))=(b/a) then true else false;
%o max:1000;
%o infix("|");
%o deg(n,p):=if p<2 then 0 else block(d:0, loop, if ((p^(d+1))|n) then d:d+1 else go(end), go(loop), end, d);
%o f:makelist(0,i,1,max);
%o dg:makelist(0, i, 1, max);
%o f[1]:1;
%o for n:2 through max do block(for i:2 through n do dg[i]:deg(n,i),k:0, loop1, k:k+1, p:2, loop, if (f[k]=dg[p]) then block(f[n]:f[n]+1, p:n+1), if (p<=n) then p:next_prime(p), if (p<=n) then go(loop), if k<(n-1) then go(loop1));
%Y Cf. A125088.
%K nonn
%O 1,3
%A _Leroy Quet_, Nov 19 2006
%E Extended by _Ray Chandler_, Nov 21 2006