OFFSET
1,6
COMMENTS
Number of partitions of n+3 into 3 parts that are in arithmetic progression. - Wesley Ivan Hurt, Dec 07 2020
LINKS
Altug Alkan, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,2,0,0,-1).
FORMULA
a(n) = n/3 if n==0 (mod 3) else a(n) = 0.
G.f.: x^3 / ( (x-1)^2*(1+x+x^2)^2 ). - R. J. Mathar, Mar 11 2011
a(n) = (n + 2*n*cos((2*n*Pi)/3))/9. - Kritsada Moomuang, Apr 02 2018
MATHEMATICA
Table[Mod[Binomial[n, 3], n], {n, 150}]
PROG
(PARI) a(n)=if(n%3, 0, n/3); \\ Charles R Greathouse IV, Sep 02 2015 [Corrected by Altug Alkan, Apr 02 2018]
(PARI) a(n)=!(n%3)*(1-n)\-3; \\ Altug Alkan, Apr 02 2018
(GAP) List([1..100], n->Binomial(n, 3) mod n); # Muniru A Asiru, Apr 05 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, Aug 07 2010
STATUS
approved