OFFSET
1,2
COMMENTS
a(n) is the least number using n + 6 (or n + 5 for n < 5) segments on a 7-segment display, when '6' uses 6 segments. This is essentially the same as A038619 (starts with 1, 2, 6 instead of 0) and A216261 (= a(n) uses n segments: has 4 values before 0 and 22 before 20). - M. F. Hasler, Jun 17 2020
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,10,-10).
FORMULA
a(n+7) = 10*a(n) + 8 for n > 4.
A010371(a(n)) = n + 6 for n > 4. - M. F. Hasler, Jun 23 2020
a(n) = a(n-1) + 10*a(n-7) - 10*a(n-8). - Wesley Ivan Hurt, Jul 03 2020
MATHEMATICA
Block[{f, s}, MapIndexed[(f[#2[[1]] - 1] = #1) &, {6, 2, 5, 5, 4, 5, 6, 4, 7, 6}]; s = Array[Total[f /@ IntegerDigits[#]] &, 10^6, 0]; Map[-1 + FirstPosition[s, #][[1]] &, Union@ FoldList[Max, s]]] (* Michael De Vlieger, Jun 23 2020 *)
PROG
(PARI) apply( {A143617(n)=if(n>11, self()(n-7)*10+8, n>9, 12*n+68, n>6, 20*n-72, n*5-2-n%2*3)}, [1..55]) \\ M. F. Hasler, Jun 23 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Aug 27 2008
STATUS
approved