%I #21 Sep 08 2022 08:45:32
%S 1,4,1,2,8,2,3,3,3,4,7,4,5,2,5,6,6,6,7,1,7,8,5,8,0,0,0,1,4,1,2,8,2,3,
%T 3,3,4,7,4,5,2,5,6,6,6,7,1,7,8,5,8,0,0,0,1,4,1,2,8,2,3,3,3,4,7,4,5,2,
%U 5,6,6,6,7,1,7,8,5,8,0,0,0,1,4,1,2,8,2,3,3,3,4,7,4,5,2,5,6,6,6,7,1,7,8,5,8
%N a(n) = binomial(n+3,n) mod 3^2.
%C Periodic with length 3^3 = 27.
%H Colin Barker, <a href="/A133883/b133883.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_25">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1).
%F a(n) = binomial(n+3,3) mod 3^2.
%F G.f.: (1 +3*x -3*x^2 +2*x^3 +9*x^4 -9*x^5 +3*x^6 +9*x^7 -9*x^8 +4*x^9 +12*x^10 -12*x^11 +5*x^12 +9*x^13 -9*x^14 +6*x^15 +9*x^16 -9*x^17 +7*x^18 +3*x^19 -3*x^20 +8*x^21) / ((1 -x)*(1 +x^3 +x^6)*(1 +x^9 +x^18)). - _Colin Barker_, Jul 19 2016
%t Table[Mod[Binomial[n + 3, n], 9], {n, 0, 120}] (* or *)
%t CoefficientList[Series[(1 + 3 x - 3 x^2 + 2 x^3 + 9 x^4 - 9 x^5 + 3 x^6 + 9 x^7 - 9 x^8 + 4 x^9 + 12 x^10 - 12 x^11 + 5 x^12 + 9 x^13 - 9 x^14 + 6 x^15 + 9 x^16 - 9 x^17 + 7 x^18 + 3 x^19 - 3 x^20 + 8 x^21)/((1 - x) (1 + x^3 + x^6) (1 + x^9 + x^18)), {x, 0, 120}], x] (* _Michael De Vlieger_, Jul 19 2016 *)
%o (PARI) Vec((1 +3*x -3*x^2 +2*x^3 +9*x^4 -9*x^5 +3*x^6 +9*x^7 -9*x^8 +4*x^9 +12*x^10 -12*x^11 +5*x^12 +9*x^13 -9*x^14 +6*x^15 +9*x^16 -9*x^17 +7*x^18 +3*x^19 -3*x^20 +8*x^21) / ((1 -x)*(1 +x^3 +x^6)*(1 +x^9 +x^18)) + O(x^200)) \\ _Colin Barker_, Jul 19 2016
%o (Magma) [Binomial(n+3,n) mod 9: n in [0..60]]; // _Vincenzo Librandi_, Jul 20 2016
%Y Cf. A000040, A133620-A133625, A133630, A038509, A133634-A133636.
%Y Cf. A133873, A133880, A133890, A133900, A133910.
%Y For the sequence regarding "Binomial(n+3, n) mod 3" see A133873.
%K nonn,easy
%O 0,2
%A _Hieronymus Fischer_, Oct 10 2007
%E Corrected g.f. by _Colin Barker_, Jul 19 2016
|