A332171 a(n) = 7*(10^(2n+1)-1)/9 - 6*10^n.
1, 717, 77177, 7771777, 777717777, 77777177777, 7777771777777, 777777717777777, 77777777177777777, 7777777771777777777, 777777777717777777777, 77777777777177777777777, 7777777777771777777777777, 777777777777717777777777777, 77777777777777177777777777777, 7777777777777771777777777777777
Offset: 0
Links
- Makoto Kamada, Factorization of 77...77177...77.
- Index entries for linear recurrences with constant coefficients, signature (111,-1110,1000).
Crossrefs
Programs
-
Mathematica
Array[7 (10^(2 # + 1) - 1)/9 - 6*10^# &, 15, 0] (* or *) CoefficientList[Series[(1 + 606 x - 1300 x^2)/((1 - x) (1 - 10 x) (1 - 100 x)), {x, 0, 15}], x] (* Michael De Vlieger, Feb 08 2020 *) Table[FromDigits[Join[PadRight[{},n,7],{1},PadRight[{},n,7]]],{n,0,20}] (* or *) LinearRecurrence[ {111,-1110,1000},{1,717,77177},20] (* Harvey P. Dale, Apr 04 2024 *)
-
PARI
apply( {A332171(n)=10^(n*2+1)\9*7-6*10^n}, [0..15])
-
PARI
Vec((1 + 606*x - 1300*x^2) / ((1 - x)*(1 - 10*x)*(1 - 100*x)) + O(x^15)) \\ Colin Barker, Feb 07 2020
-
Python
def A332171(n): return 10**(n*2+1)//9*7-6*10^n
Formula
a(n) = 7*A138148(n) + 10^n.
For n == 1 (mod 3), 3 | a(n) and a(n)/3 = 259*(10^(2n+1)-1)/999 - 2*10^n;
for n == 3 or 5 (mod 6), 13 | a(n) and a(n)/13 = (A(n)-1)*10^n + B(n), where A(n) (resp. B(n)) are the n leftmost (resp. rightmost) digits of 59829*(10^(ceiling(n/6)*6)-1)/(10^6-1).
From Colin Barker, Feb 07 2020: (Start)
G.f.: (1 + 606*x - 1300*x^2) / ((1 - x)*(1 - 10*x)*(1 - 100*x)).
a(n) = 111*a(n-1) - 1110*a(n-2) + 1000*a(n-3) for n>2.
(End)
E.g.f.: (1/9)*exp(x)*(70*exp(99*x) - 54*exp(9*x) - 7). - Stefano Spezia, Feb 08 2020
Comments