cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A216789 Table read by antidiagonals: T(n,k) is the digital sum of k in base n displayed in decimal.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

T(n,k) is the least number of powers of n that add up to k. - Mohammed Yaseen, Nov 12 2022

Examples

			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
		

Crossrefs

Programs

  • 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

Extensions

Name and offset corrected by Mohammed Yaseen, Nov 12 2022