Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #15 May 09 2017 17:38:24
%S 2,3,4,2,6,5,4,3,14,7,4,4,6,5,10,2,6,15,4,6,32,5,4,5,20,7,58,4,6,11,4,
%T 3,32,7,10,14,6,5,10,7,6,33,4,4,24,5,4,4,14,21,10,6,6,59,10,5,32,7,4,
%U 10,6,5,134,2,42,33,4,6,32,11,4,15,6,7,28,4,32,11,4,6,242,7,4,32,42,5,10,5,6,25,10,4,32,5,10,5,6,15,134,20,6,11,4,7,46,7
%N Compound filter: a(n) = 2*A286364(n) + A000035(A007814(n)).
%C This sequence contains, in addition to the information contained in A286364 (which packs the values of A286361(n) and A286363(n) to a single value with the pairing function A000027) also information whether the exponent of the highest power of 2 dividing n is even or odd, which is stored in the least significant bit of a(n). Thus, for example, all squares (A000290) can be obtained by listing such numbers n that a(n) is even and both A002260(a(n)/2) & A004736(a(n)/2) are perfect squares.
%H Antti Karttunen, <a href="/A286365/b286365.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = (2*A286364(n)) + (1 - A035263(n)) = 2*A286364(n) + A000035(A007814(n)).
%o (Scheme) (define (A286365 n) (+ (* 2 (A286364 n)) (A000035 (A007814 n))))
%o (Python)
%o from sympy import factorint
%o from operator import mul
%o def P(n):
%o f = factorint(n)
%o return sorted([f[i] for i in f])
%o def a046523(n):
%o x=1
%o while True:
%o if P(n) == P(x): return x
%o else: x+=1
%o def A(n, k):
%o f = factorint(n)
%o return 1 if n == 1 else reduce(mul, [1 if i%4==k else i**f[i] for i in f])
%o def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
%o def a286364(n): return T(a046523(n/A(n, 1)), a046523(n/A(n, 3)))
%o def a007814(n): return 1 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
%o def a(n): return 2*a286364(n) + a007814(n)%2 # _Indranil Ghosh_, May 09 2017
%Y Cf. A000035, A007814, A035263, A286361, A286362, A286363, A286364, A286369.
%Y Cf. A286366, A286367 (similar, but contain more information).
%K nonn
%O 1,1
%A _Antti Karttunen_, May 08 2017