login
Numbers of form x^2 + 9 y^2.
3

%I #15 Sep 08 2022 08:44:45

%S 0,1,4,9,10,13,16,18,25,34,36,37,40,45,49,52,58,61,64,72,73,81,82,85,

%T 90,97,100,106,109,117,121,130,136,144,145,148,153,157,160,162,169,

%U 178,180,181,193,196,202,205,208,225,226,229,232,234,241,244,250,256,261,265,274

%N Numbers of form x^2 + 9 y^2.

%H Vincenzo Librandi, <a href="/A020672/b020672.txt">Table of n, a(n) for n = 1..9600</a>

%H N. J. A. Sloane et al., <a href="https://oeis.org/wiki/Binary_Quadratic_Forms_and_OEIS">Binary Quadratic Forms and OEIS</a> (Index to related sequences, programs, references)

%t lim=300; k=9; Union@Flatten@Table[x^2 + k y^2, {y, 0, Sqrt[lim/k]}, {x, 0, Sqrt[lim-k y^2]}] (* _Vincenzo Librandi_, Aug 31 2016 *)

%o (Magma) [n: n in [0..300] | NormEquation(9, n) eq true]; // _Vincenzo Librandi_, Aug 31 2016

%Y Primes: A068228.

%K easy,nonn

%O 1,3

%A _David W. Wilson_