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-4 of 4 results.

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

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

A143616 Record values in A010371.

Original entry on oeis.org

6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 27 2008

Keywords

Comments

a(n)=A010371(A143617(n)) and A010371(m)A143617(n);
{1,2,3,4,5,10} = complement(range of this sequence).

Programs

Formula

a(n) = n + 6 for n > 4. [Charles R Greathouse IV, Oct 26 2011]
Showing 1-4 of 4 results.