A105029 Write numbers in binary under each other, left justified, read diagonals in downward direction, convert to decimal.
0, 2, 6, 5, 4, 14, 13, 8, 11, 10, 9, 12, 30, 29, 24, 19, 18, 17, 20, 23, 22, 21, 16, 27, 26, 25, 28, 62, 61, 56, 51, 34, 33, 36, 39, 38, 37, 32, 43, 42, 41, 44, 47, 46, 45, 40, 35, 50, 49, 52, 55, 54, 53, 48, 59, 58, 57, 60, 126, 125, 120, 115, 98, 65, 68, 71, 70
Offset: 0
Examples
0 1 1 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 and reading the diagonals downwards we get 0, 10, 110, 101, 100, 1110, 1101, etc.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
- David Applegate, Benoit Cloitre, Philippe Deléham and N. J. A. Sloane, Sloping binary numbers: a new sequence related to the binary numbers [pdf, ps].
- David Applegate, Benoit Cloitre, Philippe Deléham and N. J. A. Sloane, Sloping binary numbers: a new sequence related to the binary numbers, J. Integer Seq. 8 (2005), no. 3, Article 05.3.6, 15 pp.
- Index entries for sequences related to binary expansion of n
Crossrefs
Programs
-
Haskell
import Data.Bits ((.|.), (.&.)) a105029 n = foldl (.|.) 0 $ zipWith (.&.) a000079_list $ map (\x -> (len + 1 - a070939 x) * x) (reverse $ enumFromTo n (n - 1 + len)) where len = a103586 n -- Reinhard Zumkeller, Jul 21 2012
Comments