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.

A029579 a(2*n) = n+1, a(2*n-1) = 2*n-1.

This page as a plain text file.
%I A029579 #32 Mar 01 2020 02:09:56
%S A029579 1,1,2,3,3,5,4,7,5,9,6,11,7,13,8,15,9,17,10,19,11,21,12,23,13,25,14,
%T A029579 27,15,29,16,31,17,33,18,35,19,37,20,39,21,41,22,43,23,45,24,47,25,49,
%U A029579 26,51,27,53,28,55,29,57,30,59,31,61,32,63,33,65,34,67,35,69,36,71,37
%N A029579 a(2*n) = n+1, a(2*n-1) = 2*n-1.
%H A029579 Muniru A Asiru, <a href="/A029579/b029579.txt">Table of n, a(n) for n = 0..5000</a>
%H A029579 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,0,-1).
%F A029579 G.f.: (1 + x + x^3)/(1 - x^2)^2.
%F A029579 From _Paul Barry_, Aug 29 2004: (Start)
%F A029579 a(n) = (3*n + 2)/4 + (2 - n)*(-1)^n/4.
%F A029579 a(n) = 2*a(n-2) - a(n-4).
%F A029579 Binomial transform is A098156. (End)
%F A029579 From _Gary W. Adamson_, May 08 2010: (Start)
%F A029579 Let M = an infinite lower triangular matrix with (1, 1, 0, 1, 0, 0, 0, ...) in every column; for columns > 0, shifted down twice from the previous column.
%F A029579 Then A029579 = M * [1, 2, 3, 0, 0, 0, ...]. (End)
%F A029579 From _Paul Curtz_, Sep 21 2018: (Start)
%F A029579 a(-n) = -A174239(n).
%F A029579 Terms of A026741(n+1) swapped in pairs. (End)
%p A029579 seq(coeff(series((1+x+x^3)/(1-x^2)^2,x,n+1), x, n), n = 0 .. 80); # _Muniru A Asiru_, Sep 21 2018
%t A029579 With[{nn = 50}, Riffle[Range[nn], Range[1, 2 nn + 1, 2]]] (* or *) LinearRecurrence[{0, 2, 0, -1}, {1, 1, 2, 3}, 120] (* _Harvey P. Dale_, Apr 22 2018 *)
%o A029579 (Haskell)
%o A029579 import Data.List (transpose)
%o A029579 a029579 n = if m == 0 then n' + 1 else n  where (n', m) = divMod n 2
%o A029579 a029579_list = concat $ transpose [[1 ..], [1, 3 ..]]
%o A029579 -- _Reinhard Zumkeller_, Apr 06 2015
%o A029579 (PARI) a(n)=(3*n+2+(2-n)*(-1)^n)/4 \\ _Charles R Greathouse IV_, Sep 02 2015
%o A029579 (GAP) a:=[1,1,2,3];; for n in [5..80] do a[n]:=2*a[n-2]-a[n-4]; od; a; # _Muniru A Asiru_, Sep 21 2018
%Y A029579 Cf. A026741, A174239.
%K A029579 nonn,easy
%O A029579 0,3
%A A029579 _N. J. A. Sloane_
%E A029579 Title simplified by _Sean A. Irvine_, Feb 29 2020