A216579 Number of positive integer solutions to the equation a^2 + 10*b^2 = n.
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2
Offset: 1
Keywords
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
a[ n_] := If[ n < 1, 0, Length@Select[ Range@Sqrt[ n/10], IntegerQ@Sqrt[ n - 10 #] &]]; (* Michael Somos, Jan 10 2015 *)
-
PARI
a(n)=sum(b=1,sqrtint((n-1)\10),issquare(n-10*b^2)) \\ Charles R Greathouse IV, Nov 19 2014