login

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”).

a(n) = 7*a(n-1) + (-1)^n * binomial(2,2-n) with a(-1)=0.
3

%I #36 Sep 08 2022 08:45:01

%S 1,5,36,252,1764,12348,86436,605052,4235364,29647548,207532836,

%T 1452729852,10169108964,71183762748,498286339236,3488004374652,

%U 24416030622564,170912214357948,1196385500505636,8374698503539452,58622889524776164,410360226673433148,2872521586714032036

%N a(n) = 7*a(n-1) + (-1)^n * binomial(2,2-n) with a(-1)=0.

%C For n >= 2, a(n) is equal to the number of functions f:{1,2,...,n}->{1,2,3,4,5,6,7} such that for fixed, different x_1, x_2 in {1,2,...,n} and fixed y_1, y_2 in {1,2,3,4,5,6,7} we have f(x_1) <> y_1 and f(x_2) <> y_2. - _Milan Janjic_, Apr 19 2007

%C a(n) is the number of generalized compositions of n when there are 6*i-1 different types of i, (i=1,2,...). - _Milan Janjic_, Aug 26 2010

%D A. H. Beiler, Recreations in the Theory of Numbers, Dover, N.Y., 1964, pp. 122-125, 194-196.

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

%H Milan Janjic, <a href="http://www.pmfbl.org/janjic/">Enumerative Formulas for Some Functions on Finite Sets</a>

%H <a href="/index/Rec#order_01">Index entries for linear recurrences with constant coefficients</a>, signature (7).

%F a(n) = 6^2 * 7^(n-2), n >= 2 with a(0)=1, a(1)=5.

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

%F a(n) = Sum_{k=0..n} A201780(n,k)*5^k. - _Philippe Deléham_, Dec 05 2011

%F E.g.f.: (13 - 7*x + 36*exp(7*x))/49. - _G. C. Greubel_, Mar 16 2020

%p A055270:= n-> `if`(n<2, 4*n+1, 36*7^(n-2)); seq(A055270(n), n=0..30); # _G. C. Greubel_, Mar 16 2020

%t Join[{1,5},NestList[7#&,36,20]] (* _Harvey P. Dale_, Sep 04 2017 *)

%o (Magma) [1,5] cat [36*7^(n-2): n in [2..30]]; // _G. C. Greubel_, Mar 16 2020

%o (Sage) [1,5]+[36*7^(n-2) for n in (2..30)] # _G. C. Greubel_, Mar 16 2020

%Y Cf. A055272 (first differences of 7^n (A000420)).

%K easy,nonn

%O 0,2

%A _Barry E. Williams_, May 10 2000

%E Terms a(20) onward added by _G. C. Greubel_, Mar 16 2020