A178631 a(n) = 27*((10^n - 1)/9)^2.
27, 3267, 332667, 33326667, 3333266667, 333332666667, 33333326666667, 3333333266666667, 333333332666666667, 33333333326666666667, 3333333333266666666667, 333333333332666666666667, 33333333333326666666666667, 3333333333333266666666666667, 333333333333332666666666666667
Offset: 1
Examples
n=1: ..................... 27 = 9 * 3; n=2: ................... 3267 = 99 * 33; n=3: ................. 332667 = 999 * 333; n=4: ............... 33326667 = 9999 * 3333; n=5: ............. 3333266667 = 99999 * 33333; n=6: ........... 333332666667 = 999999 * 333333; n=7: ......... 33333326666667 = 9999999 * 3333333; n=8: ....... 3333333266666667 = 99999999 * 33333333; n=9: ..... 333333332666666667 = 999999999 * 333333333.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..200
- Index entries for linear recurrences with constant coefficients, signature (111,-1110,1000).
Crossrefs
Programs
-
Magma
[27*((10^n-1)/9)^2: n in [1..50]]; // Vincenzo Librandi, Dec 28 2010
-
Mathematica
27*(FromDigits/@Table[PadRight[{},n,1],{n,20}])^2 (* or *) LinearRecurrence[ {111,-1110,1000},{27,3267,332667},20] (* Harvey P. Dale, Oct 11 2012 *)
-
Maxima
A178631(n):=27*((10^n-1)/9)^2$ makelist(A178631(n),n,1,10); /* Martin Ettl, Nov 12 2012 */
-
PARI
a(n)=27*(10^n\9)^2 \\ Charles R Greathouse IV, Jul 02 2013
Formula
a(n) = 111*a(n-1) - 1110*a(n-2) + 1000*a(n-3) for n>3, a(1)=27, a(2)=3267, a(3)=332667. - Harvey P. Dale, Oct 11 2012
G.f.: 27*x*(1 + 10*x)/((1 - x)*(1 - 10*x)*(1 - 100*x)). - Ilya Gutkovskiy, Feb 24 2017
E.g.f.: exp(x)*(1 - 2*exp(9*x) + exp(99*x))/3. - Elmo R. Oliveira, Aug 01 2025