cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A043547 Odd numbers interspersed with double the previous odd number.

This page as a plain text file.
%I A043547 #28 Jul 02 2025 16:01:56
%S A043547 1,2,3,6,5,10,7,14,9,18,11,22,13,26,15,30,17,34,19,38,21,42,23,46,25,
%T A043547 50,27,54,29,58,31,62,33,66,35,70,37,74,39,78,41,82,43,86,45,90,47,94,
%U A043547 49,98,51,102,53,106,55,110,57,114,59,118,61,122,63,126,65,130,67,134
%N A043547 Odd numbers interspersed with double the previous odd number.
%C A043547 As pointed out by E. Angelini on the SeqFan list (cf. link), this is the lexicographically earliest sequence of positive integers without repetitions such that the sum of four consecutive terms is always a multiple of 4. - _M. F. Hasler_, Mar 22 2013
%H A043547 E. Angelini, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2013-March/010956.html">k-chunks sum and division by k</a>, post to the SeqFan list, Mar 22 2013
%H A043547 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,0,-1).
%F A043547 a(n) = (2 - n) * (n - floor(n/2) * 2) + 2 * (n - 1).
%F A043547 G.f.: x*(1+2*x)*(1+x^2)/(1-x^2)^2. - _Ralf Stephan_, Jun 10 2003
%F A043547 a(2n-1) = 2n-1, a(2n) = 4n-2. - _M. F. Hasler_, Mar 22 2013
%F A043547 From _Wesley Ivan Hurt_, Nov 22 2015: (Start)
%F A043547 a(n) = 2*a(n-2) - a(n-4) for n>4.
%F A043547 a(n) = n*(-1)^n/2 - (-1)^n + 3*n/2 - 1. (End)
%e A043547 a(1)=1 because n is odd. a(2)=2 because a(1)*2=2.
%p A043547 A043547:=n->n*(-1)^n/2-(-1)^n+3*n/2-1: seq(A043547(n), n=1..100); # _Wesley Ivan Hurt_, Nov 22 2015
%t A043547 Flatten[Table[Accumulate[{2 n - 1, 2 n - 1}], {n, 40}]] (* _Wesley Ivan Hurt_, Nov 22 2015 *)
%t A043547 With[{o=Range[1,71,2]},Riffle[o,2o]] (* _Harvey P. Dale_, Sep 17 2019 *)
%o A043547 (PARI) A043547(n)=n+!bittest(n,0)*(n-2) \\ _M. F. Hasler_, Mar 22 2013
%o A043547 (Magma) [n*(-1)^n/2-(-1)^n+3*n/2-1 : n in [1..50]]; // _Wesley Ivan Hurt_, Nov 22 2015
%o A043547 (PARI) Vec(x*(1+2*x)*(1+x^2)/(1-x^2)^2 + O(x^100)) \\ _Altug Alkan_, Nov 22 2015
%Y A043547 For n>3, a(n) = A059029(n-3)+3. For n>1, a(n) = A022998(n-2)+2.
%K A043547 easy,nonn
%O A043547 1,2
%A A043547 Jim Cook (jcook(AT)halcyon.com), Mar 01 2000
%E A043547 More terms from _James Sellers_, Mar 01 2000