A154777 Numbers of the form x^2 + 2*y^2 with positive integers x and y.
3, 6, 9, 11, 12, 17, 18, 19, 22, 24, 27, 33, 34, 36, 38, 41, 43, 44, 48, 51, 54, 57, 59, 66, 67, 68, 72, 73, 75, 76, 81, 82, 83, 86, 88, 89, 96, 97, 99, 102, 107, 108, 113, 114, 118, 121, 123, 129, 131, 132, 134, 136, 137, 139, 144, 146, 147, 150, 152, 153, 162, 163
Offset: 1
Examples
a(1) = 3 = 1^2 + 2*1^2 is the least number that can be written as A + 2B where A, B are positive squares. a(2) = 6 = 2^2 + 2*1^2 is the second smallest number that can be written in this way.
Links
- Zak Seidov, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
f[upto_]:=Module[{max=Ceiling[Sqrt[upto-1]]},Select[Union[ First[#]^2+ 2Last[#]^2&/@Tuples[Range[13],{2}]],#<=upto&]]; f[200] (* Harvey P. Dale, Jun 17 2011 *)
-
PARI
isA154777(n,/* use optional 2nd arg to get other analogous sequences */c=2) = { for( b=1,sqrtint((n-1)\c), issquare(n-c*b^2) & return(1))} for( n=1,200, isA154777(n) & print1(n","))
Comments