A363377 Largest positive integer having n holes that can be made using the fewest possible digits.
7, 9, 8, 98, 88, 988, 888, 9888, 8888, 98888, 88888, 988888, 888888, 9888888, 8888888, 98888888, 88888888, 988888888, 888888888, 9888888888, 8888888888, 98888888888, 88888888888, 988888888888, 888888888888, 9888888888888, 8888888888888, 98888888888888, 88888888888888, 988888888888888
Offset: 0
Examples
For n=0, the largest integer with no holes in it that is as short as possible is 7 (9 is larger, but has 1 hole; 11 is larger and has no holes, but is longer at length 2 > length 1). For n=1, the largest integer with 1 hole that is as short as possible is 9 (following the same kind of reasoning as with n=0).
Links
Crossrefs
Programs
-
Mathematica
CoefficientList[Series[(7 + 2 x - 71 x^2 + 70 x^3)/((1 - x) (1 - 10 x^2)), {x, 0, 30}], x] (* Michael De Vlieger, Jul 05 2023 *)
-
Python
A363377=lambda n: (8+n%2*81)*10**(n>>1)//9 if n else 7 print([A363377(n) for n in range(30)]) # Natalia L. Skirrow, Jun 26 2023
Formula
From Natalia L. Skirrow, Jun 26 2023: (Start)
a(n) = (89*(10^((n-1)/2))-8)/9 for odd n; a(n) = 8*(10^(n/2)-1)/9 for even n >= 2.
a(n) = a(n-1) + 10*a(n-2) - 10*a(n-3), for n >= 4.
G.f.: (7+2*x-71*x^2+70*x^3)/((1-x)*(1-10*x^2)).
E.g.f.: (80*cosh(sqrt(10)*x) + 89*sqrt(10)*sinh(sqrt(10)*x) - 80*e^x)/90 + 7. (End)
Comments