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.

A130835 Sum of all numbers having n or fewer digits and having the sum of their digits equal to n.

Original entry on oeis.org

1, 33, 1110, 38885, 1399986, 51333282, 1906666476, 71499999285, 2701111108410, 102631111100848, 3917722222183045, 150126888888738762, 5771538888888311735, 222499777777775552780, 8598259999999991401740, 332968856666666633369781, 12918171566666666537484951
Offset: 1

Views

Author

J. M. Bergot, Jul 18 2007

Keywords

Examples

			Take n = 3. The numbers to be summed are 111, 3, 30, 300, 210, 201, 120, 102, 21 and 12, which add to 1110.
		

Crossrefs

Programs

  • Maple
    A007953 := proc(n) add(i,i=convert(n,base,10)) ; end: A130835 := proc(n) local a,i; a := 0 ; for i from 1 to 10^n-1 do if A007953(i) = n then a := a+i ; fi ; od ; RETURN(a) ; end: seq(A130835(n),n=1..4) ; # R. J. Mathar, Aug 01 2007
    # second Maple program:
    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)*(10^n-1)/9:
    seq(a(n), n=1..20); # Alois P. Heinz, Nov 02 2009

Formula

a(n) = (10^n-1)/9 * [x^n] ((x^10-1)/(x-1))^n. - Alois P. Heinz, Feb 07 2012
a(n) = A000042(n) * A167403(n) = A002275(n) * A167403(n). - Alois P. Heinz, Aug 16 2018

Extensions

a(4)-a(6) from R. J. Mathar, Aug 01 2007
a(7)-a(12) from Donovan Johnson, Jul 02 2009
More terms from Alois P. Heinz, Nov 02 2009

A332690 Sum of all numbers in bijective base-9 numeration with digit sum n.

Original entry on oeis.org

0, 1, 12, 124, 1248, 12496, 124992, 1249984, 12499968, 124999936, 1249999862, 12499999623, 124999998144, 1249999984364, 12499999840480, 124999998308464, 1249999981991936, 12499999808733888, 124999997974967808, 1249999978624935680, 12499999774999871588
Offset: 0

Views

Author

Alois P. Heinz, Feb 19 2020

Keywords

Comments

Different from A016134.

Examples

			a(2) = 12 = 2 + 10 = 2_bij9 + 11_bij9.
		

Crossrefs

Programs

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

Formula

G.f.: (Sum_{j=1..9} j*x^j) / ((B(x) - 1) * (9*B(x) - 1)) with B(x) = Sum_{j=1..9} x^j.
a(n) = A028904(A332691(n)).
a(n) = A016134(n-1) for n = 1..9.

A332691 Bijective base-9 representation of the sum of all numbers in bijective base-9 numeration with digit sum n.

Original entry on oeis.org

1, 13, 147, 1636, 18124, 199399, 2314581, 25461653, 281178597, 3192976395, 35233852789, 387573484456, 4374418444135, 48228613881184, 541525753635894, 5956784387951128, 66635738355523786, 743994232656361639, 8285146556418623572, 92246623188575957748
Offset: 1

Views

Author

Alois P. Heinz, Feb 19 2020

Keywords

Examples

			a(2) = 13_bij9 = 12 = 2 + 10 = 2_bij9 + 11_bij9.
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, [1, 0], add((p->
          [p[1], p[2]*9+p[1]*d])(b(n-d)), d=1..min(n, 9)))
        end:
    g:= proc(n) local d, l, m; m, l:= n, "";
          while m>0 do d:= irem(m, 9, 'm');
            if d=0 then d:=9; m:= m-1 fi; l:= d, l
          od; parse(cat(l))
        end:
    a:= n-> g(b(n)[2]):
    seq(a(n), n=1..23);

Formula

a(n) = A052382(A332690(n)).

A258800 The number of zeroless decimal numbers whose digital sum is n.

Original entry on oeis.org

0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 511, 1021, 2040, 4076, 8144, 16272, 32512, 64960, 129792, 259328, 518145, 1035269, 2068498, 4132920, 8257696, 16499120, 32965728, 65866496, 131603200, 262947072, 525375999, 1049716729, 2097364960, 4190597000, 8372936304, 16729373488, 33425781248
Offset: 0

Views

Author

Robert G. Wilson v, Jun 10 2015

Keywords

Comments

If you were to include decimal numbers that contain any number of zeros, then a(n) would be infinity. If on the other hand, you limit the number of zeros to some number, then a(n) is finite.

Examples

			a(0) = 0 since there exists no decimal number lacking a zero whose digital sum is zero.
a(1) = 1 since there exists only one zeroless decimal number whose digital sum is one and that number is 1.
a(2) = 2 since there exist only two zeroless decimal numbers whose digital sum is two and they are 2 & 11.
a(3) = 4 since there exist only four zeroless decimal numbers whose digital sum is three and they are 3, 21, 12 & 111.
a(4) = 8 since there exist only eight zeroless decimal numbers whose digital sum is four and they are 4, 31, 13, 22, 211, 121, 112 & 1111.
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[ Series[-1 + 1/(1 - x (1 + x + x^2) (1 + x^3 + x^6)), {x, 0, 36}], x]

Formula

a(n) = A104144(n+8) for n>0.
G.f.: -(x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9)/(-1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9) = -1 + 1/(1-x(1 + x + x^2)(1 + x^3 + x^6)).
Showing 1-4 of 4 results.