[go: up one dir, main page]

login
A181965
a(n) = 10^(2n+1) - 10^n - 1.
15
8, 989, 99899, 9998999, 999989999, 99999899999, 9999998999999, 999999989999999, 99999999899999999, 9999999998999999999, 999999999989999999999, 99999999999899999999999, 9999999999998999999999999, 999999999999989999999999999, 99999999999999899999999999999, 9999999999999998999999999999999
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
FORMULA
From M. F. Hasler, Feb 08 2020: (Start)
a(n) = 9*A138148(n) + 8*10^n = A002283(2n+1) - A011557(10^n).
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
Cf. (A077794-1)/2 = A183187 (indices of primes).
Cf. A002275 (repunits R_n = (10^n-1)/9), A002283 (9*R_n), A011557 (10^n).
Cf. A138148 (cyclops numbers with binary digits only), A002113 (palindromes).
Cf. A332190 .. A332197 (variants with different middle digit 0, ..., 7).
Sequence in context: A300611 A301353 A183888 * A159868 A061105 A118545
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