OFFSET
1,3
COMMENTS
LINKS
J. Lambek and L. Moser, On some two way classifications of integers, Can. Math. Bull 2 (1959) 85-89.
FORMULA
We have
a(4n+1) = -a(2n)+a(2n+1)+a(4n)
a(4n+2) = a(2n)+a(2n+1)
a(8n) = 3a(2n)+a(2n+1)
a(8n+3) = 3a(2n)+a(2n+1)-a(4n)+a(4n+3)
a(8n+4) = a(2n+1)+a(4n)
a(8n+7) = 4a(2n+1),
which provides a fast algorithm to compute a(n).
EXAMPLE
For n = 19 the only solutions are (i,j) in {(9,10), (10,9)}, so a(19) = 2.
CROSSREFS
KEYWORD
nonn
AUTHOR
Jeffrey Shallit, Apr 18 2020
STATUS
approved