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.

Showing 1-4 of 4 results.

A211072 Sum of numbers with no '0' decimal digits whose sum of digits equals n.

Original entry on oeis.org

0, 1, 13, 147, 1625, 17891, 196833, 2165227, 23817625, 261994131, 2881935943, 31701296375, 348714262017, 3835856884757, 42194425724149, 464138682802857, 5105525508895321, 56160780576260645, 617768586100819485, 6795454444489330049, 74749998860563784655
Offset: 0

Views

Author

Keywords

Comments

Different from A016135.

Examples

			2 and 11 are the only numbers without 0's which have digit sum 2, so a(2) = 2 + 11 = 13.
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, [1, 0], add((p->
          [p[1], p[2]*10+p[1]*d])(b(n-d)), d=1..min(n, 9)))
        end:
    a:= n-> b(n)[2]:
    seq(a(n), n=0..23);  # Alois P. Heinz, Feb 19 2020

Formula

G.f.: x*(9*x^8 + 8*x^7 + 7*x^6 + 6*x^5 + 5*x^4 + 4*x^3 + 3*x^2 + 2*x + 1)/((x^9 + x^8 + x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + x - 1)*(10*x^9 + 10*x^8 + 10*x^7 + 10*x^6 + 10*x^5 + 10*x^4 + 10*x^3 + 10*x^2 + 10*x - 1)). - Yurii Ivanov, Jul 06 2021

Extensions

a(0)=0 prepended by Alois P. Heinz, Feb 19 2020

A167403 Number of decimal numbers having n or fewer digits and having the sum of their digits equal to n.

Original entry on oeis.org

1, 3, 10, 35, 126, 462, 1716, 6435, 24310, 92368, 352595, 1351142, 5194385, 20024980, 77384340, 299671971, 1162635441, 4518099300, 17583582225, 68522664400, 267350823015, 1044243559263, 4082760176300, 15977236602150, 62576817828876, 245279492151021
Offset: 1

Views

Author

Alois P. Heinz, Nov 02 2009

Keywords

Comments

a(3) = 10, because 10 decimal numbers have 3 or fewer digits and a digit sum of 3: 3, 30, 300, 12, 120, 201, 21, 210, 102, 111.

Crossrefs

Column k=9 of A305161.

Programs

  • Maple
    b:= proc(n, i) option remember;
          `if`(n=0, 1, `if`(i=0, 0,
           add(b(n-j, i-1), j=0..min(n, 9)) ))
        end:
    a:= n-> b(n, n):
    seq(a(n), n=1..30);

Formula

a(n) = [x^n] ((x^10-1)/(x-1))^n.

A331672 Sum of all base-n numbers with digit sum n and length at most n.

Original entry on oeis.org

3, 91, 2635, 94501, 4254936, 234572213, 15403880115, 1176838159861, 102631111100848, 10063085278250005, 1095923297151849530, 131253123286275198027, 17145216226230367266330, 2425892898650501790637545, 369599184391990522425455939, 60326656013944234430010524773
Offset: 2

Views

Author

Alois P. Heinz, Feb 22 2020

Keywords

Comments

The cardinality of these numbers is given by A048775(n-1).

Examples

			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.
		

Crossrefs

Programs

  • 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);

Formula

a(n) = A048775(n-1)*A023037(n) = (binomial(2*n-1,n)-n)*(n^n-1)/(n-1).

A331673 Sum of all base-n numbers with digit sum n and length exactly n.

Original entry on oeis.org

3, 79, 2299, 84361, 3872406, 216591677, 14378073683, 1107635176621, 97229999995138, 9583904327477305, 1048274845801847390, 126003010469828661807, 16510208629407273871884, 2342241434486480710216185, 357676630651821282153992579, 58498575553741083746904253333
Offset: 2

Views

Author

Alois P. Heinz, Feb 22 2020

Keywords

Comments

The cardinality of these numbers is given by A030662(n-1)

Examples

			a(2) = 3 = 11_2.
a(3) = 79 = 11 + 13 + 15 + 19 + 21 = 102_3 + 111_3 + 120_3 + 201_3 + 210_3.
		

Crossrefs

Programs

  • 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]-b(n, n-1, n)[2]:
    seq(a(n), n=2..17);
Showing 1-4 of 4 results.