Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #23 Nov 11 2023 14:21:48
%S 0,0,1,2,3,8,12,19,33,55,103,170,297,509,875,1531,2622,4546,7828,
%T 13514,23379,40313,69680,120232,207630,358597,619066,1069184,1845894,
%U 3187511,5504024,9503677,16410894,28336222,48929611,84487805,145886994,251908592,434974763,751085173
%N a(n) is the number of integers that can be represented in a 7-segment display by using only n segments (version A277116).
%C The integers are displayed as in A277116, where the negative integers are depicted by using one more segment for the minus sign.
%C Since the integer 0 is depicted by 6 segments, in order to avoid considering -0 in the case n = 7, a(7) is obtained by decreasing of a unit the result of the sum A343315(7) + A343315(6) = 14 + 6 = 20, i.e., a(7) = 20 - 1 = 19.
%H Stefano Spezia, <a href="/A350440/b350440.txt">Table of n, a(n) for n = 0..4000</a>
%H Stefano Spezia, <a href="/A350440/a350440.pdf">Illustration for n = 7</a>
%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (0,1,1,1,4,2,1).
%H <a href="/index/Ca#calculatordisplay">Index entries for sequences related to calculator display</a>
%H <a href="/index/Com#comp">Index entries for sequences related to compositions</a>
%F a(7) = 19, otherwise a(n) = A343315(n) + A343315(n-1).
%F G.f.: x^2*(1 + 2*x + 2*x^2 + 5*x^3 + 6*x^4 + 2*x^5 - x^7 - x^8 - 4*x^9 - 2*x^10 - x^11)/(1 - x^2 - x^3 - x^4 - 4*x^5 - 2*x^6 - x^7).
%F a(n) = a(n-2) + a(n-3) + a(n-4) + 4*a(n-5) + 2*a(n-6) + a(n-7) for n > 13.
%e See illustration in Links section.
%t P[x_]:=x^2+x^3+x^4+4x^5+2x^6+x^7; c[n_]:=Coefficient[Sum[P[x]^k, {k, Max[1, Ceiling[n/7]], Floor[n/2]}], x, n]; b[n_]:=c[n]-c[n-6]; (* A343315 *)
%t a[n_]:=If[n!=7,b[n]+b[n-1],19]; Array[a, 40, 0]
%Y Cf. A277116, A343315.
%K nonn,base,easy
%O 0,4
%A _Stefano Spezia_, Dec 31 2021