The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A332711 Sum of all numbers in bijective base-n numeration with digit sum n. 1
0, 1, 5, 28, 203, 1936, 23517, 349504, 6149495, 124999936, 2881935953, 74300836864, 2118007738035, 66142897770496, 2245609694259557, 82351536043343872, 3244079458377786863, 136619472483668525056, 6125138252818308310041, 291271111111111111081984 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
The number of numbers in bijective base-n numeration with digit sum n equals the number of compositions of n: A000079(n).
LINKS
Wikipedia, Digit sum
FORMULA
a(n) = ((n+1)^n - 2^n) / (n - 1) for n >= 2. - Peter Bala, Sep 28 2023
EXAMPLE
a(0) = 0.
a(1) = 1 = 1_bij1.
a(2) = 5 = 3 + 2 = 11_bij2 + 2_bij2.
a(3) = 28 = 13 + 7 + 5 + 3 = 111_bij3 + 21_bij3 + 12_bij3 + 3_bij3.
MAPLE
b:= proc(n, k) option remember; `if`(n=0, [1, 0], add((p->
[p[1], p[2]*k+p[1]*d])(b(n-d, k)), d=1..min(n, k)))
end:
a:= n-> b(n$2)[2]:
seq(a(n), n=0..23);
MATHEMATICA
b[n_, k_] := b[n, k] = If[n == 0, {1, 0}, Sum[Function[p, {p[[1]], p[[2]]*k + p[[1]]*d}][b[n - d, k]], {d, 1, Min[n, k]}]];
a[n_] := b[n, n][[2]];
a /@ Range[0, 23] (* Jean-François Alcover, Apr 23 2021, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A216586 A151500 A356409 * A292426 A347005 A356025
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Feb 20 2020
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 June 7 11:28 EDT 2024. Contains 373172 sequences. (Running on oeis4.)