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.

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