A135592 a(1)=1; for n > 1, a(n) is number of earlier terms equal to number of prime divisors of n.
1, 1, 2, 2, 2, 3, 2, 2, 2, 6, 2, 7, 2, 8, 8, 2, 2, 10, 2, 11, 11, 11, 2, 12, 2, 13, 2, 14, 2, 1, 3, 3, 15, 15, 15, 15, 3, 15, 15, 15, 3, 5, 3, 15, 15, 15, 3, 15, 3, 15, 15, 15, 3, 15, 15, 15, 15, 15, 3, 10, 3, 15, 15, 3, 15, 12, 3, 15, 15, 13, 3, 15, 3, 15, 15, 15, 15, 15, 3, 15, 3, 15, 3, 18
Offset: 1
Keywords
Examples
a(12)=7 because 12 has 2 prime divisors (2 and 3) and there are 7 2's in a(1), a(2), ..., a(11).
Links
- Katarzyna Matylla, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
s={1};Do[AppendTo[s,Count[s,PrimeNu[n]]],{n,2,84}];s (* James C. McMahon, Apr 16 2025 *)
-
Maxima
max:1000; f:makelist(0,i,1,max); apr:makelist(0, i, 1, max); f[1]:1; apr[2]:1; print(1,1); for n:2 through max do block(f[n]:apr[length(ifactors(n))+1], apr[f[n]+1]:apr[f[n]+1]+1);
Comments