%I #21 Apr 01 2021 14:43:27
%S 1,1,2,2,2,2,2,0,10,2,2,16,2,2,2,0,2,24,2,26,2,2,2,2,32,2,0,36,2,2,2,
%T 0,2,2,2,46,2,2,2,2,2,2,2,62,62,2,2,2,66,68,2,70,2,2,2,2,2,2,2,84,2,2,
%U 88,0,2,2,2,94,2,2,2,98,2,2,104,104,2,2,2,2,0,2,2,116,2,2,2,2,2,126,2,128
%N a(1)=1. a(n) = sum of the earlier terms equal to any exponent in the prime-factorization of n.
%C From _Robert G. Wilson v_, Nov 22 2006: (Start)
%C Only a(1) and a(2) are odd. a(n)=0 for n>1 in A036966.
%C Only possible values: ..., 0, 1, 2, 10, 16, 24, 26, 32, 36, 46, 62, 66, 68, 70, 84, 88, 94, 98, 104, ..., .
%C Position of first occurrence: 8, 1, 3, 9, 12, 18, 20, 25, 28, 36, 44, 49, 50, 52, 60, 63, 68, 72, 75, ..., .
%C (End)
%H Antti Karttunen, <a href="/A125088/b125088.txt">Table of n, a(n) for n = 1..16384</a>
%e 12 has a prime factorization of 2^2 *3^1. So a(12) is the sum of the terms among the first 11 terms of the sequence which equal 1 or 2. There are seven 2's and two 1's among the first 11 terms; so a(12) = 1+1+2+2+2+2+2+2+2 = 16.
%t f[l_List] := Append[l, Plus @@ Select[l, MemberQ[Last /@ FactorInteger[Length[l] + 1], # ] &]];Nest[f, {1}, 91] (* _Ray Chandler_, Nov 21 2006 *)
%t a[1] = 1; a[n_] := a[n] = Plus @@ Flatten[ Cases[ Array[a, n - 1], # ] & /@ Union@ Last@ Transpose@ FactorInteger@n]; Array[a, 92] (* _Robert G. Wilson v_, Nov 22 2006 *)
%o (PARI)
%o up_to = 105;
%o A125088list(up_to) = { my(v=vector(up_to)); v[1] = 1; for(n=2,up_to,my(es = vecsort(factor(n)[,2],,8)); v[n] = sum(k=1,n-1,v[k]*!!vecsearch(es,v[k]))); (v); };
%o v125088 = A125088list(up_to);
%o A125088(n) = v125088[n]; \\ _Antti Karttunen_, Apr 01 2021
%Y Cf. A125087.
%K nonn
%O 1,3
%A _Leroy Quet_, Nov 19 2006
%E Extended by _Ray Chandler_, Nov 21 2006