login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 4

%I #11 Jul 13 2013 12:04:12

%S 1,2,6,14,38,102,294,854,2566,7622,22790,68166,204678,613318,1839750,

%T 5518310,16553798,49656774,148968774,446888518,1340652486,4021929542,

%U 12065804486,36197270598,108591619654,325774522822,977323956550

%N 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.

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

%H Reinhard Zumkeller, <a href="/A192484/b192484.txt">Table of n, a(n) for n = 0..1000</a>

%e Given a(0)=1, a(1)=2, illustrate XOR convolution for the initial terms.

%e a(2) = 1 XOR 2 + 2 XOR 1 = 3 + 3 = 6;

%e a(3) = 1 XOR 6 + 2 XOR 2 + 6 XOR 1 = 7 + 0 + 7 = 14;

%e a(4) = 1 XOR 14 + 2 XOR 6 + 6 XOR 2 + 14 XOR 1 = 15 + 4 + 4 + 15 = 38; ...

%o (PARI) {a(n)=if(n<2,n+1,sum(k=0,n-1,bitxor(a(k),a(n-k-1))))}

%o (Haskell)

%o import Data.Bits (xor)

%o a192484 n = a192484_list !! n

%o a192484_list = 1 : 2 : f [2,1] where

%o f xs = y : f (y : xs) where

%o y = sum $ zipWith xor xs $ reverse xs :: Integer

%o -- _Reinhard Zumkeller_, Jul 15 2012

%Y Cf. variant: A007462.

%Y Cf. A199770.

%K nonn

%O 0,2

%A _Paul D. Hanna_, Jul 02 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 02:23 EDT 2024. Contains 371264 sequences. (Running on oeis4.)