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).

Original entry on oeis.org

1, 9, 70, 615, 5520, 50412, 468448, 4379055, 41395240, 392406145, 3748943890, 35866068766, 345143007910, 3323483518810, 32150758083580, 311088525668335, 3021445494584902, 29344719005694973, 285904843977651598, 2785022004925340460, 27203012941819689340
Offset: 1

Views

Author

Miquel Cerda, Mar 30 2025

Keywords

Comments

Digit sum ceiling(9*n/2) = A130877(n+1) has highest frequency among all n-digit base-10 numbers.
The count excludes numbers with leading zeros.

Examples

			a(2) = 9, the 2-digit numbers with digit sum 9 are: 18, 27, 36, 45, 54, 63, 72, 81, 90.
		

Crossrefs

Cf. A210736 (analogous for base-2 digits).
Cf. A025015 (maximal coefficient of (1+...+x^9)^n).

Programs

  • Maple
    b:= proc(n, s, t) option remember; `if`(9*n b(n, ceil(9*n/2), 1):
    seq(a(n), n=1..23);  # Alois P. Heinz, Apr 12 2025

Formula

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