Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #26 Sep 08 2022 08:46:01
%S 11,151,1551,15551,155551,1555551,15555551,155555551,1555555551,
%T 15555555551,155555555551,1555555555551,15555555555551,
%U 155555555555551,1555555555555551,15555555555555551,155555555555555551,1555555555555555551,15555555555555555551
%N a(n) = n 5's sandwiched between two 1's.
%H Vincenzo Librandi, <a href="/A205085/b205085.txt">Table of n, a(n) for n = 0..100</a>
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (11,-10).
%F a(0)=11, a(n) = 10*a(n-1) + 41.
%F a(n) = (140*10^n - 41)/9 (see PARI code by _Charles R Greathouse IV_).
%F a(n) = 11*a(n-1) - 10*a(n-2). - _Vincenzo Librandi_, Jan 23 2012
%t a[0]=11;a[n_]:=a[n-1]*10+41;Table[a[n],{n,0,44}]
%t LinearRecurrence[{11, -10}, {11, 151}, 50] (* _Vincenzo Librandi_, Jan 23 2012 *)
%t Table[10FromDigits[PadRight[{1},n,5]]+1,{n,20}] (* _Harvey P. Dale_, May 02 2019 *)
%o (PARI) a(n)=(140*10^n-41)/9 \\ _Charles R Greathouse IV_, Jan 23 2012
%o (Magma) I:=[11, 151]; [n le 2 select I[n] else 11*Self(n-1)-10*Self(n-2): n in [1..25]]; // _Vincenzo Librandi_, Jan 23 2012
%K nonn,base,easy,less
%O 0,1
%A _José María Grau Ribas_, Jan 22 2012