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.
%I A331672 #45 Feb 22 2020 23:14:47 %S A331672 3,91,2635,94501,4254936,234572213,15403880115,1176838159861, %T A331672 102631111100848,10063085278250005,1095923297151849530, %U A331672 131253123286275198027,17145216226230367266330,2425892898650501790637545,369599184391990522425455939,60326656013944234430010524773 %N A331672 Sum of all base-n numbers with digit sum n and length at most n. %C A331672 The cardinality of these numbers is given by A048775(n-1). %H A331672 Alois P. Heinz, <a href="/A331672/b331672.txt">Table of n, a(n) for n = 2..322</a> %F A331672 a(n) = A048775(n-1)*A023037(n) = (binomial(2*n-1,n)-n)*(n^n-1)/(n-1). %e A331672 a(2) = 3 = 11_2. %e A331672 a(3) = 91 = 5 + 7 + 11 + 13 + 15 + 19 + 21 = 12_3 + 21_3 + 102_3 + 111_3 + 120_3 + 201_3 + 210_3. %e A331672 a(10) = A130835(10) = 102631111100848. %p A331672 b:= proc(n, i, k) option remember; `if`(n=0, [1, 0], %p A331672 `if`(i=0, 0, add((p->[p[1], p[2]*k+p[1]*d])( %p A331672 b(n-d, i-1, k)), d=0..min(n, k-1)))) %p A331672 end: %p A331672 a:= n-> b(n$3)[2]: %p A331672 seq(a(n), n=2..17); %p A331672 # second Maple program: %p A331672 a:= n-> (binomial(2*n-1, n)-n)*(n^n-1)/(n-1): %p A331672 seq(a(n), n=2..17); %Y A331672 Cf. A007953, A023037, A048775, A130835, A331673. %K A331672 nonn,base %O A331672 2,1 %A A331672 _Alois P. Heinz_, Feb 22 2020