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.

A130515 In triangular peg solitaire, number of distinct feasible pairs starting with one peg missing and finishing with one peg.

This page as a plain text file.
%I A130515 #19 Nov 26 2017 09:49:29
%S A130515 1,4,3,17,29,27,80,125,108,260,356,300,637,832,675,1341,1665,1323,
%T A130515 2500,3025,2352,4304,5072,3888,6929,8036,6075,10625,12125,9075,15616,
%U A130515 17629,13068,22212,24804,18252,30685,34000,24843,41405,45521
%N A130515 In triangular peg solitaire, number of distinct feasible pairs starting with one peg missing and finishing with one peg.
%C A130515 Coincides with A130516 for n >= 6.
%H A130515 George I. Bell, <a href="/A130515/b130515.txt">Table of n, a(n) for n = 2..52</a>
%H A130515 George I. Bell, <a href="https://arxiv.org/abs/math/0703865">Solving Triangular Peg Solitaire</a>, arXiv:math/0703865 [math.CO], 2007-2009.
%H A130515 G. I. Bell, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL11/Bell/bell2.html">Solving Triangular Peg Solitaire</a>, JIS 11 (2008) 08.4.8
%H A130515 <a href="/index/Rec#order_21">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 3, 0, 0, -1, 0, 0, -5, 0, 0, 5, 0, 0, 1, 0, 0, -3, 0, 0, 1).
%F A130515 Reference gives an explicit formula for a(n).
%F A130515 G.f.: -x^2*(x^2+1) *(x^14 +4*x^13 +2*x^12 +10*x^11 +15*x^10 +8*x^9 +15*x^8 +34*x^7 +15*x^6 +8*x^5 +15*x^4 +10*x^3 +2*x^2 +4*x +1) / ( (1+x)^2 *(x^2-x+1)^2 *(x-1)^5 *(1+x+x^2)^5 ). - _R. J. Mathar_, Sep 07 2015
%F A130515 a(n) = 3*a(n-3) -a(n-6) -5*a(n-9) +5*a(n-12) +a(n-15) -3*a(n-18) +a(n-21). - _R. J. Mathar_, Sep 07 2015
%p A130515 A130515 := proc(n)
%p A130515     t := n*(n+1)/2 ;
%p A130515     if modp(n,3) = 1 then
%p A130515         (t-1)^2/27 ;
%p A130515     elif type(n,'even') then
%p A130515         (4*t^2+9*n^2)/72 ;
%p A130515     else
%p A130515         (4*t^2+9*(n+1)^2)/72 ;
%p A130515     fi;
%p A130515 end proc: # _R. J. Mathar_, Sep 07 2015
%t A130515 a[n_] := With[{t = n*(n + 1)/2}, Which[Mod[n, 3] == 1, (t - 1)^2/27, EvenQ[n], (4*t^2 + 9*n^2)/72, True, (4*t^2 + 9*(n + 1)^2)/72]];
%t A130515 Table[a[n], {n, 2, 42}] (* _Jean-François Alcover_, Nov 26 2017 *)
%o A130515 (PARI) a(n) = {my(T = n*(n+1)/2); if (n % 3 == 1, (T-1)^2/27, if ( n % 2 == 0, (4*T^2 + 9*n^2)/72, (4*T^2 + 9*(n+1)^2)/72;););}  \\ _Michel Marcus_, Apr 21 2013
%Y A130515 Cf. A130516.
%K A130515 nonn,easy
%O A130515 2,2
%A A130515 _N. J. A. Sloane_, Aug 09 2007