login
a(n) = 2*n - 1.
32

%I #33 Mar 27 2020 17:31:38

%S -1,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,

%T 47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,

%U 93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,129,131,133,135,137,139,141,143,145,147,149,151

%N a(n) = 2*n - 1.

%C If you put n red balls and n blue balls in a bag and draw them one by one without replacement, the probability of never having drawn equal numbers of the two colors before the final ball is drawn is 1/a(n) unsigned.

%C abs(a(n)) = 2n - 1 + 2*0^n. It has A048495 as binomial transform. - _Paul Barry_, Jun 09 2003

%C For n >= 1, a(n) = numbers k such that arithmetic mean of the first k positive integers is integer. A040001(a(n)) = 1. See A145051 and A040001. - _Jaroslav Krizek_, May 28 2010

%C From _Jaroslav Krizek_, May 28 2010: (Start)

%C For n >= 1, a(n) = corresponding values of antiharmonic means to numbers from A016777 (numbers k such that antiharmonic mean of the first k positive integers is integer).

%C a(n) = A000330(A016777(n)) / A000217(A016777(n)) = A146535(A016777(n)+1). (End)

%H Tanya Khovanova, <a href="http://www.tanyakhovanova.com/RecursiveSequences/RecursiveSequences.html">Recursive Sequences</a>

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1).

%F a(n) = A005408(n)-2 = A005843(n)-1 = -A000984(n)/A002420(n) = A001477(n)+A023443(n).

%F G.f.: (3*x - 1)/(1 - x)^2.

%F Abs(a(n)) = Sum_{k=0..n} (A078008(k) mod 4). - _Paul Barry_, Mar 12 2004

%F E.g.f.: exp(x)*(2*x-1). - _Paul Barry_, Mar 31 2007

%F a(n) = 2*a(n-1) - a(n-2); a(0)=-1, a(1)=1. - _Philippe Deléham_, Nov 03 2008

%F a(n) = 4*n - a(n-1) - 4 for n>0, with a(0)=-1. - _Vincenzo Librandi_, Aug 07 2010

%t Table[2*n - 1, {n, 0, 200}] (* _Vladimir Joseph Stephan Orlovsky_, Feb 16 2012 *)

%t LinearRecurrence[{2,-1},{-1,1},80] (* _Harvey P. Dale_, Mar 27 2020 *)

%o (Haskell)

%o a060747 = subtract 1 . (* 2)

%o a060747_list = [-1, 1 ..] -- _Reinhard Zumkeller_, Jul 05 2015

%o -- _Reinhard Zumkeller_, Jul 05 2015

%o (PARI) a(n)=2*n-1 \\ _Charles R Greathouse IV_, Sep 24 2015

%K sign,easy

%O 0,3

%A _Henry Bottomley_, Apr 26 2001