cp's OEIS Frontend

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.

A010371 Number of segments used to represent n on a 7-segment calculator display; version where '6', '7' and '9' use 6, 4 and 6 segments, respectively.

This page as a plain text file.
%I A010371 #50 Jul 29 2025 08:39:07
%S A010371 6,2,5,5,4,5,6,4,7,6,8,4,7,7,6,7,8,6,9,8,11,7,10,10,9,10,11,9,12,11,
%T A010371 11,7,10,10,9,10,11,9,12,11,10,6,9,9,8,9,10,8,11,10,11,7,10,10,9,10,
%U A010371 11,9,12,11,12,8,11,11,10,11,12,10,13,12,10,6,9,9,8,9,10,8,11,10,13,9,12,12
%N A010371 Number of segments used to represent n on a 7-segment calculator display; version where '6', '7' and '9' use 6, 4 and 6 segments, respectively.
%C A010371 Except for 1 and 3 every positive integer occurs; A143616 and A143617 give record values and where they occur. - _Reinhard Zumkeller_, Aug 27 2008
%C A010371 The difference between this sequence and A006942 lies in the representation chosen for the digit 7,
%C A010371    _                 _
%C A010371   | |                 |
%C A010371     |  (here), vs.    |  in A006942.
%C A010371 If we mark with ' the "sans serif" graphical representation which uses one segment less and with * the "heavier" version, we have the following variants:
%C A010371   A063720 (6', 7', 9'), A277116 (6*, 7', 9'), A074458 (6*, 7*, 9'),
%C A010371   _____________________ A006942 (6*, 7', 9*), A010371 (6*, 7*, 9*) = this.
%C A010371   Sequences A234691, A234692 and variants make precise which segments are lit in each digit. They are related through the Hamming weight A000120, see formula. The sequence could be extended to negative arguments with a(-n) = a(n)+1. - _M. F. Hasler_, Jun 17 2020
%H A010371 R. Zumkeller, <a href="/A010371/b010371.txt">Table of n, a(n) for n = 0..10000</a>
%H A010371 <a href="/index/Ca#calculatordisplay">Index entries for sequences related to calculator display</a>
%F A010371 For n > 9, a(n) = a(floor(n/10)) + a(n mod 10). - _Reinhard Zumkeller_, Aug 27 2008
%F A010371 a(n) = A000120(A234691(n)) = A000120(A234692(n))
%F A010371   = A006942(n) + A102679(n) - A102681(n) (add number of digits 7)
%F A010371 = A074458(n) + A102683(n) (add number of digits 9). - _M. F. Hasler_, Jun 17 2020
%e A010371 LCD Display (cf. Casio scientific calculator fx-3600P):
%e A010371    _     _  _       _   _   _   _   _
%e A010371   | | |  _| _| |_| |_  |_  | | |_| |_|
%e A010371   |_| | |_  _|   |  _| |_|   | |_|  _|
%t A010371 MapIndexed[(f[#2[[1]]-1] = #1)&, {6, 2, 5, 5, 4, 5, 6, 4, 7, 6}]; a[n_] := Total[f /@ IntegerDigits[n]]; Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, Mar 08 2017 *)
%o A010371 (Haskell)
%o A010371 a010371 n = a010371_list !! n
%o A010371 a010371_list = [6,2,5,5,4,5,6,4,7,6] ++ f 10 where
%o A010371    f x = (a010371 x' + a010371 d) : f (x + 1)
%o A010371          where (x',d) = divMod x 10
%o A010371 -- _Reinhard Zumkeller_, Mar 15 2013
%o A010371 (PARI) apply( {A010371(n)=digits(6255456476)[n%10+1]+if(n>9, self()(n\10))}, [0..99]) \\ _M. F. Hasler_, Jun 17 2020
%Y A010371 Segment variations: A006942, A063720, A074458, A277116.
%Y A010371 Cf. A000120, A234691, A234692.
%K A010371 nonn,base,easy,nice,look
%O A010371 0,1
%A A010371 Olivier.Gagneux(AT)roche.com
%E A010371 Corrected and extended by Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Dec 27 1999
%E A010371 Edited name, comments, cross-references. - _M. F. Hasler_, Jun 17 2020