login
A184677
Number of numbers <= p^2 with largest prime factor <= p, where p is the n-th prime; a(0) = 1.
2
1, 3, 7, 16, 30, 61, 88, 138, 177, 248, 361, 423, 569, 690, 777, 924, 1137, 1370, 1495, 1765, 1979, 2129, 2452, 2711, 3075, 3563, 3871, 4078, 4412, 4639, 4996, 6027, 6427, 6988, 7272, 8181, 8494, 9135, 9803, 10320, 11031, 11768, 12140, 13315, 13713, 14330
OFFSET
0,2
COMMENTS
a(n) = #{m: m<=A001248(n) and A006530(m)<=A000040(n)} for n > 0.
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