OFFSET
1,8
COMMENTS
The only place where the two sequences differ is a(0) which is 1 for the odds and 0 for the evens.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
IBM Ponder This, Feb. 2001
Y.-G. Chen and B. Wang, On additive properties of two special sequences, Acta Arith. 110 (3) (2003), 299-303.
EXAMPLE
a(16)=3 since 16=2+14=5+11=8+8 (in binary 10+1110=101+1011=1000+1000 where each term has an odd number of zeros) and since 16=1+15=4+12=7+9 (in binary 1+1111=100+1100=111+1001 where each term has an even number of zeros).
MAPLE
N:= 100: # for a(1)..a(N)
T:= select(t -> numboccur(0, convert(t, base, 2))::even, {$0..N}):
f:= proc(n) nops(map(t -> n-t, T intersect {$0..n/2}) intersect T) end proc:
map(f, [$1..N]); # Robert Israel, Nov 28 2024
PROG
(Python)
def c(n): return (n.bit_length() - n.bit_count())&1 == 0
def a(n): return sum(1 for i in range(1, n//2+1) if c(i) and c(n-i))
print([a(n) for n in range(1, 96)]) # Michael S. Branicky, Dec 02 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Henry Bottomley, Feb 02 2001
STATUS
approved