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-3 of 3 results.

A335843 a(n) is the number of n-digit positive integers with exactly two distinct base 10 digits.

Original entry on oeis.org

0, 81, 243, 567, 1215, 2511, 5103, 10287, 20655, 41391, 82863, 165807, 331695, 663471, 1327023, 2654127, 5308335, 10616751, 21233583, 42467247, 84934575, 169869231, 339738543, 679477167, 1358954415, 2717908911, 5435817903, 10871635887, 21743271855, 43486543791
Offset: 1

Views

Author

Stefano Spezia, Jul 18 2020

Keywords

Comments

a(n) is the number of n-digit numbers in A031955.

Examples

			a(1) = 0 since the positive integers must have at least two digits;
a(2) = 81 since #[99] - #[9] - #(11*[9]) = 99 - 9 - 9 = 81;
a(3) = 243 since #[999] - #[99] - #(111*[9]) - #{xyz in N | x,y,z are three different digits with x != 0} = 999 - 99 - 9 - 9*9*8 = 243;
...
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3,-2},{0,81},31]
  • PARI
    concat([0],Vec(81*x^2/(1-3*x+2*x^2)+O(x^31)))

Formula

O.g.f.: 81*x^2/(1 - 3*x + 2*x^2).
E.g.f.: 81*(exp(x) - 1)^2/2.
a(n) = 3*a(n-1) - 2*a(n-2) for n > 2.
a(n) = 81*(2^(n-1) - 1).
a(n) = 81*A000225(n-1).

Extensions

a(0) removed by Stefano Spezia, Sep 23 2020

A337313 a(n) is the number of n-digit positive integers with exactly three distinct base 10 digits.

Original entry on oeis.org

0, 0, 648, 3888, 16200, 58320, 195048, 625968, 1960200, 6045840, 18468648, 56068848, 169533000, 511252560, 1539065448, 4627812528, 13904670600, 41756478480, 125354369448, 376232977008, 1129038669000, 3387795483600, 10164745404648, 30496954122288, 91496298184200
Offset: 1

Views

Author

Stefano Spezia, Aug 22 2020

Keywords

Comments

a(n) is the number of n-digit numbers in A031962.

Examples

			a(1) = a(2) = 0 since the positive integers must have at least three digits;
a(3) = #{xyz in N | x,y,z are three different digits with x != 0} = 9*9*8 = 648;
a(4) = 3888 since #[9999] - #[999] - #(1111*[9]) - A335843(4) - #{xywz in N | x,y,w,z are four different digits with x != 0} = 9999 - 999 - 9 - 567 - 9*9*8*7 = 3888;
...
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{6,-11,6},{0,0,648},26]
  • PARI
    concat([0,0],Vec(648*x^3/(1-6*x+11*x^2-6*x^3)+O(x^26)))

Formula

O.g.f.: 648*x^3/(1 - 6*x + 11*x^2 - 6*x^3).
E.g.f.: 108*(exp(x) - 1)^3.
a(n) = 6*a(n-1) - 11*a(n-2) + 6*a(n-3) for n > 3.
a(n) = 648*S2(n, 3) where S2(n, 3) = A000392(n).
a(n) = 324*(3^(n-1) - 2^n + 1).
a(n) ~ 108 * 3^n.
a(n) = 324*(A000244(n-1) - A000225(n)).
a(n) = A337127(n, 3).

A337314 a(n) is the number of n-digit positive integers with exactly four distinct base 10 digits.

Original entry on oeis.org

0, 0, 0, 4536, 45360, 294840, 1587600, 7715736, 35244720, 154700280, 661122000, 2773768536, 11487556080, 47136955320, 192126589200, 779279814936, 3149513947440, 12695388483960, 51073849285200, 205172877726936, 823325141746800, 3301203837670200, 13228529919066000
Offset: 1

Views

Author

Stefano Spezia, Sep 26 2020

Keywords

Comments

a(n) is the number of n-digit numbers in A031969.

Examples

			a(1) = a(2) = a(3) = 0 since the positive integers must have at least four digits;
a(4) = #{wxyz in N | w,x,y,z are four different digits with w != 0} = A073531(4) = 4536;
a(5) = 45360 since #[99999] - #[9999] - #(11111*[9]) - A335843(5) - A337313(5) - #{vwxyz in N | v,w,x,y,z are five different digits with v != 0} = 99999 - 9999 - 9 - 1215 - 16200 - 9*9*8*7*6 = 45360;
...
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{10,-35,50,-24},{0,0,0,4536},23]
  • PARI
    concat([0,0,0],Vec(4536*x^4/(1-10*x+35*x^2-50*x^3+24*x^4)+O(x^24)))

Formula

O.g.f.: 4536*x^4/(1 - 10*x + 35*x^2 - 50*x^3 + 24*x^4).
E.g.f.: 189*(exp(x) - 1)^4.
a(n) = 10*a(n-1) - 35*a(n-2) + 50*a(n-3) - 24*a(n-4) for n > 4.
a(n) = 4536*S2(n, 4) where S2(n, 4) = A000453(n).
a(n) = 189*(4^n - 4*3^n + 3*2^(n+1) - 4).
a(n) ~ 189 * 4^n.
a(n) = 189*(A000302(n) - 4*A000244(n) + 3*A000079(n+1) - 4).
a(n) = A337127(n, 4).
Showing 1-3 of 3 results.