A228423 Sum of the squared primes less than or equal to n.
0, 0, 0, 4, 4, 4, 4, 4, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87
Offset: 1
Keywords
Examples
a(10) = 13; 4 and 9 are the only squared primes less than or equal to 10 and their sum is 13.
Programs
-
Maple
with(numtheory); a:=n->add('if'(bigomega(i)=2, i*(1-mobius(i)), 0), i=1..n); seq(a(n), n=1..100);
-
Mathematica
With[{sp=Prime[Range[10]]^2},Table[Total[Select[sp,#<=n&]],{n,100}]] (* Harvey P. Dale, Nov 11 2016 *)
Formula
a(n) = Sum_{ i <= n | Omega(i) = 2} i * (1 - mu(i)).