A155562 Intersection of A001481 and A002479: N = a^2 + b^2 = c^2 + 2d^2 for some integers a,b,c,d.
0, 1, 2, 4, 8, 9, 16, 17, 18, 25, 32, 34, 36, 41, 49, 50, 64, 68, 72, 73, 81, 82, 89, 97, 98, 100, 113, 121, 128, 136, 137, 144, 146, 153, 162, 164, 169, 178, 193, 194, 196, 200, 225, 226, 233, 241, 242, 256, 257, 272, 274, 281, 288, 289, 292, 306, 313, 324, 328
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
- Andrew D. Ionaşcu, Intersecting semi-disks and the synergy of three quadratic forms, An. Şt. Univ. Ovidius Constantą, (2019) Vol. 27, Issue 2, 5-13.
Programs
-
PARI
isA155562(n,/* use optional 2nd arg to get other analogous sequences */c=[2,1]) = { for(i=1,#c, for(b=0,sqrtint(n\c[i]), issquare(n-c[i]*b^2) & next(2)); return);1} for( n=1,500, isA155562(n) & print1(n","))
-
Python
from itertools import count, islice from sympy import factorint def A155562_gen(): # generator of terms return filter(lambda n:all((p & 3 != 3 and p & 7 < 5) or e & 1 == 0 for p, e in factorint(n).items()),count(0)) A155562_list = list(islice(A155562_gen(),30)) # Chai Wah Wu, Jun 27 2022
Comments