login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) is the number of integers that can be represented in a 7-segment display by using only n segments (version A063720).
0

%I #16 Jan 11 2022 22:05:18

%S 0,0,1,2,3,9,12,20,35,58,116,180,329,560,970,1742,2933,5213,8954,

%T 15627,27340,47171,82661,143054,249474,434167,754011,1314511,2282754,

%U 3975774,6914639,12026735,20933900,36399440,63351409,110191798,191708837,333553521,580209879

%N a(n) is the number of integers that can be represented in a 7-segment display by using only n segments (version A063720).

%C The integers are displayed as in A063720, where 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 A343314(7) + A343314(6) = 16 + 5 = 21, i.e., a(7) = 21 - 1 = 20.

%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (0,1,1,1,5,1,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) = 20, otherwise a(n) = A343314(n) + A343314(n-1).

%F G.f.: x^2*(1 + 2*x + 2*x^2 + 6*x^3 + 6*x^4 + x^5 - x^7 - x^8 - 5*x^9 - x^10 - x^11)/(1 - x^2 - x^3 - x^4 - 5*x^5 - x^6 - x^7).

%F a(n) = a(n-2) + a(n-3) + a(n-4) + 5*a(n-5) + a(n-6) + a(n-7) for n > 13.

%e a(7) = 20 since -111, -77, -41, -14, 8, 12, 13, 15, 16, 19, 21, 31, 47, 51, 61, 74, 91, 117, 171 and 711 are displayed by 7 segments.

%e __ __ __

%e __ | | | __ | | __ |__| | __ | |__| |__|

%e | | | | | | | | | |__|

%e (-111) (-77) (-41) (-14) (8)

%e __ __ __ __ __

%e | __| | __| | |__ | |__ | |__| __| |

%e | |__ | __| | __| | |__| | | |__ |

%e (12) (13) (15) (16) (19) (21)

%e __ __ __ __

%e __| | |__| | |__ | |__ | | |__|

%e __| | | | __| | |__| | | |

%e (31) (47) (51) (61) (74)

%e __ __ __ __

%e |__| | | | | | | | | | |

%e | | | | | | | | | | |

%e (91) (117) (171) (711)

%t P[x_]:=x^2+x^3+x^4+5x^5+x^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]; (* A343314 *)

%t a[n_]:=If[n!=7,b[n]+b[n-1],20];Array[a, 39, 0]

%Y Cf. A063720, A343314.

%K nonn,base,easy

%O 0,4

%A _Stefano Spezia_, Dec 31 2021