A134063 a(n) = (1/2)*(3^n - 2^(n+1) + 3).
1, 1, 2, 7, 26, 91, 302, 967, 3026, 9331, 28502, 86527, 261626, 788971, 2375102, 7141687, 21457826, 64439011, 193448102, 580606447, 1742343626, 5228079451, 15686335502, 47063200807, 141197991026, 423610750291, 1270865805302, 3812664524767, 11438127792026
Offset: 0
Examples
a(3) = 7 because for P(A) = {{},{1},{2},{1,2}} we have: case 0 {{1},{2}}, case 1 {{1},{1,2}}, {{2},{1,2}}, case 2 {{},{}}, {{1},{1}}, {{2},{2}}, {{1,2},{1,2}}.
Links
- Ross La Haye, Binary Relations on the Power Set of an n-Element Set, Journal of Integer Sequences, Vol. 12 (2009), Article 09.2.6. [_Ross La Haye_, Feb 22 2009]
- Index entries for linear recurrences with constant coefficients, signature (6,-11,6)
Programs
-
Maple
f := n -> (1/2)*(3^n - 2^(n+1) + 3);
-
Mathematica
Table[(3^n-2^(n+1)+3)/2,{n,0,30}] (* or *) LinearRecurrence[{6,-11,6},{1,1,2},30] (* Harvey P. Dale, May 05 2020 *)
Formula
a(n) = 3*StirlingS2(n,3) + StirlingS2(n,2) + 1.
a(n) = StirlingS2(n+1,3) + 1. - Ross La Haye, Jan 21 2008
a(n) = 6 a(n-1)-11 a(n-2) +6 a(n-3) (n >= 3). Also a(n) = 4 a(n-1)-3 a(n-2)+ 2^{n-2} (n >= 3). - Tian-Xiao He (the(AT)iwu.edu), Jul 02 2009
G.f.: -(1-4*x+6*x^2)/((x-1)*(3*x-1)*(2*x-1)). a(n+1)-a(n)=A001047(n+1). [R. J. Mathar, Jul 06 2009]
Extensions
Edited by N. J. A. Sloane, Jul 06 2009
Comments