A185127 a(n) = n 3's sandwiched between two 1's.
11, 131, 1331, 13331, 133331, 1333331, 13333331, 133333331, 1333333331, 13333333331, 133333333331, 1333333333331, 13333333333331, 133333333333331, 1333333333333331, 13333333333333331, 133333333333333331, 1333333333333333331, 13333333333333333331
Offset: 0
Examples
From _Bruno Berselli_, Feb 17 2015: (Start) From the third formula: . 6^2 - 5^2 = 11; . 66^2 - 65^2 = 131; . 666^2 - 665^2 = 1331; . 6666^2 - 6665^2 = 13331; . 66666^2 - 66665^2 = 133331; . 666666^2 - 666665^2 = 1333331; . 6666666^2 - 6666665^2 = 13333331; . 66666666^2 - 66666665^2 = 133333331; . 666666666^2 - 666666665^2 = 1333333331, etc. (End)
Links
- World!Of Numbers, Palindromes 11, 131, 1331, ...
- Index entries for linear recurrences with constant coefficients, signature (11,-10).
Programs
-
Magma
[( 40*10^n-7 )/3 : n in [0..20]]; // Wesley Ivan Hurt, Apr 21 2021
-
Mathematica
H[n_] := 10^n + 1 + Sum[10^i 3, {i, 1, n - 1}]; Array[H, 30] Table[(40 10^n - 7)/3, {n, 0, 30}] (* Bruno Berselli, Feb 17 2015 *)
-
PARI
a(n)=(40*10^n-7)/3 \\ Charles R Greathouse IV, Jan 23 2012
Formula
a(0)=11; for n>0, a(n) = 10*a(n-1)+21.
a(n) = ( 40*10^n-7 )/3 (see PARI code by Charles R Greathouse IV).
a(n) = ((2*10^(n+1)-2)/3)^2 - ((2*10^(n+1)-5)/3)^2. - Bruno Berselli, Feb 17 2015
From G. C. Greubel, Jun 23 2017: (Start)
G.f.: (11 + 10*x)/((1-x)*(1-10*x)).
E.g.f.: (40*exp(10*x) - 7*exp(x))/3. (End)
a(n) = 11*a(n-1) - 10*a(n-2). - Wesley Ivan Hurt, Apr 21 2021