A350437 a(n) is the number of integers that can be represented in a 7-segment display by using only n segments (version A006942).
0, 0, 1, 2, 3, 7, 12, 18, 31, 52, 92, 158, 269, 460, 786, 1350, 2317, 3969, 6798, 11643, 19952, 34197, 58601, 100410, 172042, 294791, 505143, 865589, 1483206, 2541480, 4354847, 7462119, 12786520, 21909974, 37543133, 64330800, 110232005, 188884671, 323657539, 554593317
Offset: 0
Examples
a(7) = 18 since -111, -77, -41, -14, -9, -6, 8, 12, 13, 15, 21, 31, 47, 51, 74, 117, 171 and 711 are displayed by 7 segments. segments. __ __ __ __ | | | __ | | __ |__| | __ | |__| __ |__| | | | | | | | | | __| (-111) (-77) (-41) (-14) (-9) __ __ __ __ __ __ __ __ |__ |__| | __| | __| | |__ __| | __| | |__| |__| | |__ | __| | __| |__ | __| | (-6) (8) (12) (13) (15) (21) (31) __ __ __ __ __ __ |__| | |__ | | |__| | | | | | | | | | | | __| | | | | | | | | | | | | (47) (51) (74) (117) (171) (711)
Links
Programs
-
Mathematica
P[x_]:=x^2+x^3+x^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]; (* A331529 *) a[n_]:=If[n!=7,b[n]+b[n-1],18]; Array[a,40,0]
Comments