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 A063720 #33 Mar 27 2021 13:24:30 %S A063720 6,2,5,5,4,5,5,3,7,5,8,4,7,7,6,7,7,5,9,7,11,7,10,10,9,10,10,8,12,10, %T A063720 11,7,10,10,9,10,10,8,12,10,10,6,9,9,8,9,9,7,11,9,11,7,10,10,9,10,10, %U A063720 8,12,10,11,7,10,10,9,10,10,8,12,10,9,5,8,8,7,8,8,6,10,8,13,9,12,12,11,12 %N A063720 Number of segments lit in a 7-segment display (as on a calculator) to represent the number n, variant 0: '6', '7' and '9' use 5, 3 and 5 segments, respectively. %C A063720 If we mark with * resp. ' the glyph variants (graphical representations) which use more resp. less segments, we have the following variants: %C A063720 A063720 (this: 6', 7', 9'), A277116 (6*, 7', 9'), A074458 (6*, 7*, 9'), ___________________________ A006942 (6*, 7', 9*), A010371 (6*, 7*, 9*). Sequences A234691, A234692 and variants make precise which segments are lit in each digit. These 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 A063720 Reinhard Zumkeller, <a href="/A063720/b063720.txt">Table of n, a(n) for n = 0..10000</a> %H A063720 <a href="/index/Ca#calculatordisplay">Index entries for sequences related to calculator display</a> %F A063720 a(n) = a(floor(n/10)) + a(n mod 10) for n > 9. - _Reinhard Zumkeller_, Mar 15 2013 %F A063720 a(n) <= A277116(n) <= min{A006942(n), A074458(n)} <= A010371(n); differences between these are given, e.g., by A102677(n) - A102679(n) (= number of digits 7 in n). - _M. F. Hasler_, Jun 17 2020 %e A063720 The number 8 on a digital readout (e.g., on a calculator display) can be represented as %e A063720 - %e A063720 | | %e A063720 - %e A063720 | | %e A063720 - %e A063720 which uses all 7 segments. Therefore a(8) = 7. %e A063720 From _M. F. Hasler_, Jun 17 2020: (Start) %e A063720 This sequence uses the following representations: %e A063720 _ _ _ _ _ _ _ %e A063720 | | | _| _| |_| |_ |_ | |_| |_| %e A063720 |_| | |_ _| | _| |_| | |_| | %e A063720 . %e A063720 See crossrefs for other variants. (End) %t A063720 a[n_ /; n <= 9] := a[n] = {6, 2, 5, 5, 4, 5, 5, 3, 7, 5}[[n+1]]; a[n_] := a[n] = a[Quotient[n, 10]] + a[Mod[n, 10]]; Table[a[n], {n, 0, 85}] (* _Jean-François Alcover_, Aug 12 2013, after _Reinhard Zumkeller_ *) %t A063720 Table[Total[IntegerDigits[n]/.{0->6,1->2,2->5,3->5,6->5,7->3,8->7,9->5}],{n,0,90}] (* _Harvey P. Dale_, Mar 27 2021 *) %o A063720 (Haskell) %o A063720 a063720 n = a063720_list !! n %o A063720 a063720_list = [6,2,5,5,4,5,5,3,7,5] ++ f 10 where %o A063720 f x = (a063720 x' + a063720 d) : f (x + 1) %o A063720 where (x',d) = divMod x 10 %o A063720 -- _Reinhard Zumkeller_, Mar 15 2013 %o A063720 (PARI) apply( {A063720(n)=digits(6255455375)[n%10+1]+if(n>9, self()(n\10))}, [0..99]) \\ _M. F. Hasler_, Jun 17 2020 %Y A063720 For variants see A006942, A010371, A074458, A277116 (cf. comments). %Y A063720 Other related sequences: A018846, A018847, A018849, A038136, A053701. %K A063720 nonn,base,nice %O A063720 0,1 %A A063720 Deepan Majmudar (deepan.majmudar(AT)compaq.com), Aug 23 2001 %E A063720 More terms from _Matthew Conroy_, Sep 13 2001 %E A063720 Definition clarified by _M. F. Hasler_, Jun 17 2020