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.
%I A051436 #34 Apr 11 2018 02:58:00 %S A051436 1,2,5,12,39,111,350,1044,3201,9627,29150,87672,264069,793431,2384450, %T A051436 7159164,21494001,64507827,193589270,580878432,1742897949,5229157551, %U A051436 15688522250,47067483684,141206647401,423627793227,1270900160990,3812732430792,11438264409429 %N A051436 Number of undirected walks of length n+1 on tetrahedron, visiting n+2 vertices, with n "corners", as in A001998, but allowing only rigid motions in 3-space (|G| = 12). Walks are not self-avoiding. %H A051436 Reinhard Zumkeller, <a href="/A051436/b051436.txt">Table of n, a(n) for n = 0..1000</a> %H A051436 <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (5,0,-30,25,55,-60,-30,36). %F A051436 n=2m: (3^n+3^m)/2 -2^(n-1)+2^(m-1); n=2m+1: (3^n+3^m)/2 - 2^(n-1) +1. %F A051436 G.f.: -(39*x^7-20*x^6-39*x^5+14*x^4+17*x^3-5*x^2-3*x+1) / ((x-1)*(x+1)*(2*x-1)*(3*x-1)*(2*x^2-1)*(3*x^2-1)). - _Colin Barker_, Jul 17 2013 %e A051436 For n=2 there are three walks that stay in one face and two that visit two faces. %p A051436 a:= n-> `if`(irem(n, 2, 'm')=0, %p A051436 (3^n+3^m)/2+2^(m-1), (3^n+3^m)/2+1) -2^(n-1): %p A051436 seq(a(n), n=0..35); # _Alois P. Heinz_, Jul 17 2013 %t A051436 a[n_?OddQ] := (3^n + 3^((n - 1)/2))/2 - 2^(n - 1) + 1; a[n_?EvenQ] := (3^n + 3^(n/2))/2 - 2^(n - 1) + 2^(n/2 - 1); Table[a[n], {n, 0, 22}] (* _Jean-François Alcover_, Jan 25 2013, from formula *) %t A051436 LinearRecurrence[{5,0,-30,25,55,-60,-30,36},{1,2,5,12,39,111,350,1044},40] (* _Harvey P. Dale_, Oct 30 2015 *) %o A051436 (Haskell) %o A051436 a051436 n = (3 ^ n + 3 ^ m - 2 ^ n + (1 - r) * 2 ^ m) `div` 2 + r %o A051436 where (m,r) = divMod n 2 %o A051436 -- _Reinhard Zumkeller_, Jun 30 2013 %o A051436 (PARI) a(n)=if(n%2, (3^n + 3^((n - 1)/2))/2 + 1, (3^n + 3^(n/2))/2 + 2^(n/2 - 1)) - 2^(n-1) \\ _Charles R Greathouse IV_, Feb 10 2017 %Y A051436 Cf. A001998, A001444, A000079, A000244. %K A051436 nonn,walk,nice,easy %O A051436 0,2 %A A051436 _Colin Mallows_ %E A051436 Corrected by _T. D. Noe_, Nov 09 2006