%I M4786 N2043 #60 Jan 29 2023 06:01:58
%S 1,1,11,31,161,601,2651,10711,45281,186961,781451,3245551,13524161,
%T 56258281,234234011,974792551,4057691201,16888515361,70296251531,
%U 292589141311,1217844546401,5068991364601,21098583646811,87818089575031,365523431971361,1521409670118001,6332530227978251
%N a(n) = 2*a(n-1) + 9*a(n-2), with a(0)=a(1)=1.
%C Binomial transform of [1, 0, 10, 0, 100, 0, 1000, 0, 10000, 0, ...]=: powers of 10 (A011557) with interpolated zeros. Inverse binomial transform of A084132. - _Philippe Deléham_, Dec 02 2008
%C a(n) is the number of compositions of n when there are 1 type of 1 and 10 types of other natural numbers. - _Milan Janjic_, Aug 13 2010
%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%D A. Tarn, Approximations to certain square roots and the series of numbers connected therewith, Mathematical Questions and Solutions from the Educational Times, 1 (1916), 8-12.
%H Vincenzo Librandi, <a href="/A002535/b002535.txt">Table of n, a(n) for n = 0..1000</a>
%H Simon Plouffe, <a href="https://arxiv.org/abs/0911.4975">Approximations de séries génératrices et quelques conjectures</a>, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
%H Simon Plouffe, <a href="/A000051/a000051_2.pdf">1031 Generating Functions</a>, Appendix to Thesis, Montreal, 1992
%H Albert Tarn, <a href="/A001333/a001333_1.pdf">Approximations to certain square roots and the series of numbers connected therewith</a> [Annotated scanned copy]
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,9).
%F From _Paul Barry_, May 16 2003: (Start)
%F a(n) = ((1+sqrt(10))^n + (1-sqrt(10))^n)/2.
%F G.f.: (1-x)/(1-2*x-9*x^2).
%F E.g.f.: exp(x)*cosh(sqrt(10)*x). (End)
%F a(n) = Sum_{k=0..n} A098158(n,k)*10^(n-k). - _Philippe Deléham_, Dec 26 2007
%F If p[1]=1, and p[i]=10,(i>1), and if A is Hessenberg matrix of order n defined by: A[i,j]=p[j-i+1], (i<=j), A [i,j]=-1, (i=j+1), and A[i,j]=0 otherwise. Then, for n>=1, a(n)=det A. - _Milan Janjic_, Apr 29 2010
%p A002535:=(-1+z)/(-1+2*z+9*z**2); # conjectured by _Simon Plouffe_ in his 1992 dissertation
%t Table[ MatrixPower[{{1, 2}, {5, 1}}, n][[1,1]],{n, 0, 30}] (* _Vladimir Joseph Stephan Orlovsky_, Feb 20 2010 *)
%t a[n_] := Simplify[((1 + Sqrt[10])^n + (1 - Sqrt[10])^n)/2]; Array[a, 30, 0] (* Or *)
%t CoefficientList[Series[(1+9x)/(1-2x-9x^2), {x,0,30}], x] (* Or *)
%t LinearRecurrence[{2, 9}, {1, 1}, 30] (* _Robert G. Wilson v_, Sep 18 2013 *)
%o (Magma) [Ceiling((1+Sqrt(10))^n/2+(1-Sqrt(10))^n/2): n in [0..30]]; // _Vincenzo Librandi_, Aug 15 2011
%o (Magma) I:=[1,1]; [n le 2 select I[n] else 2*Self(n-1)+9*Self(n-2): n in [1..30]]; // _G. C. Greubel_, Aug 02 2019
%o (PARI) my(x='x+O('x^30)); Vec((1-x)/(1-2*x-9*x^2)) \\ _G. C. Greubel_, Aug 02 2019
%o (PARI) my(p=Mod('x,'x^2-2*'x-9)); a(n) = vecsum(Vec(lift((p^n)))); \\ _Kevin Ryde_, Jan 28 2023
%o (Sage) ((1-x)/(1-2*x-9*x^2)).series(x, 30).coefficients(x, sparse=False) # _G. C. Greubel_, Aug 02 2019
%o (GAP) a:=[1,1];; for n in [3..30] do a[n]:=2*a[n-1]+9*a[n-2]; od; a; # _G. C. Greubel_, Aug 02 2019
%Y Cf. A002534 (partial sums), A111015 (primes).
%Y Cf. A011557, A084132, A098158.
%K nonn,easy
%O 0,3
%A _N. J. A. Sloane_