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.

A362365 The sum of the coefficients of x^k in the expansion of (x + x^2 + x^3 + x^4 + x^5 + x^6)^n with k divisible by 4.

This page as a plain text file.
%I A362365 #35 Aug 30 2024 10:18:38
%S A362365 1,9,55,322,1946,11664,69980,419912,2519416,15116544,90699280,
%T A362365 544195552,3265173536,19591041024,117546246080,705277476992,
%U A362365 4231664861056,25389989167104,152339935002880,914039610015232,5484237660094976,32905425960566784,197432555763399680
%N A362365 The sum of the coefficients of x^k in the expansion of (x + x^2 + x^3 + x^4 + x^5 + x^6)^n with k divisible by 4.
%C A362365 a(n) is the number of ways that the sum of n labeled 6-sided dice is divisible by 4. This is important for the game called Mahjong, where the remainder of the sum of n randomly rolled dice when divided by 4 determines the starting player. Usually n=3.
%H A362365 Paolo Xausa, <a href="/A362365/b362365.txt">Table of n, a(n) for n = 1..1000</a>
%H A362365 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (4,10,12).
%F A362365 a(n) = (1/4)*6^n + (2^(n/2-1))*cos(3*Pi*n/4).
%F A362365 a(n) = (1/4)*(6^n + (-1+i)^n + (-1-i)^n), where i is the imaginary unit.
%F A362365 a(n) = (1/4)*(A000400(n) + 2*A009116(n)).
%F A362365 a(n) = 4*a(n-1) + 10*a(n-2) + 12*a(n-3).
%F A362365 G.f.: x*(1 + 5*x + 9*x^2)/((1 - 6*x)*(1 + 2*x + 2*x^2)).
%F A362365 E.g.f.: (1/4)*exp(6*x) + cos(x)/(2*exp(x)) - 3/4.
%F A362365 Limit_{n->oo} a(n)/6^n = 1/4.
%e A362365 For n=2, (x + x^2 + x^3 + x^4 + x^5 + x^6)^2 = x^2 + 2*x^3 + 3*x^4 + 4*x^5 + 5*x^6 + 6*x^7 + 5*x^8 + 4*x^9 + 3*x^10 + 2*x^11 + x^12. So a(2) = 3 + 5 + 1 = 9.
%t A362365 LinearRecurrence[{4, 10, 12}, {1, 9, 55}, 30] (* _Paolo Xausa_, Aug 30 2024 *)
%o A362365 (MATLAB) an=(6^n+(-1+1i)^n+(-1-1i)^n)/4
%o A362365 (PARI) a(n)=polcoef(lift(Mod(x+x^2+x^3+x^4+x^5+x^6, 1-x^4)^n), 0) \\ _Andrew Howroyd_, Apr 17 2023
%Y A362365 Cf. A000400, A009116.
%K A362365 easy,nonn
%O A362365 1,2
%A A362365 _Yui Chit Chan_, Apr 17 2023