Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #14 Jan 11 2022 22:05:08
%S 0,0,1,1,3,6,11,14,23,39,71,118,195,317,537,906,1533,2550,4261,7119,
%T 11973,20073,33650,56277,94286,157960,264843,443656,743269,1244915,
%U 2085970,3494922,5855965,9810370,16436113,27536138,46135634,77295509,129501787,216963199,363500178
%N a(n) is the number of integers that can be represented in a 7-segment display by using only n segments (version A010371).
%C The integers are displayed as in A010371, where a 7 is depicted by 4 segments. The negative integers are depicted by using 1 segment more 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 A331530(7) + A331530(6) = 7 + 8 = 15, i.e., a(7) = 15 - 1 = 14.
%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (0,1,0,2,3,3,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) = 14, otherwise a(n) = A331530(n) + A331530(n-1).
%F G.f.: x^2*(1 + x + 2*x^2 + 5*x^3 + 6*x^4 + 3*x^5 -2x^8- 3*x^9 - 3*x^10 - x^11)/(1 - x^2 -2 x^4 - 3*x^5 - 3*x^6 - x^7).
%F a(n) = a(n-2) + 2*a(n-4) + 3*a(n-5) + 3*a(n-6) + a(n-7) for n > 13.
%e a(7) = 14 since -111, -71, -41, -17, -14, -9, -6, 8, 12, 13, 15, 21, 31 and 51 are displayed by 7 segments.
%e __ __
%e __ | | | __ | | | __ |__| | __ | | | __ | |__|
%e | | | | | | | | | | |
%e (-111) (-71) (-41) (-17) (-14)
%e __ __ __ __ __ __ __
%e __ |__| __ |__ |__| | __| | __| | |__ __| |
%e __| |__| |__| | |__ | __| | __| |__ |
%e (-9) (-6) (8) (12) (13) (15) (21)
%e __ __
%e __| | |__ |
%e __| | __| |
%e (31) (51)
%t P[x_]:=x^2+2x^4+3x^5+3x^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]; (* A331530 *)
%t a[n_]:=If[n!=7,b[n]+b[n-1],14]; Array[a, 41, 0]
%Y Cf. A010371, A331530.
%K nonn,base,easy
%O 0,5
%A _Stefano Spezia_, Dec 31 2021