login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A068010 Number of subsets of {1,2,3,...,n} that sum to 0 mod 3. 2
1, 1, 2, 4, 6, 12, 24, 44, 88, 176, 344, 688, 1376, 2736, 5472, 10944, 21856, 43712, 87424, 174784, 349568, 699136, 1398144, 2796288, 5592576, 11184896, 22369792, 44739584, 89478656, 178957312, 357914624, 715828224, 1431656448, 2863312896 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Third row of A068009.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 0..3323
Sophie LeBlanc, Jan 20 2002, sci.math posting
FORMULA
a(0)=1, a(1)=1, a(n) = 2*a(n-1) if 3 does not divide n-1 and a(n) = 2*a(n-1)-(2^((n-1)/3)) if 3 divides n-1.
a(n) = (2^n + 2^((n + 1 + (4/sqrt(3))*cos(((4*n)+1)*Pi/6))/3))/3. - Fred Galvin
G.f.: (1-x-2*x^3)/(1-2*x-2*x^3+4*x^4). - Colin Barker, Feb 03 2012
a(0)=1, a(1)=1, a(2)=2, a(n) = 2*a(n-3) + 2^(n - 2), n>=3. - Baris Arslan, Mar 27 2017
EXAMPLE
a(4)=6 because we have: {}, {3}, {1,2}, {2,4}, {1,2,3}, {2,3,4}. - Geoffrey Critzer, Jan 18 2014
MAPLE
A068010 := n -> (2^n + 2^((n + 1 + (4/sqrt(3))*cos(((4*n)+1)*Pi/6))/3))/3;
MATHEMATICA
Table[nn=(n^2+n)/2; Total[Table[Coefficient[Series[Product[1+x^i, {i, 1, n}], {x, 0, nn}], x^(3k)], {k, 1, nn}]]+1, {n, 1, 33}] (* Geoffrey Critzer, Jan 18 2014 *)
PROG
(PARI) a(n)=([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; -4, 2, 0, 2]^n*[1; 1; 2; 4])[1, 1] \\ Charles R Greathouse IV, Mar 27 2017
CROSSREFS
Sequence in context: A244896 A048115 A047151 * A095848 A208767 A136339
KEYWORD
nonn,easy
AUTHOR
Antti Karttunen, Feb 11 2002
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 16:52 EDT 2024. Contains 371794 sequences. (Running on oeis4.)