login
Numbers whose final digit is at most 2.
4

%I #25 Jan 27 2026 12:47:59

%S 0,1,2,10,11,12,20,21,22,30,31,32,40,41,42,50,51,52,60,61,62,70,71,72,

%T 80,81,82,90,91,92,100,101,102,110,111,112,120,121,122,130,131,132,

%U 140,141,142,150,151,152,160,161,162,170,171,172,180,181,182,190,191,192,200

%N Numbers whose final digit is at most 2.

%C Numbers that are {0, 1, 2} mod 10.

%C Union of A008592, A017281, and A017293.

%C In baseball, a pitcher's length of time pitching is often measured by number of outs recorded; groups of three outs are separated by the "decimal" point of a(n)/10 from any additional outs.

%H Zhuorui He, <a href="/A391163/b391163.txt">Table of n, a(n) for n = 0..10000</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Innings_pitched">Innings pitched</a>.

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).

%F a(n) = 10 * floor(n/3) + (n mod 3) = 10 * A002264(n) + A010872(n).

%F G.f.: x*(1 + x + 8*x^2)/((-1 + x)^2*(1 + x + x^2)).

%F a(n)= A054967(n) + 1 for n >= 1.

%F E.g.f.: exp(-x/2)*(3*exp(3*x/2)*(10*x - 7) + 21*cos(sqrt(3)*x/2) + 7*sqrt(3)*sin(sqrt(3)*x/2))/9. - _Stefano Spezia_, Dec 05 2025

%e A pitcher that has recorded 22 outs has pitched 7.1 innings, so a(22) = 71.

%t a[n_] := Total[QuotientRemainder[n, 3] * {10, 1}]; Array[a, 61, 0]

%t Select[Range[0,200],Mod[#,10]<3&] (* or *) LinearRecurrence[{1,0,1,-1},{0,1,2,10},100] (* _Harvey P. Dale_, Jan 27 2026 *)

%Y Cf. A002264, A010872.

%Y Cf. A008592 (final digit at most 0), A197652 (at most 1), A390774 (at most 3), A293292 (at most 4), A391164 (at most 5), A272576 (at most 7), A001477 (at most 9).

%Y Cf. A017281, A017293, A054967.

%K nonn,easy,base

%O 0,3

%A _Jason Bard_, Dec 01 2025