OFFSET
0,10
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..10000
FORMULA
If n < 3, a(n) = 0; thereafter, for any even n: a(n) = a(n/2), for any n with its smallest prime factor (A020639) of the form 4k+1: a(n) = a(A032742(n)), otherwise [when A020639(n) is of the form 4k+3] a(n) = A003986(A067029(n),a(A028234(n))).
Other identities. For all n >= 0:
A229062(n) = 1 - A000035(a(n)). [Reduced modulo 2 and complemented, the sequence gives the characteristic function of A001481.]
a(n) = a(A097706(n)). [The result depends only on the prime factors of the form 4k+3.]
EXAMPLE
MATHEMATICA
Table[BitOr @@ (Map[Last, FactorInteger@ n /. {p_, _} /; MemberQ[{0, 1, 2}, Mod[p, 4]] -> Nothing]), {n, 0, 120}] (* Michael De Vlieger, Feb 07 2016 *)
PROG
(Scheme) (define (A260728 n) (cond ((< n 3) 0) ((even? n) (A260728 (/ n 2))) ((= 1 (modulo (A020639 n) 4)) (A260728 (A032742 n))) (else (A003986bi (A067029 n) (A260728 (A028234 n)))))) ;; A003986bi implements bitwise-or (see A003986).
(Python)
from functools import reduce
from operator import or_
from sympy import factorint
def A260728(n): return reduce(or_, (e for p, e in factorint(n).items() if p & 3 == 3), 0) # Chai Wah Wu, Jun 28 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 12 2015
STATUS
approved