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!)
A331672 Sum of all base-n numbers with digit sum n and length at most n. 3
3, 91, 2635, 94501, 4254936, 234572213, 15403880115, 1176838159861, 102631111100848, 10063085278250005, 1095923297151849530, 131253123286275198027, 17145216226230367266330, 2425892898650501790637545, 369599184391990522425455939, 60326656013944234430010524773 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
COMMENTS
The cardinality of these numbers is given by A048775(n-1).
LINKS
FORMULA
a(n) = A048775(n-1)*A023037(n) = (binomial(2*n-1,n)-n)*(n^n-1)/(n-1).
EXAMPLE
a(2) = 3 = 11_2.
a(3) = 91 = 5 + 7 + 11 + 13 + 15 + 19 + 21 = 12_3 + 21_3 + 102_3 + 111_3 + 120_3 + 201_3 + 210_3.
a(10) = A130835(10) = 102631111100848.
MAPLE
b:= proc(n, i, k) option remember; `if`(n=0, [1, 0],
`if`(i=0, 0, add((p->[p[1], p[2]*k+p[1]*d])(
b(n-d, i-1, k)), d=0..min(n, k-1))))
end:
a:= n-> b(n$3)[2]:
seq(a(n), n=2..17);
# second Maple program:
a:= n-> (binomial(2*n-1, n)-n)*(n^n-1)/(n-1):
seq(a(n), n=2..17);
CROSSREFS
Sequence in context: A366219 A300419 A156754 * A213978 A318129 A119121
KEYWORD
nonn,base
AUTHOR
Alois P. Heinz, Feb 22 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 March 28 05:39 EDT 2024. Contains 371235 sequences. (Running on oeis4.)