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.
%I A350177 #6 Dec 19 2021 11:10:56 %S A350177 0,0,0,2,3,2,5,13,17,22,47,86,127,211,387,645,1044,1794,3086,5135, %T A350177 8608,14674,24805,41631,70322,119069,200768,338429,571845,965823, %U A350177 1629253,2749904,4643876,7838862,13229487,22333638,37704236,63642469,107427241,181351098,306133271 %N A350177 a(n) is the number of nonnegative integers that can be represented by lighting only n segments on a 9-segment display, used by the Russian postal service. %C A350177 The nonnegative integers are displayed as in A350131. %C A350177 Given the set S = {3, 4, 5, 6, 7}, the function f defined in S as f(3) = f(5) = 2, f(4) = 3, and f(6) = f(7) = 1, a(n) is equal to the difference between the number b(n) of S-restricted f-weighted integer compositions of n with that of n-6, i.e., b(n-6). The latter one provides the number of all those excluded cases where a nonnegative integer is displayed with leading zeros. b(n) is calculated as the sum of polynomial coefficients or extended binomial coefficients (see Equation 3 in Eger) where the index of summation is positive and it covers the numbers of possible digits that can be displayed by n segments (see first formula). %H A350177 Steffen Eger, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL16/Eger/eger6.html"> Restricted Weighted Integer Compositions and Extended Binomial Coefficients</a>, Journal of Integer Sequences, Vol. 16, Article 13.1.3, (2013). %H A350177 Wikipedia, <a href="https://en.wikipedia.org/wiki/Postal_codes_in_Russia#/media/File:Russian_postal_codes.svg">Postal code template</a>. %H A350177 Wikipedia, <a href="https://en.wikipedia.org/wiki/Postal_codes_in_Russia">Postal codes in Russia</a>. %H A350177 <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,2,3,2,1,1). %H A350177 <a href="/index/Ca#calculatordisplay">Index entries for sequences related to calculator display</a> %H A350177 <a href="/index/Com#comp">Index entries for sequences related to compositions</a> %F A350177 a(n) = b(n) - b(n-6), where b(n) = [x^n] Sum_{k=max(1,ceiling(n/7))..floor(n/2)} P(x)^k with P(x) = 2*x^3 + 3*x^4 + 2*x^5 + x^6 + x^7. %F A350177 G.f.: x^3*(1 - x)*(1 + x)*(1 - x + x^2)*(1 + x + x^2)*(2 + 3*x + 2*x^2 + x^3 + x^4)/(1 - 2*x^3 - 3*x^4 - 2*x^5 - x^6 - x^7). %F A350177 a(n) = 2*a(n-3) + 3*a(n-4) + 2*a(n-5) + a(n-6) + a(n-7) for n > 13. %e A350177 a(6) = 5 since 0, 11, 17, 71 and 77 are displayed by 6 segments. %e A350177 _ _ _ _ _ %e A350177 | | /| /| /| / / /| / / %e A350177 |_| | | | | | | | | %e A350177 (0) (11) (17) (71) (77) %t A350177 P[x_]:=2x^3+3x^4+2x^5+x^6+x^7; b[n_]:=Coefficient[Sum[P[x]^k, {k, Max[1, Ceiling[n/7]], Floor[n/2]}], x, n]; a[n_]:=b[n]-b[n-6]; Array[a, 41, 0] %Y A350177 Cf. A002426, A004526, A331529, A331530, A343314, A343315, A350131. %K A350177 nonn,base,easy %O A350177 0,4 %A A350177 _Stefano Spezia_, Dec 18 2021