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.
%I A054240 #26 Mar 05 2024 16:32:52 %S A054240 0,1,1,2,4,2,3,3,3,3,4,6,8,6,4,5,5,9,9,5,5,6,16,6,12,6,16,6,7,7,7,7,7, %T A054240 7,7,7,8,18,12,18,16,18,12,18,8,9,9,13,13,17,17,13,13,9,9,10,12,10,24, %U A054240 18,20,18,24,10,12,10,11,11,11,11,19,19,19,19,11,11,11,11,12,14,32,14 %N A054240 Bit-interleaved number addition table; like binary addition but carries shift 2 instead of 1; addition base sqrt(2). %H A054240 Reinhard Zumkeller, <a href="/A054240/b054240.txt">Antidiagonals n=0..125 of square array, flattened</a> %F A054240 From _Peter Munn_, Dec 10 2019: (Start) %F A054240 A(m,0) = A(0,m) = m. %F A054240 A(n,k) = A(k,n). %F A054240 A(n, A(m,k)) = A(A(n,m), k). %F A054240 A(m,m) = 4*m. %F A054240 A(2*n, 2*k) = 2*A(n,k). %F A054240 A(A000695(n), A000695(k)) = A000695(n+k). %F A054240 A(A000695(n), 2*A000695(k)) = A000695(n) + 2*A000695(k). %F A054240 A(A000695(n) + 2*A000695(m), k) = A(A000695(n), k) + A(2*A000695(m), k) - k. %F A054240 A(A057300(n), A057300(k)) = A057300(A(n,k)). %F A054240 (End) %e A054240 T(3,1)=6 because (0*2 + 1*sqrt(2) + 1*1) + (0*2 + 0*sqrt(2) + 1*1) = (1*2 + 1*sqrt(2) + 0*1) (i.e., base sqrt(2) addition). %o A054240 (Haskell) %o A054240 import Data.Bits (xor, (.&.), shift) %o A054240 a054240 :: Integer -> Integer -> Integer %o A054240 a054240 x 0 = x %o A054240 a054240 x y = a054240 (x `xor` y) (shift (x .&. y) 2) %o A054240 a054240_adiag n = map (\k -> a054240 (n - k) k) [0..n] %o A054240 a054240_square = map a054240_adiag [0..] %o A054240 -- _Reinhard Zumkeller_, Dec 03 2011 %Y A054240 Cf. A000695, A054239, A057300, A062880, A352909 (pairs (i,j) such that A(i,j) = i+j). %Y A054240 Cf. A201651 (triangle read by rows). %K A054240 nonn,base,tabl,easy,look %O A054240 0,4 %A A054240 _Marc LeBrun_, Feb 07 2000