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, 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
Examples
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)
Links
Programs
-
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]
Comments