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.

Showing 1-10 of 10 results.

A006942 Number of segments used to represent n on calculator display, variant 5: digits '6', '7' and '9' use 6, 3 and 6 segments, respectively.

Original entry on oeis.org

6, 2, 5, 5, 4, 5, 6, 3, 7, 6, 8, 4, 7, 7, 6, 7, 8, 5, 9, 8, 11, 7, 10, 10, 9, 10, 11, 8, 12, 11, 11, 7, 10, 10, 9, 10, 11, 8, 12, 11, 10, 6, 9, 9, 8, 9, 10, 7, 11, 10, 11, 7, 10, 10, 9, 10, 11, 8, 12, 11, 12, 8, 11, 11, 10, 11, 12, 9, 13, 12, 9, 5, 8, 8, 7, 8, 9
Offset: 0

Views

Author

Keywords

Comments

a(A216261(n)) = n and a(m) <> n for m < A216261(n). - Reinhard Zumkeller, Mar 15 2013
If we mark with * resp. ' the graphical representations which use more resp. less segments, we have the following variants:
A063720 (6', 7', 9'), A277116 (6*, 7', 9'), A074458 (6*, 7*, 9'),
_____________ this: 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

Examples

			As depicted below, zero uses 6 segments, so a(0)=6.
   _     _  _       _   _   _   _   _
  | | |  _| _| |_| |_  |_    | |_| |_|
  |_| | |_  _|   |  _| |_|   | |_|  _|
.
[Edited by _Jon E. Schoenfield_, Jul 30 2017]
		

References

  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 65.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A216261 (least inverse), A165244 (sorted digits), A302552 (primes), A328330 (iterations), A331529 (histogram).
Variants are A010371, A063720, A074458, A277116, see comments.
See also A234691, A234692, A000120.

