login
Intersection of A001481 and A003136: N = a^2 + b^2 = c^2 + 3d^2 for some integers a,b,c,d.
1

%I #21 Jun 27 2022 11:13:43

%S 0,1,4,9,13,16,25,36,37,49,52,61,64,73,81,97,100,109,117,121,144,148,

%T 157,169,181,193,196,208,225,229,241,244,256,277,289,292,313,324,325,

%U 333,337,349,361,373,388,397,400,409,421,433,436,441,457,468,481,484

%N Intersection of A001481 and A003136: N = a^2 + b^2 = c^2 + 3d^2 for some integers a,b,c,d.

%C Contains A155561 as a subsequence (obtained by restricting a,b,c,d to be nonzero). Also contains A000290 (squares) as subsequence.

%H Ron Lifshitz, <a href="https://doi.org/10.1103/RevModPhys.69.1181">Theory of color symmetry for periodic and quasiperiodic crystals</a>, Rev. Mod. Phys. 69, 1181 (1997). This sequence coincides with the row N = 12 of Table VII.

%o (PARI) isA155563(n,/* use optional 2nd arg to get other analogous sequences */c=[3,1]) = { for(i=1,#c, for(b=0,sqrtint(n\c[i]), issquare(n-c[i]*b^2) & next(2)); return);1}

%o for( n=0,500, isA155563(n) & print1(n","))

%o (PARI) is(n)=(n==0) || (#bnfisintnorm(bnfinit(z^2+z+1), n) && #bnfisintnorm(bnfinit(z^2+1), n));

%o select(n->is(n), vector(1500,j,j-1)) \\ _Joerg Arndt_, Jan 11 2015

%o (Python)

%o from itertools import count, islice

%o from sympy import factorint

%o def A155563_gen(): # generator of terms

%o return filter(lambda n: all(e & 1 == 0 or (p & 3 != 3 and p % 3 < 2) for p, e in factorint(n).items()),count(0))

%o A155563_list = list(islice(A155563_gen(),30)) # _Chai Wah Wu_, Jun 27 2022

%Y Cf. A000290, A001481, A003136, A155561.

%K easy,nonn

%O 1,3

%A _M. F. Hasler_, Jan 24 2009