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 A056120 #17 Sep 08 2022 08:45:01 %S A056120 1,1,7,27,108,432,1728,6912,27648,110592,442368,1769472,7077888, %T A056120 28311552,113246208,452984832,1811939328,7247757312,28991029248, %U A056120 115964116992,463856467968,1855425871872 %N A056120 a(n) = (3^3)*4^(n-3) with a(0)=1, a(1)=1 and a(2)=7. %C A056120 For n>=3, a(n) is equal to the number of functions f:{1,2,...,n}->{1,2,3,4} such that for fixed, different x_1, x_2, x_3 in {1,2,...,n} and fixed y_1, y_2, y_3 in {1,2,3,4} we have f(x_i)<>y_i, (i=1,2,...,n). - _Milan Janjic_, May 13 2007 %H A056120 G. C. Greubel, <a href="/A056120/b056120.txt">Table of n, a(n) for n = 0..1000</a> %H A056120 Milan Janjic, <a href="http://www.pmfbl.org/janjic/">Enumerative Formulas for Some Functions on Finite Sets</a> %H A056120 <a href="/index/Rec#order_01">Index entries for linear recurrences with constant coefficients</a>, signature (4). %F A056120 a(n) = 4*a(n-1) + (-1)^n*binomial(3, 3-n). %F A056120 G.f.: (1-x)^3/(1-4*x). %F A056120 E.g.f.: (37 - 44*x + 8*x^2 + 27*exp(4*x))/64. - _G. C. Greubel_, Jan 18 2020 %p A056120 1,1,7, seq( 27*4^(n-3), n=3..25); # _G. C. Greubel_, Jan 18 2020 %t A056120 Table[If[n<2, 1, If[n==2, 7, 27*4^(n-3)]], {n,0,25}] (* _G. C. Greubel_, Jan 18 2020 *) %o A056120 (PARI) vector(26, n, if(n<2, 1, if(n==2, 7, 27*4^(n-3))) ) \\ _G. C. Greubel_, Jan 18 2020 %o A056120 (Magma) [1,1,7] cat [27*4^(n-3): n in [3..25]]; // _G. C. Greubel_, Jan 18 2020 %o A056120 (Sage) [1,1,7]+[27*4^(n-3) for n in (3..25)] # _G. C. Greubel_, Jan 18 2020 %o A056120 (GAP) Concatenation([1,1,7], List([3..25], n-> 27*4^(n-3) )); # _G. C. Greubel_, Jan 18 2020 %Y A056120 Cf. A055841. %Y A056120 First differences of A002063. %K A056120 easy,nonn %O A056120 0,3 %A A056120 _Barry E. Williams_, Jul 05 2000 %E A056120 a(21) corrected by _R. J. Mathar_, Dec 03 2014