OFFSET
0,2
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 0..1000
EXAMPLE
a(1) = #{1,2,4} = 3 = number of binary powers <= 4;
a(2) = #{1,2,3,4,6,8,9} = 7 = number of 3-smooth numbers <= 9;
a(3) = #{1,2,3,4,5,6,8,9,10,12,15,16,18,20,24,25} = 16 = number of 5-smooth numbers <= 25.
MATHEMATICA
Block[{nn = 45, w}, w = Array[FactorInteger[#][[All, 1]] &, Prime[nn]^2]; {1}~Join~Table[Count[w[[1 ;; p^2]], _?(AllTrue[#, # <= p &] &)], {p, Prime@ Range@ nn}]] (* Michael De Vlieger, Mar 13 2021 *)
PROG
(PARI) a(n)=if(n==0, return(1)); my(p=prime(n), s=p); forfactored(k=p+1, p^2, if(vecmax(k[2][, 1])<=p, s++)); s \\ Charles R Greathouse IV, Nov 27 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jun 27 2011
STATUS
approved