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.

A098181 Two consecutive odd numbers separated by multiples of four, repeated twice, between them, written in increasing order.

This page as a plain text file.
%I A098181 #44 Aug 29 2024 23:33:31
%S A098181 1,3,4,4,5,7,8,8,9,11,12,12,13,15,16,16,17,19,20,20,21,23,24,24,25,27,
%T A098181 28,28,29,31,32,32,33,35,36,36,37,39,40,40,41,43,44,44,45,47,48,48,49,
%U A098181 51,52,52,53,55,56,56,57,59,60,60,61,63,64,64,65,67,68,68,69,71,72,72
%N A098181 Two consecutive odd numbers separated by multiples of four, repeated twice, between them, written in increasing order.
%C A098181 Essentially partial sums of A007877.
%C A098181 a(n) is the number of odd coefficients of the q-binomial coefficient [n+2 choose 2]. (Easy to prove.) - _Richard Stanley_, Oct 12 2016
%H A098181 G. C. Greubel, <a href="/A098181/b098181.txt">Table of n, a(n) for n = 0..10000</a>
%H A098181 P. Barry, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL14/Barry4/barry142.html">On a Generalization of the Narayana Triangle</a>, J. Int. Seq. 14 (2011) # 11.4.5.
%H A098181 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,-2,2,-1).
%F A098181 G.f.: (1+x)/((1-x)^2*(1+x^2)).
%F A098181 a(n) = ( (2*n+3) - cos(Pi*n/2) + sin(Pi*n/2) )/2.
%F A098181 a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4).
%F A098181 a(n) = floor(C(n+3, 2)/2)-floor(C(n+1, 2)/2). - _Paul Barry_, Jan 01 2005
%F A098181 a(4*n) = 4*n+1, a(4*n+1) = 4*n+3, a(4*n+2) = a(4*n+3) = 4*n+4. - _Philippe Deléham_, Apr 06 2007
%F A098181 Euler transform of length 4 sequence [ 3, -2, 0, 1]. - _Michael Somos_, Sep 11 2014
%F A098181 a(-3-n) = -a(n) for all n in Z. - _Michael Somos_, Sep 11 2014
%F A098181 a(n) = log_2(|A174882(n+2)|). [Barry] - _R. J. Mathar_, Aug 18 2017
%F A098181 a(n) = (2*n+3 - (-1)^ceiling(n/2))/2. - _Wesley Ivan Hurt_, Sep 29 2017
%e A098181 G.f. = 1 + 3*x + 4*x^2 + 4*x^3 + 5*x^4 + 7*x^5 + 8*x^6 + 8*x^7 + 9*x^8 + ...
%p A098181 A:=seq((2*n+3 - cos(Pi*n/2) + sin(Pi*n/2))/2, n=0..50); \\ _Bernard Schott_, Jun 07 2019
%t A098181 Table[Floor[Binomial[n+3, 2]/2] -Floor[Binomial[n+1, 2]/2], {n, 0, 80}] (* or *) CoefficientList[Series[(1+x)/((1-x)^2*(1+x^2)), {x, 0, 80}], x] (* _Michael De Vlieger_, Oct 12 2016 *)
%o A098181 (PARI) {a(n) = n\4*4 + [1, 3, 4, 4][n%4+1]}; /* _Michael Somos_, Sep 11 2014 */
%o A098181 (Magma) R<x>:=PowerSeriesRing(Integers(), 80); Coefficients(R!( (1+x)/((1-x)^2*(1+x^2)) )); // _G. C. Greubel_, May 22 2019
%o A098181 (Sage) ((1+x)/((1-x)^2*(1+x^2))).series(x, 80).coefficients(x, sparse=False) # _G. C. Greubel_, May 22 2019
%o A098181 (GAP) a:=[1,3,4,4];; for n in [5..80] do a[n]:=2*a[n-1]-2*a[n-2]+2*a[n-3] -a[n-4]; od; a; # _G. C. Greubel_, May 22 2019
%Y A098181 Cf. A098180.
%K A098181 easy,nonn
%O A098181 0,2
%A A098181 _Paul Barry_, Aug 30 2004
%E A098181 Name edited by _G. C. Greubel_, Jun 06 2019