login
Has both a primitive and imprimitive representation as x^2 + xy + y^2.
6

%I #14 Mar 08 2020 03:36:31

%S 49,147,169,343,361,507,637,931,961,1029,1083,1183,1369,1519,1813,

%T 1849,1911,2107,2197,2401,2527,2793,2883,2989,3211,3283,3549,3577,

%U 3721,3871,4107,4459,4489,4557,4693,4753,5047,5239,5329,5341,5439,5547,6223,6241

%N Has both a primitive and imprimitive representation as x^2 + xy + y^2.

%H Charles R Greathouse IV, <a href="/A045897/b045897.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Aa#A2">Index entries for sequences related to A2 = hexagonal = triangular lattice</a>

%e 49 = 7^2 = 5^2 + 5*3 + 3^2.

%o (PARI) is(n)=my(f=factor(n), t); for(i=1, #f~, if(f[i, 1]%3!=1 && (f[i, 1]!=3 || f[i, 2]>1), return(0)); if(f[i, 1]%3<2 && f[i, 2]>1, t=1); if(f[i, 1]%3==2, if(f[i, 2]%2, return(0), t=1))); t \\ _Charles R Greathouse IV_, Nov 04 2015

%Y Intersection of A034017 and A034019.

%Y Cf. A004611, A003136.

%K nonn

%O 1,1

%A _N. J. A. Sloane_

%E Extended by _Ray Chandler_, Jan 29 2009