login
The odd numbers interlaced with the constant-2 sequence.
6

%I #61 May 24 2022 10:00:31

%S 1,2,3,2,5,2,7,2,9,2,11,2,13,2,15,2,17,2,19,2,21,2,23,2,25,2,27,2,29,

%T 2,31,2,33,2,35,2,37,2,39,2,41,2,43,2,45,2,47,2,49,2,51,2,53,2,55,2,

%U 57,2,59,2,61,2,63,2,65,2,67,2,69,2,71,2,73,2,75,2,77,2,79,2,81,2,83,2,85,2,87,2,89,2,91,2,93,2,95,2,97

%N The odd numbers interlaced with the constant-2 sequence.

%C Similarly, the principle of interlacing a sequence and its first differences leads from A000012 and its differences A000004 to A059841, or from A140811 and its first differences A017593 to a sequence -1, 6, 5, 18, ...

%C If n is even then a(n) = n + 1 ; otherwise a(n) = 2. - _Wesley Ivan Hurt_, Jun 05 2013

%C Denominators of floor((n+1)/2) / (n+1), n > 0. - _Wesley Ivan Hurt_, Jun 14 2013

%C a(n) is also the number of minimum total dominating sets in the (n+1)-gear graph for n>1. - _Eric W. Weisstein_, Apr 11 2018

%C a(n) is also the number of minimum total dominating sets in the (n+1)-sun graph for n>1. - _Eric W. Weisstein_, Sep 09 2021

%C Denominators of Cesàro means sequence of A114112, corresponding numerators are in A354008. - _Bernard Schott_, May 14 2022

%C Also, denominators of Cesàro means sequence of A237420, corresponding numerators are in A354280. - _Bernard Schott_, May 22 2022

%H Antti Karttunen, <a href="/A141310/b141310.txt">Table of n, a(n) for n = 0..16384</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/GearGraph.html">Gear Graph</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SunGraph.html">Sun Graph</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/TotalDominatingSet.html">Total Dominating Set</a>

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

%F a(2n) = A005408(n). a(2n+1) = 2.

%F First differences: a(n+1) - a(n) = (-1)^(n+1)*A109613(n-1), n > 0.

%F b(2n) = -A008586(n), and b(2n+1) = A060747(n), where b(n) = a(n+1) - 2*a(n).

%F a(n) = 2*a(n-2) - a(n-4). - _R. J. Mathar_, Feb 23 2009

%F G.f.: (1+2*x+x^2-2*x^3)/((x-1)^2*(1+x)^2). - _R. J. Mathar_, Feb 23 2009

%F From _Wesley Ivan Hurt_, Jun 05 2013: (Start)

%F a(n) = n + 1 - (n - 1)*(n mod 2).

%F a(n) = (n + 1) * (n - floor((n+1)/2))! / floor((n+1)/2)!.

%F a(n) = A000142(n+1) / A211374(n+1). (End)

%p a(n):=n->n+1-(n-1)*(n mod 2); seq(a(k),k=1..100); # _Wesley Ivan Hurt_, Jun 05 2013

%t Flatten[Table[{2 n - 1, 2}, {n, 40}]] (* _Alonso del Arte_, Jun 15 2013 *)

%t Riffle[Range[1, 79, 2], 2] (* _Alonso del Arte_, Jun 14 2013 *)

%t Table[((-1)^n (n - 1) + n + 3)/2, {n, 0, 20}] (* _Eric W. Weisstein_, Apr 11 2018 *)

%t Table[Floor[(n + 1)/2]/(n + 1), {n, 0, 20}] // Denominator (* _Eric W. Weisstein_, Apr 11 2018 *)

%t LinearRecurrence[{0, 2, 0, -1}, {2, 3, 2, 5}, {0, 20}] (* _Eric W. Weisstein_, Apr 11 2018 *)

%t CoefficientList[Series[(1 + 2 x + x^2 - 2 x^3)/(-1 + x^2)^2, {x, 0, 20}], x] (* _Eric W. Weisstein_, Apr 11 2018 *)

%o (PARI) A141310(n) = if(n%2,2,1+n); \\ (for offset=0 version) - _Antti Karttunen_, Oct 02 2018

%o (PARI) A141310off1(n) = if(n%2,n,2); \\ (for offset=1 version) - _Antti Karttunen_, Oct 02 2018

%o (Python)

%o def A141310(n): return 2 if n % 2 else n + 1 # _Chai Wah Wu_, May 24 2022

%Y Cf. A000004, A000012, A000142, A005408, A008586, A017593, A059841, A060747, A109613, A140811, A211374, A319702 (rgs-transform).

%Y Cf. A114112, A354008.

%Y Cf. A237420, A354280.

%K nonn,easy

%O 0,2

%A _Paul Curtz_, Aug 02 2008

%E Edited by _R. J. Mathar_, Feb 23 2009

%E Term a(45) corrected, and more terms added by _Antti Karttunen_, Oct 02 2018