Programs

  • Haskell
    a006942 n = a006942_list !! n
    a006942_list = [6,2,5,5,4,5,6,3,7,6] ++ f 10 where
       f x = (a006942 x' + a006942 d) : f (x + 1)
             where (x',d) = divMod x 10
    -- Reinhard Zumkeller, Mar 15 2013
    
  • Maple
    A006942 := proc(n) local d,dig,j,s: if(n=0)then return 6:fi: dig:=[6,2,5,5,4,5,6,3,7,6]: d:=convert(n,base,10): s:=0: for j from 1 to nops(d) do s:=s+dig[d[j]+1]: od: return s: end: seq(A006942(n),n=0..100); # Nathaniel Johnston, May 08 2011
  • Mathematica
    MapIndexed[ (f[First[#2] - 1] = #1)& , {6, 2, 5, 5, 4, 5, 6, 3, 7, 6}]; a[n_] := Plus @@ f /@ IntegerDigits[n]; Table[a[n], {n, 0, 76}] (* Jean-François Alcover, Sep 25 2012 *)
    a[n_] := Plus @@ (IntegerDigits@ n /. {0 -> 6, 1 -> 2, 2 -> 5, 3 -> 5, 7 -> 3, 8 -> 7, 9 -> 6}); Array[a, 77, 0] (* Robert G. Wilson v, Jun 20 2018 *)
  • PARI
    a(n)=if(n==0, return(6)); my(d=digits(n),v=vector(10)); for(i=1,#d, v[d[i]+1]++); v*[6, 2, 5, 5, 4, 5, 6, 3, 7, 6]~ \\ Charles R Greathouse IV, Feb 05 2018
    
  • Python
    def a(n): return sum([6, 2, 5, 5, 4, 5, 6, 3, 7, 6][int(d)] for d in str(n))
    print([a(n) for n in range(77)]) # Michael S. Branicky, Jun 02 2021

Formula

a(n) = a(floor(n/10)) + a(n mod 10) for n > 9. - Reinhard Zumkeller, Mar 15 2013
a(n) = A010371(n) - A102679(n) + A102681(n) (subtract the number of digits 7 in n) = A277116(n) + A102683(n) (add number of digits 9 in n); and in particular, A063720(n) <= A277116(n) <= a(n) = A010371(n). - M. F. Hasler, Jun 17 2020

Extensions

More terms from Matthew Conroy, Sep 13 2001

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.

Original entry on oeis.org

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, 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, 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
Offset: 0

Views

Author

Olivier.Gagneux(AT)roche.com

Keywords

Comments

Except for 1 and 3 every positive integer occurs; A143616 and A143617 give record values and where they occur. - Reinhard Zumkeller, Aug 27 2008
The difference between this sequence and A006942 lies in the representation chosen for the digit 7,
| | |
| (here), vs. | in A006942.
If we mark with ' the "sans serif" graphical representation which uses one segment less and with * the "heavier" version, we have the following variants:
A063720 (6', 7', 9'), A277116 (6*, 7', 9'), A074458 (6*, 7*, 9'),
___________________ A006942 (6*, 7', 9*), A010371 (6*, 7*, 9*) = this.
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

Examples

			LCD Display (cf. Casio scientific calculator fx-3600P):
   _     _  _       _   _   _   _   _
  | | |  _| _| |_| |_  |_  | | |_| |_|
  |_| | |_  _|   |  _| |_|   | |_|  _|
		

Crossrefs

Segment variations: A006942, A063720, A074458, A277116.

Programs

  • Haskell
    a010371 n = a010371_list !! n
    a010371_list = [6,2,5,5,4,5,6,4,7,6] ++ f 10 where
       f x = (a010371 x' + a010371 d) : f (x + 1)
             where (x',d) = divMod x 10
    -- Reinhard Zumkeller, Mar 15 2013
    
  • Mathematica
    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 *)
  • PARI
    apply( {A010371(n)=digits(6255456476)[n%10+1]+if(n>9, self()(n\10))}, [0..99]) \\ M. F. Hasler, Jun 17 2020

Formula

For n > 9, a(n) = a(floor(n/10)) + a(n mod 10). - Reinhard Zumkeller, Aug 27 2008
a(n) = A000120(A234691(n)) = A000120(A234692(n))
= A006942(n) + A102679(n) - A102681(n) (add number of digits 7)
= A074458(n) + A102683(n) (add number of digits 9). - M. F. Hasler, Jun 17 2020

Extensions

Corrected and extended by Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Dec 27 1999
Edited name, comments, cross-references. - M. F. Hasler, Jun 17 2020

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.

Original entry on oeis.org

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, 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, 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
Offset: 0

Views

Author

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

Keywords

Comments

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

Examples

			The number 8 on a digital readout (e.g., on a calculator display) can be represented as
   -
  | |
   -
  | |
   -
which uses all 7 segments. Therefore a(8) = 7.
From _M. F. Hasler_, Jun 17 2020: (Start)
This sequence uses the following representations:
       _       _   _       _       _   _   _
      | |   |  _|  _| |_| |_  |_    | |_| |_|
      |_|   | |_   _|   |  _| |_|   | |_|   |
.
See crossrefs for other variants. (End)
		

Crossrefs

For variants see A006942, A010371, A074458, A277116 (cf. comments).
Other related sequences: A018846, A018847, A018849, A038136, A053701.

Programs

  • Haskell
    a063720 n = a063720_list !! n
    a063720_list = [6,2,5,5,4,5,5,3,7,5] ++ f 10 where
       f x = (a063720 x' + a063720 d) : f (x + 1)
             where (x',d) = divMod x 10
    -- Reinhard Zumkeller, Mar 15 2013
    
  • Mathematica
    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 *)
    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 *)
  • PARI
    apply( {A063720(n)=digits(6255455375)[n%10+1]+if(n>9, self()(n\10))}, [0..99]) \\ M. F. Hasler, Jun 17 2020

Formula

a(n) = a(floor(n/10)) + a(n mod 10) for n > 9. - Reinhard Zumkeller, Mar 15 2013
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

Extensions

More terms from Matthew Conroy, Sep 13 2001
Definition clarified by M. F. Hasler, Jun 17 2020

A074458 Number of segments lit to display the number n on a 7-segment display (as in pocket calculators): variant where '6', '7' and '9' use 6, 4 resp. 5 segments.

Original entry on oeis.org

6, 2, 5, 5, 4, 5, 6, 4, 7, 5, 8, 4, 7, 7, 6, 7, 8, 6, 9, 7, 11, 7, 10, 10, 9, 10, 11, 9, 12, 10, 11, 7, 10, 10, 9, 10, 11, 9, 12, 10, 10, 6, 9, 9, 8, 9, 10, 8, 11, 9, 11, 7, 10, 10, 9, 10, 11, 9, 12, 10, 12, 8, 11, 11, 10, 11, 12, 10, 13, 11, 10, 6, 9, 9, 8, 9, 10, 8, 11
Offset: 0

Views

Author

Y. Kelly Itakura (yitkr(AT)mta.ca), Aug 22 2002

Keywords

Comments

Sequences A234691 and A234692 use one bit for each lit segment. See crossrefs for other variants. - M. F. Hasler, Jun 17 2020

Examples

			LED display:
   _       _   _       _   _   _   _   _
  | |   |  _|  _| |_| |_  |_  | | |_| |_|
  |_|   | |_   _|   |  _| |_|   | |_|   |
.
so we have a(0) = 6, a(1) = 2, a(2) = 5 ...
		

Crossrefs

Cf. A074459.
For other versions of this sequence, see A006942 (7 with one segment less), A063720 (6 and 7 with one segment less), A010371 (9 with one segment more), A277116 (7 with one segment less, 9 with one segment more).

Programs

  • PARI
    apply( {A074458(n)=digits(6255456475)[n%10+1]+if(n>9,self()(n\10))}, [0..99]) \\ M. F. Hasler, Jun 17 2020

Formula

From M. F. Hasler, Jun 17 2020: (Start)
a(n) = a(n mod 10) + a(floor(n/10)) for n > 9.
a(n) = A006942(n) - A102679(n) + A102681(n). (End)

Extensions

Example edited by Jon E. Schoenfield, Jul 30 2017
Edited and extended to n > 9 by M. F. Hasler, Jun 17 2020

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.

Original entry on oeis.org

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
Offset: 0

Views

Author

Eric Ginsburg, Sep 30 2016

Keywords

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:
A063720 (6', 7', 9'), A277116 (6*, 7', 9'), A074458 (6*, 7*, 9'),
___________________ A006942 (6*, 7', 9*), A010371 (6*, 7*, 9*).
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

Examples

			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:
   _     _  _       _   _   _   _   _
  | | |  _| _| |_| |_  |_    | |_| |_|
  |_| | |_  _|   |  _| |_|   | |_|   | . - _M. F. Hasler_, Jun 17 2020
		

Crossrefs

Segment variations: A006942, A010371, A063720, A074458.

Programs

  • 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 *)
  • 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
    def A277116(n):
        s=0
        for i in str(n):
            s+=[6,2,5,5,4,5,6,3,7,5][int(i)]
        return s # Indranil Ghosh, Feb 02 2017

Formula

a(n) = A006942(n) - A102683(n). - Omar E. Pol, Sep 30 2016
a(n) = A063720(n) + A102677(n) - A102679(n) (add number of digits 6)
= A074458(n) - A102679(n) + A102681(n) (subtract number of digits 7)
and thus A063720(n) <= a(n) <= min(A074458(n), A006942(n)) <= A010371(n). - M. F. Hasler, Jun 17 2020

Extensions

Better definition and more terms from Omar E. Pol, Sep 30 2016
Edited by M. F. Hasler, Jun 17 2020

A234692 Decimal value of the bitmap of active segments in 7-segment display of the number n, variant 2 ("abcdefg" scheme: bits represent segments in clockwise order).

Original entry on oeis.org

63, 6, 91, 79, 102, 109, 125, 39, 127, 111, 831, 774, 859, 847, 870, 877, 893, 807, 895, 879, 11711, 11654, 11739, 11727, 11750, 11757, 11773, 11687, 11775, 11759, 10175, 10118, 10203, 10191, 10214, 10221, 10237, 10151, 10239, 10223, 13119, 13062, 13147, 13135, 13158
Offset: 0

Views

Author

M. F. Hasler, Dec 29 2013

Keywords

Comments

The bits 0-6 are assigned to the segments according to the "abcdefg" scheme (top, upper right, lower right, bottom, lower left, upper left, center), cf. section "Displaying letters" of the Wikipedia page (3rd column of the table). Other conventions are common in engineering (as well for the segment-to-bit correspondence as for the glyphs), see sequence A234691, the Wikipedia page and the comment after the Example for a(7).
For n > 9, each of the digits of the base-10 representation is coded in a separate group of 7 bits, for example, a(10) = a(1)*2^7 + a(0) = 831.
Alternatively, for n >= 10 one could define a(n) to represent a 7-segment variant of the characters A-Z and/or a-z, as in hexadecimal or base-64 encoding. In that case, one could also use a few more bits for additional segments, e.g., four half-diagonals to represent K, M, N, R, V, X, Z correctly and S distinctly from 5. But as mentioned on the Wikipedia page, a possible ambiguity of representations of alphabetic characters is not always an obstacle to common use, since whole words are usually readable nonetheless.
The Hamming weight A000120 of the terms of this sequence yields the count of lit segments, A010371(n) = A000120(a(n)) = A000120(A234691(n)). For that sequence, 5 other variants are in the OEIS, depending on the number of segments used to represent digits 6, 7 and 9: A063720 (6', 7', 9'), A277116 (7', 9'), A074458 (9') and A006942 (7'), where x' means that the "sans serif" variant (one segment less than here) is used for digit x. - M. F. Hasler, Jun 17 2020

Examples

			a(7) = 39 = 2^0 + 2^1 + 2^2 + 2^5, because the digit 7 is represented as
" _ " : bit 0,
"| |" : bits 5+1,
"  |" : bit 2,
and no bit 3 (bottom "_") nor 4 (lower left "|") nor 6 (central "-").
Although other glyphs do exist as well for 6, 9, 0 and maybe other digits, "7" is probably the digit where an alternate representation (without the upper left "|") is as common as the one we chose here.
		

Crossrefs

Cf. A234691 for a variant where bits 0-6 represent, in this order, the segments: top, upper left, upper right, center, lower left, lower right, bottom.
Cf. A000120 (Hamming weight), A010371 and variants A063720, A277116, A074458 and A006942: see comments.

Programs

  • PARI
    bitmap=apply(s->sum(i=1,#s=Vec(s),if(s[i]>" ",2^(i-1))), ["000000"," 11", "22 22 2", "3333  3", " 44  44", "5 55 55", "6 66666", "777  7", "8888888", "9999 99", "AAA AAA", "  bbbbb", "C  CCC "," dddd d", "E  EEEE", "F   FFF"]) \\ Could be extended to more alphabetical glyphs, see A234691.
    apply( {A234692(n)=bitmap[n%10+1]+if(n>9,self()(n\10)<<7)}, [0..99]) \\ M. F. Hasler, Jun 17 2020

Formula

a(n) = a(n mod 10) + a(floor(n/10))*2^7. - M. F. Hasler, Jun 17 2020

Extensions

Extended with hex digits (AbCdEF) to n=15 by M. F. Hasler, Dec 30 2013
a(10) and a(11) corrected thanks to Kevin Ryde, M. F. Hasler, Jun 16 2020
Definition changed for consistency with A010371, etc. by M. F. Hasler, Jun 17 2020

A216261 Smallest positive number using exactly n segments on a calculator display (when '6' and '7' are represented using 6 resp. 3 segments).

Original entry on oeis.org

1, 7, 4, 2, 0, 8, 10, 18, 22, 20, 28, 68, 88, 108, 188, 200, 208, 288, 688, 888, 1088, 1888, 2008, 2088, 2888, 6888, 8888, 10888, 18888, 20088, 20888, 28888, 68888, 88888, 108888, 188888, 200888, 208888, 288888, 688888, 888888, 1088888, 1888888, 2008888, 2088888, 2888888
Offset: 2

Views

Author

Reinhard Zumkeller, Mar 15 2013

Keywords

Comments

Essentially the same as A038619 and A143617. One could argue that a(3) should rather be -1 (prior to adding "positive" in the definition), which does use 3 segments on typical 7-segment displays, and is smaller than 7. Also, most pocket calculators and the Unicode standard (cf. links) use 4 rather than 3 segments to represent a '7' (as in A074458 and A010371, rather than A063720, A277116 or A006942), in which case a(3) is undefined if negative numbers are not allowed. No digit '9' will ever occur here, whether it would be represented with 6 or only 5 segments. However, digit '6' does occur, as the second smallest digit using 6 segments as does '0', which cannot occur as leading digit. If '6' is represented with 5 segments, any prefix 68 would be replaced with 80. - M. F. Hasler and Kevin Ryde, Jun 17 2020

Crossrefs

Cf. A038619 and A143617 (identical up to initial terms).

Programs

  • Haskell
    import Data.Maybe (fromJust)
    import Data.List (elemIndex)
    a216261 = fromJust . (`elemIndex` a006942_list)
    -- Reinhard Zumkeller, Mar 15 2013
    
  • Mathematica
    Drop[#, 2] &@ CoefficientList[Series[(x^2 + 6 x^3 - 3 x^4 - 2 x^5 - 2 x^6 + 8 x^7 + 2 x^8 - 2 x^9 - 56 x^10 + 28 x^11 + 28 x^12 + 60 x^13 - 60 x^14 - 28 x^17 + 28 x^18)/((1 - x) (1 - 10 x^7)), {x, 0, 50}], x] (* Michael De Vlieger, Jan 29 2016 *)
  • PARI
    Vec((x^2 +6*x^3 -3*x^4 -2*x^5 -2*x^6 +8*x^7 +2*x^8 -2*x^9 -56*x^10 +28*x^11 +28*x^12 +60*x^13 -60*x^14 -28*x^17 +28*x^18)/((1-x)*(1-10*x^7)) + O(x^50)) \\ Michel Marcus, Jan 29 2016

Formula

A006942(a(n)) = n and A006942(m) <> n for m < a(n).
a(n+7) = 10*a(n) + 8 for n > 10. This can be deduced from a(n) = min{10*a(n-A006942(r))+r, r=0..9} via strong induction. - David Radcliffe, Jan 29 2016
G.f.: (x^2 +6*x^3 -3*x^4 -2*x^5 -2*x^6 +8*x^7 +2*x^8 -2*x^9 -56*x^10 +28*x^11 +28*x^12 +60*x^13 -60*x^14 -28*x^17 +28*x^18)/((1-x)*(1-10*x^7)). - David Radcliffe, Jan 29 2016

Extensions

Name and cross-references edited by M. F. Hasler, Jun 17 2020

A038619 Smallest positive number that needs more lines when shown on a 7-segment display (digital clock) than any previous term.

Original entry on oeis.org

1, 2, 6, 8, 10, 18, 20, 28, 68, 88, 108, 188, 200, 208, 288, 688, 888, 1088, 1888, 2008, 2088, 2888, 6888, 8888, 10888, 18888, 20088, 20888, 28888, 68888, 88888, 108888, 188888, 200888, 208888, 288888, 688888, 888888, 1088888, 1888888, 2008888, 2088888, 2888888, 6888888, 8888888
Offset: 1

Views

Author

Keywords

Comments

For n > 1, a(n) uses n + 3 segments to be displayed, when a digit '6' uses 6 segments (as in A234691, A234692 and A277116, A074458, A006942, A010371, but not in A063720). Sequence A143617 is the same but starts with 0, 8, ... and A216261 has additional terms 7 & 4 before 2 and 22 before 20. - M. F. Hasler, Jun 23 2020

Examples

			Digits 0, 1, 2, ..., 9 use 6, 2, 5, 5, 4, 5, 6, 3, 7, 6 lines / segments.
		

Crossrefs

Programs

  • Mathematica
    Block[{f, s}, MapIndexed[(f[#2[[1]] - 1] = #1) &, {6, 2, 5, 5, 4, 5, 6, 3, 7, 6}]; s = Array[Total[f /@ IntegerDigits[#]] &, 10^7]; Map[FirstPosition[s, #][[1]] &, Union@ FoldList[Max, s]]] (* or *)
    Nest[Append[#1, If[#2 > 13, 10 #1[[-7]] + 8, 10 #1[[-6]] + Boole[#2 != 13] 8]] & @@ {#, Length@ # + 1} &, {1, 2, 6, 8, 10, 18, 20}, 36] (* Michael De Vlieger, Jun 23 2020 *)
    LinearRecurrence[{1,0,0,0,0,0,10,-10},{1,2,6,8,10,18,20,28,68,88,108,188,200,208},50] (* Harvey P. Dale, Aug 11 2025 *)
  • PARI
    apply( {A038619(n)=if(n>7, self()(n-6-(n>13))*10+(n!=13)*8, [1,2,6, 8,10,18,20][n])}, [1..33]) \\ M. F. Hasler, Jun 23 2020

Formula

For n >= 3, the terms with n digits are given by: 108*A + B, 188*A + B, 200*A + B, 208*A + B, 288*A + B, 688*A + B, 888*A + B where A = 10^(n-3), B = 8*(A - 1)/9.
From M. F. Hasler, Jun 23 2020: (Start)
a(n) = 10*a(n-7) + 8 for n > 13 (and with a(n-6) for 7 < n < 13).
G.f.: (1 + x + 4*x^2 + 2*x^3 + 2*x^4 + 8*x^5 + 2*x^6 - 2*x^7 + 30*x^8 - 20*x^9 + 60*x^11 - 68*x^12 - 12*x^13)/((1 - x)*(1 - x^10)).
(End)
a(n) = a(n-1) + 10*a(n-7) - 10*a(n-8), for n >= 15. - Wesley Ivan Hurt, Jun 29 2020

Extensions

Edited and offset corrected to 1 by M. F. Hasler, Jun 23 2020
More terms from Michael De Vlieger, Jun 23 2020
More terms from M. F. Hasler, Jun 23 2020

A338111 Times displayed on an hour|minute 12-hour 7-segment digital clock, arranged in order of increasing brightness (see Comments).

Original entry on oeis.org

111, 117, 711, 114, 141, 411, 717, 1111, 112, 113, 115, 121, 131, 147, 151, 211, 311, 417, 511, 714, 741, 1117, 101, 110, 116, 119, 127, 137, 144, 157, 217, 317, 414, 441, 517, 611, 712, 713, 715, 721, 731, 747, 751, 911, 1114, 1141, 107, 118, 124, 134, 142
Offset: 1

Views

Author

Harvey P. Dale, Oct 10 2020

Keywords

Comments

Consider a 12-hour digital clock with 4 digits, each of which comprises 7 facets (or segments or lights). The terms of the sequence list the times of day starting with the dimmest overall display, i.e., when the fewest total facets are lit up, to the brightest overall display, i.e., when the most total facets are lit up.The terms are sorted by dimness/brightness and then by smallest-to-largest number.
If the digits are labeled A, B, C, D from left to right, digit A is completely dark from 1:00 until after 9:59, and then has 2 facets lit up from 10:00 through 12:59. Digits B and D will each display numbers from 0 to 9 and thus will have between 2 and 7 facets lit up. Digit C will display numbers from 0 to 5 and thus will have between 2 and 6 facets lit up.
The sequence displays each time of day without the customary colon separating hours from minutes, so for example 12:36 is displayed as 1236 and 9:14 is displayed as 914.
The dimmest display is for 1:11 (or 111) when 6 facets in total are lit up. The brightest display is for 10:08 (or 1008) when 21 facets are lit up. The sequence has 720 terms altogether.

Examples

			111 is displayed with digit A dark and with 2 facets of each of digits B, C, and D lit up. Thus 111 has a total of 6 facets lit up. 1008 is displayed with 2 facets of digit A lit up, with 6 facets of digits B and C lit up, and with 7 facets of digit D lit up. Thus 1008 has a total of 21 facets lit up.
		

Crossrefs

Programs

  • Mathematica
    SortBy[{#,Total[IntegerDigits[#]/.{0->6,1->2,2->5,3->5,7->3,8->7,9->6}]}&/@ FromDigits/@Flatten[Table[Join[IntegerDigits[ h],PadLeft[ IntegerDigits[ m],2,0]],{h,12},{m,0,59}],1],{Last,First}][[All,1]]

A071843 Gives an LCD representation of n.

Original entry on oeis.org

119, 17, 107, 59, 29, 62, 126, 19, 127, 63, 15249, 2193, 13713, 7569, 3729, 7953, 16145, 2449, 16273, 8081, 15339, 2283, 13803, 7659, 3819, 8043, 16235, 2539, 16363, 8171, 15291, 2235, 13755, 7611, 3771, 7995, 16187, 2491, 16315, 8123, 15261, 2205
Offset: 0

Views

Author

Anonymous, Jun 08 2002

Keywords

Comments

This is based on the following way of writing "8":
|--2--|
4.....1
|--8--|
64...16
|-32--|
The powers of 2 present in the LCD representation are added. For example: n=1 gives 1 + 16 = 17. According to the position of a digit in n, [1,2,4...] is replaced by [128,256...],[16384,32768...], etc.

Crossrefs

Cf. A006942 (bitcount).
Coding and glyph variations: A234691, A234692.

Programs

  • Scilab
    function lcd: nb: final result ndc: number of digits u: interesting digit M(i,j): (j-1)th bit of (i-1) function [nb]=lcd(n); nb=0; M=[1 1 1 0 1 1 1; 1 0 0 0 1 0 0; 1 1 0 1 0 1 1; 1 1 0 1 1 1 0; 1 0 1 1 1 0 0; 0 1 1 1 1 1 0; 0 1 1 1 1 1 1; 1 1 0 0 1 0 0; 1 1 1 1 1 1 1; 1 1 1 1 1 1 0]; if n <> 0 then ndc=int(log10(n))+1,else ndc = 1,end; for cx = ndc:-1:1; u=int(n/(10^(cx-1))); n=n-u*(10^(cx-1)); for j=0:6; nb=nb+M(u+1,j+1)*2^(j+7*(ndc-cx)),end,end; endfunction

Extensions

More terms from Antonio G. Astudillo, Apr 21 2003
Showing 1-10 of 10 results.