A181965 a(n) = 10^(2n+1) - 10^n - 1.
8, 989, 99899, 9998999, 999989999, 99999899999, 9999998999999, 999999989999999, 99999999899999999, 9999999998999999999, 999999999989999999999, 99999999999899999999999, 9999999999998999999999999, 999999999999989999999999999, 99999999999999899999999999999, 9999999999999998999999999999999
Offset: 0
Links
- Patrick De Geest, Palindromic Wing Primes: (9)8(9), updated: June 25, 2017.
- Makoto Kamada, Factorization of 99...99899...99, updated Dec 11 2018.
- Markus Tervooren, Factorizations of (9)w8(9)w, FactorDB.com
- Index entries for linear recurrences with constant coefficients, signature (111,-1110,1000).
Crossrefs
Programs
-
Maple
A181965 := n -> 10^(2*n+1)-1-10^n; # M. F. Hasler, Feb 08 2020
-
Mathematica
Array[10^(2 # + 1) - 1- 10^# &, 15, 0] (* M. F. Hasler, Feb 08 2020 *) Table[With[{c=PadRight[{},n,9]},FromDigits[Join[c,{8},c]]],{n,0,20}] (* Harvey P. Dale, Jun 07 2021 *)
-
PARI
apply( {A181965(n)=10^(n*2+1)-1-10^n}, [0..15]) \\ M. F. Hasler, Feb 08 2020
-
Python
def A181965(n): return 10**(n*2+1)-1-10^n # M. F. Hasler, Feb 08 2020
Formula
From M. F. Hasler, Feb 08 2020: (Start)
G.f.: (8 + 101*x - 1000*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)
Extensions
Edited and extended to a(0) = 8 by M. F. Hasler, Feb 10 2020
Comments