|
| |
|
|
A054240
|
|
Bit-interleaved number addition table; like binary addition but carries shift 2 instead of 1; addition base sqrt(2).
|
|
3
| |
|
|
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, 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, 18, 20, 18, 24, 10, 12, 10, 11, 11, 11, 11, 19, 19, 19, 19, 11, 11, 11, 11, 12, 14, 32, 14
(list; table; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 0,4
|
|
|
LINKS
| Reinhard Zumkeller, Antidiagonals n=0..125 of square array, flattened
|
|
|
EXAMPLE
| a(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)
|
|
|
PROG
| (Haskell)
import Data.Bits (xor, (.&.), shift)
a054240 :: Integer -> Integer -> Integer
a054240 x 0 = x
a054240 x y = a054240 (x `xor` y) (shift (x .&. y) 2)
a054240_adiag n = map (\k -> a054240 (n - k) k) [0..n]
a054240_square = map a054240_adiag [0..]
-- Reinhard Zumkeller, Dec 03 2011
|
|
|
CROSSREFS
| Cf. A054239.
Cf. A201651 (triangle read by rows).
Sequence in context: A055097 A054507 A182742 * A182817 A082864 A134447
Adjacent sequences: A054237 A054238 A054239 * A054241 A054242 A054243
|
|
|
KEYWORD
| easy,nonn,tabl
|
|
|
AUTHOR
| Marc LeBrun (mlb(AT)well.com), Feb 07 2000
|
| |
|
|