login
A350439
a(n) is the number of integers that can be represented in a 7-segment display by using only n segments (version A063720).
0
0, 0, 1, 2, 3, 9, 12, 20, 35, 58, 116, 180, 329, 560, 970, 1742, 2933, 5213, 8954, 15627, 27340, 47171, 82661, 143054, 249474, 434167, 754011, 1314511, 2282754, 3975774, 6914639, 12026735, 20933900, 36399440, 63351409, 110191798, 191708837, 333553521, 580209879
OFFSET
0,4
COMMENTS
The integers are displayed as in A063720, where the negative integers are depicted by using 1 segment more for the minus sign.
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.
FORMULA
a(7) = 20, otherwise a(n) = A343314(n) + A343314(n-1).
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).
a(n) = a(n-2) + a(n-3) + a(n-4) + 5*a(n-5) + a(n-6) + a(n-7) for n > 13.
EXAMPLE
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.
__ __ __
__ | | | __ | | __ |__| | __ | |__| |__|
| | | | | | | | | |__|
(-111) (-77) (-41) (-14) (8)
__ __ __ __ __
| __| | __| | |__ | |__ | |__| __| |
| |__ | __| | __| | |__| | | |__ |
(12) (13) (15) (16) (19) (21)
__ __ __ __
__| | |__| | |__ | |__ | | |__|
__| | | | __| | |__| | | |
(31) (47) (51) (61) (74)
__ __ __ __
|__| | | | | | | | | | |
| | | | | | | | | | |
(91) (117) (171) (711)
MATHEMATICA
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 *)
a[n_]:=If[n!=7, b[n]+b[n-1], 20]; Array[a, 39, 0]
CROSSREFS
Sequence in context: A182203 A168080 A048084 * A067719 A057017 A330298
KEYWORD
nonn,base,easy
AUTHOR
Stefano Spezia, Dec 31 2021
STATUS
approved