The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A240236 Triangle read by rows: sum of digits of n in base k, for 2<=k<=n. 7
 1, 2, 1, 1, 2, 1, 2, 3, 2, 1, 2, 2, 3, 2, 1, 3, 3, 4, 3, 2, 1, 1, 4, 2, 4, 3, 2, 1, 2, 1, 3, 5, 4, 3, 2, 1, 2, 2, 4, 2, 5, 4, 3, 2, 1, 3, 3, 5, 3, 6, 5, 4, 3, 2, 1, 2, 2, 3, 4, 2, 6, 5, 4, 3, 2, 1, 3, 3, 4, 5, 3, 7, 6, 5, 4, 3, 2, 1, 3, 4, 5, 6, 4, 2, 7, 6, 5, 4, 3, 2, 1 (list; table; graph; refs; listen; history; text; internal format)
 OFFSET 2,2 LINKS Reinhard Zumkeller, Rows n = 2..100 of triangle, flattened EXAMPLE Table starts: 1 2 1 1 2 1 2 3 2 1 2 2 3 2 1 3 3 4 3 2 1 PROG (PARI) T(n, k) = local(r=0); if(k<2, -1, while(n>0, r+=n%k; n\=k); r) (Haskell) a240236 n k = a240236_tabl !! (n-1) !! (k-1) a240236_row n = a240236_tabl !! (n-1) a240236_tabl = zipWith (map . flip q) [2..] (map tail \$ tail a002260_tabl) where q b n = if n < b then n else q b n' + d where (n', d) = divMod n b -- Reinhard Zumkeller, Apr 29 2015 CROSSREFS Row sums give A043306. Cf. A000120, A053735, A053737, A007953. See A138530 for another version. Cf. A002260. Sequence in context: A025837 A111317 A105202 * A356606 A099386 A161067 Adjacent sequences: A240233 A240234 A240235 * A240237 A240238 A240239 KEYWORD nonn,tabl,base AUTHOR Franklin T. Adams-Watters, Apr 02 2014 STATUS approved

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

Last modified March 5 05:45 EST 2024. Contains 370537 sequences. (Running on oeis4.)