OFFSET
0,3
COMMENTS
Let B be the periodic sequence that repeats (1,2,1,3,3,3,4,5,4,6,6,6). Then the sequence a(1), a(2), ... is obtained by adding 6*(i-1) to every term of the i-th period of B.. - Vladimir Shevelev, May 31 2011
Also for n > 0: number of partitions of n into parts 1 or 2 with distinct multiplicities, cf. A211858, A098859. - Reinhard Zumkeller, Dec 27 2012
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,1,1,0,-1).
FORMULA
G.f.: x*(1+2*x)/((1-x^2)*(1-x^3)).
a(n) = Sum_{k=0..n} (k mod 3)*(1-(-1)^(n+k-1))/2}.
a(n) = Sum_{k=0..floor(n/2)} (n-2k mod 3).
a(n) = 1 + floor(n/2) - [3 divides n]. - Ralf Stephan, Nov 15 2010
a(n) = floor(n/2) + floor((n+2)/3) - floor(n/3). - Mircea Merca, May 20 2013
PROG
(PARI) a(n)=1+floor(n/2)-if(n%3==0, 1, 0)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Apr 16 2005
STATUS
approved