OFFSET
0,4
COMMENTS
The integers are displayed as in A006942, where a 7 is depicted by 3 segments. 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 A331529(7) + A331529(6) = 12 + 7 = 19, i.e., a(7) = 19 - 1 = 18.
The same sequence is obtained when 7 and 9 are depicted respectively by 4 and 5 segments (A074458).
LINKS
FORMULA
EXAMPLE
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)
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]
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Stefano Spezia, Dec 31 2021
STATUS
approved