login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A353816
a(n) = 1 if n is a number of the form x^2 + xy + y^2, otherwise 0.
4
1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0
OFFSET
0
COMMENTS
a(n) = 1 iff in the prime factorization of n, all primes == 2 (mod 3) occur to even powers.
FORMULA
a(n) = [A088534(n) > 0], where [ ] is the Iverson bracket.
a(n) >= A353815(n).
Multiplicative with a(p^e) = 0 if p == 2 (mod 3) and e is odd, and a(p^e) = 1 in all other cases. - Antti Karttunen, Jul 04 2024
PROG
(PARI) A353816(n) = if(!n, 1, my(f=factor(n), flag=1); for(i=1, #f~, if(Mod(f[i, 1], 3)==2 && Mod(f[i, 2], 2)==1, flag=0)); (flag)); \\ After function isA003136 in A003136.
(PARI) A353816(n) = if(!n, 1, my(f=factor(n)); prod(i=1, #f~, (2!=(f[i, 1]%3) || (1+f[i, 2])%2))); \\ Antti Karttunen, Jul 04 2024
CROSSREFS
Characteristic function of A003136.
Sequence in context: A278513 A134842 A167753 * A141727 A298952 A123594
KEYWORD
nonn,mult
AUTHOR
Antti Karttunen, May 15 2022
EXTENSIONS
Keyword:mult added by Antti Karttunen, Jul 04 2024
STATUS
approved