OFFSET
0,1
COMMENTS
n 9's followed by an 8 followed by n 9's.
See A183187 = {26, 378, 1246, 1798, 2917, ...} for the indices of primes.
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).
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)
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 *)
PROG
(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
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Ivan Panchenko, Apr 04 2012
EXTENSIONS
Edited and extended to a(0) = 8 by M. F. Hasler, Feb 10 2020
STATUS
approved