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.

A201651 Bit-interleaved number addition table (cf. A054240) as triangle read by rows: T(n,k) = n and k added in binary representation, where carries shift 2 instead of 1, 0 <= k <= n.

This page as a plain text file.
%I A201651 #12 Jul 13 2013 12:04:19
%S A201651 0,1,4,2,3,8,3,6,9,12,4,5,6,7,16,5,16,7,18,17,20,6,7,12,13,18,19,24,7,
%T A201651 18,13,24,19,22,25,28,8,9,10,11,12,13,14,15,32,9,12,11,14,13,24,15,26,
%U A201651 33,36,10,11,32,33,14,15,36,37,34,35,40,11,14,33,36
%N A201651 Bit-interleaved number addition table (cf. A054240) as triangle read by rows: T(n,k) = n and k added in binary representation, where carries shift 2 instead of 1, 0 <= k <= n.
%H A201651 Reinhard Zumkeller, <a href="/A201651/b201651.txt">Table of n, a(n) for n = 0..8000</a>
%e A201651 Triangle begins
%e A201651 0;
%e A201651 1, 4;
%e A201651 2, 3, 8;
%e A201651 3, 6, 9, 12;
%e A201651 4, 5, 6, 7, 16;
%o A201651 (Haskell)
%o A201651 import Data.Bits (xor, (.&.), shift)
%o A201651 a201651 :: Integer -> Integer -> Integer
%o A201651 a201651 n 0 = n
%o A201651 a201651 n k = a054240 (n `xor` k) (shift (n .&. k) 2)
%o A201651 a201651_row n = map (a054240 n) [0..n]
%o A201651 a201651_tabl = map a201651_row [0..]
%Y A201651 Cf. A054240 (square array read by antidiagonals).
%K A201651 nonn,tabl
%O A201651 0,3
%A A201651 _Reinhard Zumkeller_, Dec 03 2011