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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A356517 Square array A(n, k), n >= 2, k >= 0, read by antidiagonals upwards; A(n, k) is the least integer with sum of digits k in base n. 2
0, 0, 1, 0, 1, 3, 0, 1, 2, 7, 0, 1, 2, 5, 15, 0, 1, 2, 3, 8, 31, 0, 1, 2, 3, 7, 17, 63, 0, 1, 2, 3, 4, 11, 26, 127, 0, 1, 2, 3, 4, 9, 15, 53, 255, 0, 1, 2, 3, 4, 5, 14, 31, 80, 511, 0, 1, 2, 3, 4, 5, 11, 19, 47, 161, 1023, 0, 1, 2, 3, 4, 5, 6, 17, 24, 63, 242, 2047 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
2,6
COMMENTS
The expansion of A(n, k) in base n is:
q n-1 ... n-1
<- p times ->
where q = k mod (n-1) and p = floor(k / (n-1)).
LINKS
Andrew Howroyd, Table of n, a(n) for n = 2..1276 (first 50 antidiagonals)
FORMULA
A(2, k) = 2^k - 1.
A(3, k) = A062318(k+1).
A(4, k) = A180516(k+1).
A(5, k) = A181287(k+1).
A(6, k) = A181288(k+1).
A(7, k) = A181303(k+1).
A(8, k) = A165804(k+1).
A(9, k) = A140576(k+1).
A(10, k) = A051885(k).
A(n, 0) = 0.
A(n, 1) = 1.
A(n, k) = k iff k < n.
A(n, n) = 2*n - 1.
A(n, n+1) = 3*n - 1 for any n > 2.
EXAMPLE
Array A(n, k) begins:
n\k| 0 1 2 3 4 5 6 7 8 9 10 11 12
---+---------------------------------------------------------
2| 0 1 3 7 15 31 63 127 255 511 1023 2047 4095
3| 0 1 2 5 8 17 26 53 80 161 242 485 728
4| 0 1 2 3 7 11 15 31 47 63 127 191 255
5| 0 1 2 3 4 9 14 19 24 49 74 99 124
6| 0 1 2 3 4 5 11 17 23 29 35 71 107
7| 0 1 2 3 4 5 6 13 20 27 34 41 48
8| 0 1 2 3 4 5 6 7 15 23 31 39 47
9| 0 1 2 3 4 5 6 7 8 17 26 35 44
10| 0 1 2 3 4 5 6 7 8 9 19 29 39
Array A(n, k) begins (with values given in base n):
n\k| 0 1 2 3 4 5 6 7 8 9
---+------------------------------------------------------------------
2| 0 1 11 111 1111 11111 111111 1111111 11111111 111111111
3| 0 1 2 12 22 122 222 1222 2222 12222
4| 0 1 2 3 13 23 33 133 233 333
5| 0 1 2 3 4 14 24 34 44 144
6| 0 1 2 3 4 5 15 25 35 45
7| 0 1 2 3 4 5 6 16 26 36
8| 0 1 2 3 4 5 6 7 17 27
9| 0 1 2 3 4 5 6 7 8 18
10| 0 1 2 3 4 5 6 7 8 9
PROG
(PARI) A(n, k) = { (1+k%(n-1))*n^(k\(n-1))-1 }
(Python) def A(n, k): return (1+(k % (n-1)))*n**(k//(n-1))-1
CROSSREFS
Sequence in context: A014573 A067166 A125209 * A263313 A071818 A014513
KEYWORD
nonn,tabl,base
AUTHOR
Rémy Sigrist, Aug 10 2022
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 04:14 EDT 2024. Contains 371918 sequences. (Running on oeis4.)