cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A005059 a(n) = (5^n - 3^n)/2.

This page as a plain text file.
%I A005059 #72 Jul 23 2024 19:43:44
%S A005059 0,1,8,49,272,1441,7448,37969,192032,966721,4853288,24325489,
%T A005059 121804592,609554401,3049366328,15251614609,76272421952,381405156481,
%U A005059 1907154922568,9536162033329,47681972428112,238413348924961,1192077204978008,5960417405949649,29802181172927072
%N A005059 a(n) = (5^n - 3^n)/2.
%C A005059 Number of lines passing through 3 points of an n-dimensional grid of points of side 3. - _David W. Wilson_, c. 1999
%C A005059 a(n) is also the total number of words of length n, over an alphabet of five letters, one of them appearing an odd number of times. See the Lekraj Beedassy, Jul 22 2003, comment under A006516 (4-letter words), and the Balakrishnan reference there. See A003462 for the analogous 3-letter words problem. - _Wolfdieter Lang_, Jul 16 2017
%H A005059 Vincenzo Librandi, <a href="/A005059/b005059.txt">Table of n, a(n) for n = 0..1000</a>
%H A005059 M. A. Alekseyev and T. Berger, <a href="http://arxiv.org/abs/1304.3780">Solving the Tower of Hanoi with Random Moves</a>. In: J. Beineke, J. Rosenhouse (eds.) The Mathematics of Various Entertaining Subjects: Research in Recreational Math, Princeton University Press, 2016, pp. 65-79. ISBN 978-0-691-16403-8
%H A005059 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (8,-15).
%F A005059 From _Paul Barry_, Mar 03 2003: (Start)
%F A005059 a(n) = 8*a(n-1) - 15*a(n-2).
%F A005059 G.f.: x/((1-3*x)*(1-5*x)). (End)
%F A005059 a(n) = Sum_{k=1..n} 2^(k-1)*3^(n-k)*binomial(n,k). - _Zerinvary Lajos_, Sep 24 2006
%F A005059 a(n) = (r^n-s^n)/(r-s) with r=5 and s=3. - _Sture Sjöstedt_, Oct 17 2012
%F A005059 a(n) = Sum_{k=0..n-1} 3^k*5^(n-k-1) for n>0, a(0)=0. - _Bruno Berselli_, Aug 07 2013
%F A005059 E.g.f.: exp(3*x)*(exp(2*x) - 1)/2. - _Stefano Spezia_, Jul 23 2024
%e A005059 For the fifth formula: a(4) = 1*125 + 3*25 + 9*5 + 27*1 = 272. [_Bruno Berselli_, Aug 07 2013]
%p A005059 A005059:=n->(5^n-3^n)/2: seq(A005059(n), n=0..30); # _Wesley Ivan Hurt_, Nov 18 2014
%t A005059 Join[{a=0,b=1},Table[c=8*b-15*a;a=b;b=c,{n,60}]] (* _Vladimir Joseph Stephan Orlovsky_, Jan 19 2011 *)
%t A005059 LinearRecurrence[{8, -15}, {0, 1}, 50] (* _Sture Sjöstedt_, Oct 17 2012 *)
%t A005059 Table[(5^n - 3^n)/2, {n, 0, 23}] (* _Michael De Vlieger_, Jul 16 2017 *)
%o A005059 (Sage) [lucas_number1(n,8,15) for n in range(0, 21)] # _Zerinvary Lajos_, Apr 23 2009
%o A005059 (Magma) [(5^n - 3^n)/2: n in [0..30] ]; // _Vincenzo Librandi_, Aug 19 2011
%o A005059 (PARI) a(n)=(5^n-3^n)/2 \\ _Charles R Greathouse IV_, Jun 11 2013
%Y A005059 Cf. A081199 (binomial transform), A006516 (inverse binomial transform, and special 4-letter words), A003462 (special 3-letter words).
%K A005059 nonn,easy
%O A005059 0,3
%A A005059 _N. J. A. Sloane_