login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A080080 T(n,k) = length of longest carry sequence when adding k to n in binary representation, 1 <= k <= n (triangular array). 4
1, 0, 1, 2, 1, 1, 0, 0, 0, 1, 1, 0, 3, 1, 1, 0, 2, 2, 1, 1, 1, 3, 2, 2, 1, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 2, 0, 1, 0, 4, 1, 1, 0, 1, 1, 0, 0, 3, 3, 1, 1, 1, 2, 1, 1, 0, 4, 3, 3, 1, 2, 1, 1, 0, 0, 0, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 0, 4, 2, 2, 2, 2, 1, 1, 1, 3, 1, 1, 0, 3, 3, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

1,4

COMMENTS

T(n,1) = A007814(n+1), T(n,n) = 1; for n>1: T(n,n-1) = A043545(n+1); T(n,k) <= A070940(n) = T(n, A080079(n)).

T(n,k) = A050600(n+k,k) - 1. - Reinhard Zumkeller, Aug 03 2014

LINKS

Reinhard Zumkeller, Rows n=1..150 of triangle, flattened

Index entries for sequences related to binary expansion of n

EXAMPLE

Triangle begins:

              1

            0   1

          2   1   1

        0   0   0   1

      1   0   3   1   1

    0   2   2   1   1   1

  3   2   2   1   2   1   1

PROG

(Haskell)

import Data.Bits (xor, (.&.), shiftL)

a080080 :: Int -> Int -> Int

a080080 n k = addc n k 0 where

   addc x y z | y == 0    = z - 1

              | otherwise = addc (x `xor` y) (shiftL (x .&. y) 1) (z + 1)

a080080_row n = map (a080080 n) [1..n]

a080080_tabl = map a080080_row [1..]

-- Reinhard Zumkeller, Apr 22 2013

CROSSREFS

Cf. A050600.

Sequence in context: A079677 A286564 A316359 * A093662 A284256 A250211

Adjacent sequences:  A080077 A080078 A080079 * A080081 A080082 A080083

KEYWORD

nonn,tabl,nice

AUTHOR

Reinhard Zumkeller, Jan 26 2003

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 15 20:24 EDT 2019. Contains 325056 sequences. (Running on oeis4.)