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 A331530 #63 Apr 11 2021 23:51:51 %S A331530 0,0,1,0,3,3,8,7,16,23,48,70,125,192,345,561,972,1578,2683,4436,7537, %T A331530 12536,21114,35163,59123,98837,166006,277650,465619,779296,1306674, %U A331530 2188248,3667717,6142653,10293460,17242678,28892956,48402553,81099234,135863965,227636213 %N A331530 a(n) is the number of nonnegative integers that can be represented in a 7-segment display by using only n segments (version A010371). %C A331530 The nonnegative integers are displayed as in A010371, where a 7 is depicted by 4 segments. %C A331530 Given the set S = {2, 4, 5, 6, 7}, the function f defined in S as f(4) = 2, f(5) = f(6) = 3 and f(2) = 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 A331530 Colin Barker, <a href="/A331530/b331530.txt">Table of n, a(n) for n = 0..1000</a> %H A331530 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 A331530 <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (0,1,0,2,3,3,1). %H A331530 <a href="/index/Ca#calculatordisplay">Index entries for sequences related to calculator display</a> %H A331530 <a href="/index/Com#comp">Index entries for sequences related to compositions</a> %F A331530 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) = x^2 + 2*x^4 + 3*x^5 + 3*x^6 + x^7. %F A331530 From _Colin Barker_, Jan 20 2020: (Start) %F A331530 G.f.: x^2*(1 - x)*(1 + x)*(1 - x + x^2)*(1 + x + x^2)*(1 + 2*x^2 + 3*x^3 + 3*x^4 + x^5) / (1 - x^2 - 2*x^4 - 3*x^5 - 3*x^6 - x^7). %F A331530 a(n) = a(n-2) + 2*a(n-4) + 3*a(n-5) + 3*a(n-6) + a(n-7) for n>13. %F A331530 (End) %e A331530 a(6) = 8 since 0, 6, 9, 14, 17, 41, 71, 111 are displayed by 6 segments. %e A331530 __ __ __ %e A331530 | | |__ |__| | |__| %e A331530 |__| |__| __| | | %e A331530 (0) (6) (9) (14) %e A331530 __ __ %e A331530 | | | |__| | | | | | | | %e A331530 | | | | | | | | | %e A331530 (17) (41) (71) (111) %t A331530 P[x_]:=x^2+2x^4+3x^5+3x^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] %o A331530 (PARI) concat([0,0], Vec(x^2*(1 - x)*(1 + x)*(1 - x + x^2)*(1 + x + x^2)*(1 + 2*x^2 + 3*x^3 + 3*x^4 + x^5) / (1 - x^2 - 2*x^4 - 3*x^5 - 3*x^6 - x^7) + O(x^41))) \\ _Colin Barker_, Jan 20 2020 %Y A331530 Cf. A002426, A004526, A010371, A331529, A343314, A343315. %K A331530 base,nonn,easy %O A331530 0,5 %A A331530 _Stefano Spezia_, Jan 19 2020