login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A155708 Numbers expressible as a^2 + k*b^2 with nonzero integers a,b, for k=2, k=3 and k=5. 2
36, 129, 144, 201, 241, 324, 409, 441, 489, 516, 576, 601, 769, 804, 849, 900, 921, 964, 1009, 1129, 1161, 1201, 1249, 1296, 1321, 1489, 1521, 1569, 1609, 1636, 1641, 1764, 1801, 1809, 1849, 1929, 1956, 2064, 2089, 2161, 2169, 2281, 2304, 2361, 2404, 2521 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
MAPLE
N:= 10000: # to get all terms <= N
S[2]:= {}: S[3]:= {}: S[5]:= {}:
for a from 1 to floor(sqrt(N)) do
for k in [2, 3, 5] do
S[k]:= S[k] union {seq(a^2 + k*b^2, b = 1 .. floor(sqrt((N-a^2)/k)))}
od
od:
R:= S[2] intersect S[3] intersect S[5]:
sort(convert(R, list)); # Robert Israel, Jul 11 2018
PROG
(PARI) isA155708(n, /* optional 2nd arg allows us to get other sequences */c=[5, 3, 2]) = { for(i=1, #c, for(b=1, sqrtint((n-1)\c[i]), issquare(n-c[i]*b^2) & next(2)); return); 1}
for(n=1, 9999, isA155708(n) & print1(n", "))
CROSSREFS
Sequence in context: A352316 A007265 A260130 * A196891 A105090 A254284
KEYWORD
nonn
AUTHOR
M. F. Hasler, Feb 10 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)