A241217 Largest number that when multiplied by 7 produces an n-digit number.
1, 14, 142, 1428, 14285, 142857, 1428571, 14285714, 142857142, 1428571428, 14285714285, 142857142857, 1428571428571, 14285714285714, 142857142857142, 1428571428571428, 14285714285714285, 142857142857142857, 1428571428571428571, 14285714285714285714
Offset: 1
Examples
14*7 = 98 but 15*7 = 105 (too large) so a(2) = 14.
References
- Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See Table 34 at p. 62.
Links
- Index entries for linear recurrences with constant coefficients, signature (11,-10,-1,11,-10).
Programs
-
Mathematica
LinearRecurrence[{11,-10,-1,11,-10},{1,14,142,1428,14285},30] (* Harvey P. Dale, Mar 03 2024 *)
-
PARI
a(n) = floor(10^n/7); \\ Michel Marcus, Apr 21 2014
Formula
a(n) = floor(10^n/7). - Michel Marcus, Apr 21 2014
G.f.: x*(1+3*x-2*x^2+7*x^3)/((x-1)*(10*x-1)*(x+1)*(x^2-x+1)). - Alois P. Heinz, Apr 30 2014
E.g.f.: (3*cosh(10*x) - 7*cosh(x) + 2*exp(x/2)*(2*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2)) - 14*sinh(x) + 3*sinh(10*x))/21. - Stefano Spezia, Jul 31 2024
Extensions
More terms from Michel Marcus, Apr 21 2014
Comments