OFFSET
1,3
COMMENTS
LINKS
Ron Lifshitz, Theory of color symmetry for periodic and quasiperiodic crystals, Rev. Mod. Phys. 69, 1181 (1997). This sequence coincides with the row N = 12 of Table VII.
PROG
(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}
for( n=0, 500, isA155563(n) & print1(n", "))
(PARI) is(n)=(n==0) || (#bnfisintnorm(bnfinit(z^2+z+1), n) && #bnfisintnorm(bnfinit(z^2+1), n));
select(n->is(n), vector(1500, j, j-1)) \\ Joerg Arndt, Jan 11 2015
(Python)
from itertools import count, islice
from sympy import factorint
def A155563_gen(): # generator of terms
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))
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
M. F. Hasler, Jan 24 2009
STATUS
approved