%I #14 Sep 20 2019 12:41:29
%S 7,10,15,22,25,28,31,33,40,42,49,55,58,60,63,70,73,79,87,88,90,97,100,
%T 103,105,106,112,118,121,124,127,132,135,145,150,151,154,159,160,166,
%U 168,175,177,186,193,196,198,199,202,214,217,220,223,225,231,232,240
%N Numbers of the form N = a^2 + 6b^2 for some positive integers a,b.
%C Subsequence of A002481 (which allows for a and b to be zero).
%C Primes are in A033199. - _Bernard Schott_, Sep 20 2019
%H David A. Corneth, <a href="/A155716/b155716.txt">Table of n, a(n) for n = 1..17743</a> (terms <= 10^5)
%t With[{upto=240},Select[Union[#[[1]]^2+6#[[2]]^2&/@Tuples[ Range[Sqrt[ upto]], 2]],#<=upto&]] (* _Harvey P. Dale_, Aug 05 2016 *)
%o (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))}
%o for( n=1,999, isA155716(n) & print1(n","))
%o (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
%Y Cf. A002481, A033199.
%Y Cf. A000404, A154777, A092572, A097268, A154778, A155707-A155717, A155560-A155578.
%K easy,nonn
%O 1,1
%A _M. F. Hasler_, Jan 25 2009