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.

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

This page as a plain text file.
%I A335843 #46 Sep 24 2020 04:14:48
%S A335843 0,81,243,567,1215,2511,5103,10287,20655,41391,82863,165807,331695,
%T A335843 663471,1327023,2654127,5308335,10616751,21233583,42467247,84934575,
%U A335843 169869231,339738543,679477167,1358954415,2717908911,5435817903,10871635887,21743271855,43486543791
%N A335843 a(n) is the number of n-digit positive integers with exactly two distinct base 10 digits.
%C A335843 a(n) is the number of n-digit numbers in A031955.
%H A335843 Stefano Spezia, <a href="/A335843/b335843.txt">Table of n, a(n) for n = 1..3300</a>
%H A335843 Puzzle Critic, <a href="https://twitter.com/puzzlecritic/status/1283798424937213955">Twitter post about the case n = 5</a>, Jul 16 2020.
%H A335843 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (3,-2).
%H A335843 <a href="/index/Di#digits">Index entries for sequences related to digits</a>.
%F A335843 O.g.f.: 81*x^2/(1 - 3*x + 2*x^2).
%F A335843 E.g.f.: 81*(exp(x) - 1)^2/2.
%F A335843 a(n) = 3*a(n-1) - 2*a(n-2) for n > 2.
%F A335843 a(n) = 81*(2^(n-1) - 1).
%F A335843 a(n) = 81*A000225(n-1).
%e A335843 a(1) = 0 since the positive integers must have at least two digits;
%e A335843 a(2) = 81 since #[99] - #[9] - #(11*[9]) = 99 - 9 - 9 = 81;
%e A335843 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;
%e A335843 ...
%t A335843 LinearRecurrence[{3,-2},{0,81},31]
%o A335843 (PARI) concat([0],Vec(81*x^2/(1-3*x+2*x^2)+O(x^31)))
%Y A335843 Cf. A000225, A031955, A337127, A337313.
%Y A335843 Cf. A055642, A235154, A235690, A235717.
%K A335843 nonn,easy,base
%O A335843 1,2
%A A335843 _Stefano Spezia_, Jul 18 2020
%E A335843 a(0) removed by _Stefano Spezia_, Sep 23 2020