login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 19

%I #33 Mar 27 2021 13:24:30

%S 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 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 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 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 If we mark with * resp. ' the glyph variants (graphical representations) which use more resp. less segments, we have the following variants:

%C 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 Reinhard Zumkeller, <a href="/A063720/b063720.txt">Table of n, a(n) for n = 0..10000</a>

%H <a href="/index/Ca#calculatordisplay">Index entries for sequences related to calculator display</a>

%F a(n) = a(floor(n/10)) + a(n mod 10) for n > 9. - _Reinhard Zumkeller_, Mar 15 2013

%F 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 The number 8 on a digital readout (e.g., on a calculator display) can be represented as

%e -

%e | |

%e -

%e | |

%e -

%e which uses all 7 segments. Therefore a(8) = 7.

%e From _M. F. Hasler_, Jun 17 2020: (Start)

%e This sequence uses the following representations:

%e _ _ _ _ _ _ _

%e | | | _| _| |_| |_ |_ | |_| |_|

%e |_| | |_ _| | _| |_| | |_| |

%e .

%e See crossrefs for other variants. (End)

%t 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 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 (Haskell)

%o a063720 n = a063720_list !! n

%o a063720_list = [6,2,5,5,4,5,5,3,7,5] ++ f 10 where

%o f x = (a063720 x' + a063720 d) : f (x + 1)

%o where (x',d) = divMod x 10

%o -- _Reinhard Zumkeller_, Mar 15 2013

%o (PARI) apply( {A063720(n)=digits(6255455375)[n%10+1]+if(n>9, self()(n\10))}, [0..99]) \\ _M. F. Hasler_, Jun 17 2020

%Y For variants see A006942, A010371, A074458, A277116 (cf. comments).

%Y Other related sequences: A018846, A018847, A018849, A038136, A053701.

%K nonn,base,nice

%O 0,1

%A Deepan Majmudar (deepan.majmudar(AT)compaq.com), Aug 23 2001

%E More terms from _Matthew Conroy_, Sep 13 2001

%E Definition clarified by _M. F. Hasler_, Jun 17 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 04:42 EDT 2024. Contains 371964 sequences. (Running on oeis4.)