login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A216789
Table read by antidiagonals: T(n,k) is the digital sum of k in base n displayed in decimal.
5
0, 0, 1, 0, 1, 1, 0, 1, 2, 2, 0, 1, 2, 1, 1, 0, 1, 2, 3, 2, 2, 0, 1, 2, 3, 1, 3, 2, 0, 1, 2, 3, 4, 2, 2, 3, 0, 1, 2, 3, 4, 1, 3, 3, 1, 0, 1, 2, 3, 4, 5, 2, 4, 4, 2, 0, 1, 2, 3, 4, 5, 1, 3, 2, 1, 2, 0, 1, 2, 3, 4, 5, 6, 2, 4, 3, 2, 3
OFFSET
2,9
COMMENTS
T(n,k) is the least number of powers of n that add up to k. - Mohammed Yaseen, Nov 12 2022
LINKS
Robert Israel, Table of n, a(n) for n = 2..10012 (indices corrected to start at 2 by Sidney Cadot, Jan 07 2023)
Eric Weisstein's World of Mathematics, Digit Sum
Wikipedia, Digit sum
EXAMPLE
A000120 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2
A053735 0, 1, 2, 1, 2, 3, 2, 3, 4, 1, 2, 3, 2, 3, 4, 3, 4, 5, 2
A053737 0, 1, 2, 3, 1, 2, 3, 4, 2, 3, 4, 5, 3, 4, 5, 6, 1, 2, 3
A053824 0, 1, 2, 3, 4, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 6
A053827 0, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 2, 3, 4, 5, 6, 7, 3
A053828 0, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 7, 2, 3, 4, 5, 6
A053829 0, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 8, 2, 3, 4
A053830 0, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 9, 2
A007953 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9
A053831 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8
A053832 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1, 2, 3, 4, 5, 6, 7
A053833 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6
A053834 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1, 2, 3, 4, 5
A053835 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 1, 2, 3, 4
A053836 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1, 2, 3
MAPLE
[seq(seq(convert(convert(n-b, base, b), `+`), b=n..2, -1), n=1..15)]; # Robert Israel, Aug 02 2020
MATHEMATICA
DigitSum[n_, b_: 10] := Total[IntegerDigits[n, b]]; Table[ DigitSum[n - b, b], {n, 2, 13}, {b, n, 2, -1}] // Flatten
KEYWORD
base,nonn,tabl
AUTHOR
EXTENSIONS
Name and offset corrected by Mohammed Yaseen, Nov 12 2022
STATUS
approved