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!)
A155578 Intersection of A000404 and A155717: N = a^2 + b^2 = c^2 + 7*d^2 for some positive integers a,b,c,d. 14
8, 29, 32, 37, 53, 72, 109, 113, 116, 128, 137, 148, 149, 193, 197, 200, 212, 232, 233, 261, 277, 281, 288, 296, 317, 333, 337, 373, 389, 392, 400, 401, 421, 424, 436, 449, 452, 457, 464, 477, 512, 541, 548, 557, 569, 592, 596, 613, 617, 641, 648, 653, 673 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Subsequence of A155568 (where a,b,c,d may be zero).
LINKS
PROG
(PARI) isA155578(n, /* optional 2nd arg allows us to get other sequences */c=[7, 1]) = { 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, 999, isA155578(n) & print1(n", "))
(Python)
from math import isqrt
def aupto(limit):
cands = range(1, isqrt(limit)+1)
left = set(a**2 + b**2 for a in cands for b in cands)
right = set(c**2 + 7*d**2 for c in cands for d in cands)
return sorted(k for k in left & right if k <= limit)
print(aupto(673)) # Michael S. Branicky, Aug 29 2021
CROSSREFS
Sequence in context: A298290 A298490 A299183 * A115107 A298217 A299093
KEYWORD
easy,nonn
AUTHOR
M. F. Hasler, Jan 25 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 18 02:55 EDT 2024. Contains 371767 sequences. (Running on oeis4.)