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 A331529 #74 Apr 11 2021 23:51:42 %S A331529 0,0,1,1,2,5,7,12,19,33,59,99,170,290,496,854,1463,2506,4292,7351, %T A331529 12601,21596,37005,63405,108637,186154,318989,546600,936606,1604874, %U A331529 2749973,4712146,8074374,13835600,23707533,40623267,69608738,119275933,204381606,350211711,600094277 %N A331529 a(n) is the number of nonnegative integers that can be represented in a 7-segment display by using only n segments (version A006942). %C A331529 The nonnegative integers are displayed as in A006942, where a 7 is depicted by 3 segments. %C A331529 Given the set S = {2, 3, 4, 5, 6, 7}, the function f defined in S as f(5) = f(6) = 3 and f(s) = 1 elsewhere, 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). %C A331529 The same sequence is obtained when 7 and 9 are depicted respectively by 4 and 5 segments (A074458). - _Stefano Spezia_, Apr 11 2021 %H A331529 Colin Barker, <a href="/A331529/b331529.txt">Table of n, a(n) for n = 0..1000</a> %H A331529 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 A331529 <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (0,1,1,1,3,3,1). %H A331529 <a href="/index/Ca#calculatordisplay">Index entries for sequences related to calculator display</a> %H A331529 <a href="/index/Com#comp">Index entries for sequences related to compositions</a> %F A331529 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 + x^3 + x^4 + 3*x^5 + 3*x^6 + x^7. %F A331529 From _Colin Barker_, Jan 20 2020: (Start) %F A331529 G.f.: x^2*(1 - x)*(1 + x)^2*(1 - x + x^2)*(1 + x + x^2)*(1 + x^2 + 2*x^3 + x^4) / (1 - x^2 - x^3 - x^4 - 3*x^5 - 3*x^6 - x^7). %F A331529 a(n) = a(n-2) + a(n-3) + a(n-4) + 3*a(n-5) + 3*a(n-6) + a(n-7) for n>13. %F A331529 (End) %e A331529 a(5) = 5 since 2, 3, 5, 17 and 71 are displayed by 5 segments. %e A331529 __ __ __ __ __ %e A331529 __| __| |__ | | | | %e A331529 |__ __| __| | | | | %e A331529 (2) (3) (5) (17) (71) %t A331529 P[x_]:=x^2+x^3+x^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 A331529 (PARI) concat([0,0], Vec(x^2*(1 - x)*(1 + x)^2*(1 - x + x^2)*(1 + x + x^2)*(1 + x^2 + 2*x^3 + x^4) / (1 - x^2 - x^3 - x^4 - 3*x^5 - 3*x^6 - x^7) + O(x^41))) \\ _Colin Barker_, Jan 20 2020 %Y A331529 Cf. A002426, A004526, A006942, A216261, A331530, A343314, A343315. %K A331529 base,nonn,easy %O A331529 0,5 %A A331529 _Stefano Spezia_, Jan 19 2020