This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A277116 #54 Sep 01 2020 06:24:56 %S A277116 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, %T A277116 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, %U A277116 8,12,10,12,8,11,11,10,11,12,9,13,11,9,5,8,8,7,8,9 %N 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. %C A277116 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 %C A277116 If we mark with * resp. ' the graphical representations which use one more resp. one less segment, we have the following variants: %C A277116 A063720 (6', 7', 9'), A277116 (6*, 7', 9'), A074458 (6*, 7*, 9'), %C A277116 _____________________ A006942 (6*, 7', 9*), A010371 (6*, 7*, 9*). %C A277116 Sequences A234691 and A234692 make precise which segments are lit in each digit. They are related through the Hamming weight function A000120, e.g., A010371(n) = A000120(A234691(n)) = A000120(A234692(n)). - _M. F. Hasler_, Jun 17 2020 %H A277116 Indranil Ghosh, <a href="/A277116/b277116.txt">Table of n, a(n) for n = 0..50000</a> %H A277116 Wikipedia, <a href="http://en.wikipedia.org/wiki/Seven-segment_display">Seven-segment display</a>. %H A277116 <a href="/index/Ca#calculatordisplay">Index entries for sequences related to calculator display</a> %F A277116 a(n) = A006942(n) - A102683(n). - _Omar E. Pol_, Sep 30 2016 %F A277116 a(n) = A063720(n) + A102677(n) - A102679(n) (add number of digits 6) %F A277116 = A074458(n) - A102679(n) + A102681(n) (subtract number of digits 7) %F A277116 and thus A063720(n) <= a(n) <= min(A074458(n), A006942(n)) <= A010371(n). - _M. F. Hasler_, Jun 17 2020 %e A277116 For n = 29, digit '2' uses 5 segments and digit '9' uses 5 segments. So, a(29) = 10. - _Indranil Ghosh_, Feb 02 2017 %e A277116 The digits are represented as follows: %e A277116 _ _ _ _ _ _ _ _ %e A277116 | | | _| _| |_| |_ |_ | |_| |_| %e A277116 |_| | |_ _| | _| |_| | |_| | . - _M. F. Hasler_, Jun 17 2020 %t A277116 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 *) %o A277116 (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 %o A277116 (Python) %o A277116 def A277116(n): %o A277116 s=0 %o A277116 for i in str(n): %o A277116 s+=[6,2,5,5,4,5,6,3,7,5][int(i)] %o A277116 return s # _Indranil Ghosh_, Feb 02 2017 %Y A277116 Segment variations: A006942, A010371, A063720, A074458. %Y A277116 Cf. A102683, A234691, A234692. %K A277116 nonn,easy,base %O A277116 0,1 %A A277116 _Eric Ginsburg_, Sep 30 2016 %E A277116 Better definition and more terms from _Omar E. Pol_, Sep 30 2016 %E A277116 Edited by _M. F. Hasler_, Jun 17 2020