OFFSET
1,1
COMMENTS
Subsequence of A002481 (which allows for a and b to be zero).
Primes are in A033199. - Bernard Schott, Sep 20 2019
LINKS
David A. Corneth, Table of n, a(n) for n = 1..17743 (terms <= 10^5)
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
M. F. Hasler, Jan 25 2009
STATUS
approved