OFFSET
1,2
EXAMPLE
a(3) = 7 since 3 XOR (3+1) = 3 XOR 4 = 7.
a(4) = 13 since 7 XOR (7+3) = 7 XOR 10 = 13.
a(5) = 25 since 13 XOR (13+7) = 13 XOR 20 = 25.
The binary expansions of a(n) form a triangle (listed with ones place in leftmost column):
1,
1,1,
1,1,1,
1,0,1,1,
1,0,0,1,1,
1,1,1,1,1,1,
1,1,1,0,0,1,1,
1,0,0,0,0,0,1,1,
1,0,0,1,0,1,1,1,1,
1,1,0,0,0,0,1,0,1,1,
1,1,1,1,0,1,1,0,0,1,1,
1,0,1,1,1,0,1,1,1,1,1,1,...
PROG
(PARI) a(n)=if(n==1, 1, if(n==2, 3, bitxor(a(n-1), a(n-1)+a(n-2))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Oct 26 2004
STATUS
approved