The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 26 15:05 EDT 2024. Contains 372826 sequences. (Running on oeis4.)