login
Number of closed walks of length n on the Petersen graph rooted at a given vertex.
5

%I #24 Feb 12 2024 01:54:50

%S 1,0,3,0,15,12,99,168,759,1764,6315,16896,54783,156156,484851,1421784,

%T 4330887,12861588,38846907,116016432,349097871,1045196460,3139783683,

%U 9410962440,28249664535,84715439172,254213426379,762506061408

%N Number of closed walks of length n on the Petersen graph rooted at a given vertex.

%C If p >= 7 is a prime, then p divides a(p) (provable by easy application of Fermat's Little Theorem). - _Adam P. Goucher_, Sep 11 2013

%H G. C. Greubel, <a href="/A091000/b091000.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (2,5,-6).

%F G.f.: (1-2*x-2*x^2)/((1-x)*(1+2*x)*(1-3*x)).

%F a(n) = (3^n + (-2)^(n+2) + 5)/10.

%F a(n) = (A000244(n) + 9*A001045(n+1)(-1)^n + 6*A001045(n)(-1)^(n+1))/10.

%F 3^n = a(n) + 3*A091001(n) + 6*A091002(n)

%F E.g.f.: (exp(3*x) + 4*exp(-2*x) + 5*exp(x))/10. - _G. C. Greubel_, Feb 01 2019

%t Table[{1,0,0}.MatrixPower[{{0,3,0},{1,0,2},{0,1,2}},n].{1,0,0},{n,1,100}] (* _Adam P. Goucher_, Sep 11 2013 *)

%t LinearRecurrence[{2,5,-6}, {1,0,3}, 30] (* _G. C. Greubel_, Feb 01 2019 *)

%o (PARI) vector(30, n, n--; (3^n+(-2)^(n+2)+5)/10) \\ _G. C. Greubel_, Feb 01 2019

%o (Magma) [(3^n+(-2)^(n+2)+5)/10: n in [0..30]]; // _G. C. Greubel_, Feb 01 2019

%o (Sage) [(3^n+(-2)^(n+2)+5)/10 for n in (0..30)] # _G. C. Greubel_, Feb 01 2019

%o (GAP) List([0..30], n -> (3^n+(-2)^(n+2)+5)/10) # _G. C. Greubel_, Feb 01 2019

%K easy,nonn

%O 0,3

%A _Paul Barry_, Dec 12 2003