login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A045897
Has both a primitive and imprimitive representation as x^2 + xy + y^2.
6
49, 147, 169, 343, 361, 507, 637, 931, 961, 1029, 1083, 1183, 1369, 1519, 1813, 1849, 1911, 2107, 2197, 2401, 2527, 2793, 2883, 2989, 3211, 3283, 3549, 3577, 3721, 3871, 4107, 4459, 4489, 4557, 4693, 4753, 5047, 5239, 5329, 5341, 5439, 5547, 6223, 6241
OFFSET
1,1
EXAMPLE
49 = 7^2 = 5^2 + 5*3 + 3^2.
PROG
(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
CROSSREFS
Intersection of A034017 and A034019.
Sequence in context: A087354 A098442 A088535 * A162942 A027469 A044381
KEYWORD
nonn
EXTENSIONS
Extended by Ray Chandler, Jan 29 2009
STATUS
approved