|
|
A277116
|
|
Number of segments used to represent the number n on a 7-segment display: variant where digits 6, 7 and 9 use 6, 3 and 5 segments, respectively.
|
|
16
|
|
|
6, 2, 5, 5, 4, 5, 6, 3, 7, 5, 8, 4, 7, 7, 6, 7, 8, 5, 9, 7, 11, 7, 10, 10, 9, 10, 11, 8, 12, 10, 11, 7, 10, 10, 9, 10, 11, 8, 12, 10, 10, 6, 9, 9, 8, 9, 10, 7, 11, 9, 11, 7, 10, 10, 9, 10, 11, 8, 12, 10, 12, 8, 11, 11, 10, 11, 12, 9, 13, 11, 9, 5, 8, 8, 7, 8, 9
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
Another version of A006942. Here the digit "6" is represented with six segments (the same as in A006942) but the digit "9" is represented with five segments instead of six segments. - Omar E. Pol, Sep 30 2016
If we mark with * resp. ' the graphical representations which use one more resp. one less segment, we have the following variants:
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
For n = 29, digit '2' uses 5 segments and digit '9' uses 5 segments. So, a(29) = 10. - Indranil Ghosh, Feb 02 2017
The digits are represented as follows:
_ _ _ _ _ _ _ _
| | | _| _| |_| |_ |_ | |_| |_|
|
|
MATHEMATICA
|
Table[Total[IntegerDigits[n] /. {0 -> 6, 1 -> 2, 2 -> 5, 3 -> 5, 6 -> 6, 7 -> 3, 8 -> 7, 9 -> 5}], {n, 0, 120}] (* Michael De Vlieger, Sep 30 2016 *)
|
|
PROG
|
(PARI) a(n) = my(segm=[6, 2, 5, 5, 4, 5, 6, 3, 7, 5], d=digits(n), s=0); if(n==0, s=6, for(k=1, #d, s=s+segm[d[k]+1])); s \\ Felix Fröhlich, Oct 05 2016
(Python)
s=0
for i in str(n):
s+=[6, 2, 5, 5, 4, 5, 6, 3, 7, 5][int(i)]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Better definition and more terms from Omar E. Pol, Sep 30 2016
|
|
STATUS
|
approved
|
|
|
|