This site is supported by donations to The OEIS Foundation.

 Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing. Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A086970 Fix 1, then exchange the subsequent odd numbers in pairs. 2

%I

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

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

%U 97,95,101,99,105,103,109,107,113,111,117,115,121,119

%N Fix 1, then exchange the subsequent odd numbers in pairs.

%C Partial sums are A086955.

%H Vincenzo Librandi, <a href="/A086970/b086970.txt">Table of n, a(n) for n = 0..2000</a>

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

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

%F a(n) = n + abs(2 - (n + 1)*(-1)^n). - _Lechoslaw Ratajczak_, Dec 09 2016

%F a(n) = 2*A065190(n+1)-1 and a(n) = 2*A014681(n)+1. - _Michel Marcus_, Dec 10 2016

%F From _Guenther Schrack_, Jun 09 2017: (Start)

%F a(n) = 2*n + 1 - 2*(-1)^n for n > 0.

%F a(n) = 2*n + 1 - 2*cos(n*Pi) for n > 0.

%F a(n) = 4*n - a(n-1) for n > 1.

%F Linear recurrence: a(n) = a(n-1) + a(n-2) - a(n-3) for n > 3.

%F First differences: 2 - 4*(-1)^n for n > 1; -(-1)^n*A010696(n) for n > 1.

%F a(n) = A065164(n+1) + n for n > 0.

%F a(A014681(n)) = A005408(n) for n >= 0.

%F a(A005408(A014681(n)) for n >= 0.

%F a(n) = A005408(A103889(n)) for n >= 0.

%F A103889(a(n)) = 2*A065190(n+1) for n >= 0.

%F a(2*n-1) = A004766(n) for n > 0.

%F a(2*n+2) = A004767(n) for n >= 0. (End)

%t Join[{1}, LinearRecurrence[{1, 1, -1}, {5, 3, 9}, 60]] (* _Vincenzo Librandi_, Jun 21 2017 *)

%o (MAGMA) [1] cat [2*n+1-2*(-1)^n: n in [1..70]]; // _Vincenzo Librandi_, Jun 21 2017

%o (PARI) Vec((1+4*x-3*x^2+2*x^3)/((1+x)*(1-x)^2) + O(x^100)) \\ _Michel Marcus_, Jun 21 2017

%Y Cf. A004442, A014681, A065190.

%K easy,nonn

%O 0,2

%A _Paul Barry_, Jul 26 2003

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

Last modified December 14 09:41 EST 2019. Contains 329979 sequences. (Running on oeis4.)