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.

A199770 Self-convolution with "addition" played by bitwise XOR.

This page as a plain text file.
%I A199770 #16 Jun 16 2018 17:44:47
%S A199770 1,0,2,6,18,50,146,426,1282,3810,11394,34082,102338,306658,919874,
%T A199770 2759154,8276898,24828386,74484386,223444258,670326242,2010964770,
%U A199770 6032902242,18098635298,54295809826,162887261410,488661978274,1465985458850,4397955924386
%N A199770 Self-convolution with "addition" played by bitwise XOR.
%H A199770 Reinhard Zumkeller, <a href="/A199770/b199770.txt">Table of n, a(n) for n = 1..1000</a>
%F A199770 a(1)=1, a(n) = sum ( a(i) XOR a(n-i), i = 1 .. n-1).
%p A199770 a:= proc(n) option remember; `if`(n=0, 1, add(
%p A199770       Bits[Xor](a(i), a(n-1-i)), i=0..n-1))
%p A199770     end:
%p A199770 seq(a(n), n=0..35);  # _Alois P. Heinz_, Jun 16 2018
%t A199770 a[1] = 1; a[n_] := a[n] = Sum[BitXor[a[i], a[n - i]], {i, 1, n - 1}]; Table[a[n], {n, 30}]
%o A199770 (Haskell)
%o A199770 import Data.Bits (xor)
%o A199770 a199770 n = a199770_list !! (n-1)
%o A199770 a199770_list = 1 : f [1] where
%o A199770    f xs = y : f (y : xs) where
%o A199770      y = sum $ zipWith xor xs $ reverse xs :: Integer
%o A199770 -- _Reinhard Zumkeller_, Jul 15 2012
%Y A199770 Cf. A000108 (Catalan numbers).
%Y A199770 Cf. A007462, A192484.
%K A199770 nonn,easy
%O A199770 1,3
%A A199770 _Jacob A. Siehler_, Nov 10 2011