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.

A382531 Number of n-digit base-10 numbers whose digit sum is equal to ceiling(9*n/2).

This page as a plain text file.
%I A382531 #47 Apr 18 2025 21:24:37
%S A382531 1,9,70,615,5520,50412,468448,4379055,41395240,392406145,3748943890,
%T A382531 35866068766,345143007910,3323483518810,32150758083580,
%U A382531 311088525668335,3021445494584902,29344719005694973,285904843977651598,2785022004925340460,27203012941819689340
%N A382531 Number of n-digit base-10 numbers whose digit sum is equal to ceiling(9*n/2).
%C A382531 Digit sum ceiling(9*n/2) = A130877(n+1) has highest frequency among all n-digit base-10 numbers.
%C A382531 The count excludes numbers with leading zeros.
%H A382531 Alois P. Heinz, <a href="/A382531/b382531.txt">Table of n, a(n) for n = 1..1002</a>
%F A382531 a(n) = [x^ceiling(9*n/2)] (f^n - f^(n-1)) with f = (x^10-1)/(x-1). - _Alois P. Heinz_, Apr 12 2025
%e A382531 a(2) = 9, the 2-digit numbers with digit sum 9 are: 18, 27, 36, 45, 54, 63, 72, 81, 90.
%p A382531 b:= proc(n, s, t) option remember; `if`(9*n<s, 0,
%p A382531      `if`(n=0, 1, add(b(n-1, s-j, 0), j=t..min(9, s))))
%p A382531     end:
%p A382531 a:= n-> b(n, ceil(9*n/2), 1):
%p A382531 seq(a(n), n=1..23);  # _Alois P. Heinz_, Apr 12 2025
%Y A382531 Cf. A210736 (analogous for base-2 digits).
%Y A382531 Cf. A025015 (maximal coefficient of (1+...+x^9)^n).
%Y A382531 Cf. A007953, A071817, A071976, A130877.
%K A382531 nonn,base
%O A382531 1,2
%A A382531 _Miquel Cerda_, Mar 30 2025