OFFSET
0,3
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
M. Bernstein and N. J. A. Sloane, Some canonical sequences of integers, Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210. [Link to arXiv version]
M. Bernstein and N. J. A. Sloane, Some canonical sequences of integers, Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210. [Link to Lin. Alg. Applic. version together with omitted figures]
FORMULA
a(n) ~ c * 3^n, where c = 0.151273188266276362886260408769663538575624024971525940842364624... . - Vaclav Kotesovec, Sep 10 2014
MAPLE
with(Bits):
a:= proc(n) option remember;
`if`(n<2, n, add(Xor(a(i), a(n-1-i)), i=0..n-1))
end:
seq(a(n), n=0..30); # Alois P. Heinz, Jun 22 2012
MATHEMATICA
a[0]=0; a[1]=1; a[n_] := a[n] = Sum[BitXor[a[k], a[n-k-1]], {k, 0, n-1}]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Sep 07 2012, after Alois P. Heinz *)
PROG
(Haskell)
import Data.Bits (xor)
a007462 n = a007462_list !! n
a007462_list = 0 : 1 : f [1, 0] where
f xs = y : f (y : xs) where
y = sum $ zipWith xor xs $ reverse xs :: Integer
-- Reinhard Zumkeller, Jul 15 2012
CROSSREFS
KEYWORD
nonn,nice,eigen
AUTHOR
STATUS
approved