|
|
A155716
|
|
Numbers of the form N = a^2 + 6b^2 for some positive integers a,b.
|
|
20
|
|
|
7, 10, 15, 22, 25, 28, 31, 33, 40, 42, 49, 55, 58, 60, 63, 70, 73, 79, 87, 88, 90, 97, 100, 103, 105, 106, 112, 118, 121, 124, 127, 132, 135, 145, 150, 151, 154, 159, 160, 166, 168, 175, 177, 186, 193, 196, 198, 199, 202, 214, 217, 220, 223, 225, 231, 232, 240
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Subsequence of A002481 (which allows for a and b to be zero).
|
|
LINKS
|
|
|
MATHEMATICA
|
With[{upto=240}, Select[Union[#[[1]]^2+6#[[2]]^2&/@Tuples[ Range[Sqrt[ upto]], 2]], #<=upto&]] (* Harvey P. Dale, Aug 05 2016 *)
|
|
PROG
|
(PARI) isA155716(n, /* optional 2nd arg allows us to get other sequences */c=6) = { for(b=1, sqrtint((n-1)\c), issquare(n-c*b^2) & return(1))}
for( n=1, 999, isA155716(n) & print1(n", "))
(PARI) upto(n) = my(res=List()); for(i=1, sqrtint(n), for(j=1, sqrtint((n - i^2) \ 6), listput(res, i^2 + 6*j^2))); listsort(res, 1); res \\ David A. Corneth, Sep 18 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|