OFFSET
1,2
COMMENTS
Previous name was: 3 people at a party are saying Hello to each other. Person 1 says Hello. Person 2 counts the times Hello has been said and says Hello twice that number of times. Person 3 says Hello 3 times the sum of Hello's and then it is Person 1's turn again. This is how the sum of Hello's.
LINKS
FORMULA
G.f.: x*(1+3*x+12*x^2)/(1-24*x^3). [Colin Barker, Jun 07 2012]
MATHEMATICA
a[n_] := Product[Mod[k, 3]+2, {k, 1, n-1}]; Array[a, 26] (* Jean-François Alcover, Oct 05 2016, adapted from PARI *)
PROG
(PARI) a(n)=prod(k=1, n-1, k%3+2)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jon Perry, Oct 15 2002
STATUS
approved