cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A192484 Shifts left under XOR-convolution: a(n) = Sum_{k=0..n-1} a(k) XOR a(n-k-1) for n>1 with a(0)=1, a(1)=2.

Original entry on oeis.org

1, 2, 6, 14, 38, 102, 294, 854, 2566, 7622, 22790, 68166, 204678, 613318, 1839750, 5518310, 16553798, 49656774, 148968774, 446888518, 1340652486, 4021929542, 12065804486, 36197270598, 108591619654, 325774522822, 977323956550
Offset: 0

Views

Author

Paul D. Hanna, Jul 02 2011

Keywords

Comments

Limit a(n+1)/a(n) = 3.

Examples

			Given a(0)=1, a(1)=2, illustrate XOR convolution for the initial terms.
a(2) = 1 XOR 2 + 2 XOR 1 = 3 + 3 = 6;
a(3) = 1 XOR 6 + 2 XOR 2 + 6 XOR 1 = 7 + 0 + 7 = 14;
a(4) = 1 XOR 14 + 2 XOR 6 + 6 XOR 2 + 14 XOR 1 = 15 + 4 + 4 + 15 = 38; ...
		

Crossrefs

Cf. variant: A007462.
Cf. A199770.

Programs

  • Haskell
    import Data.Bits (xor)
    a192484 n = a192484_list !! n
    a192484_list = 1 : 2 : f [2,1] where
       f xs = y : f (y : xs) where
         y = sum $ zipWith xor xs $ reverse xs :: Integer
    -- Reinhard Zumkeller, Jul 15 2012
  • PARI
    {a(n)=if(n<2,n+1,sum(k=0,n-1,bitxor(a(k),a(n-k-1))))}