The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A098181 Two consecutive odd numbers separated by multiples of four, repeated twice, between them, written in increasing order. 5

%I #40 Sep 08 2022 08:45:14

%S 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 28,28,29,31,32,32,33,35,36,36,37,39,40,40,41,43,44,44,45,47,48,48,49,

%U 51,52,52,53,55,56,56,57,59,60,60,61,63,64,64,65,67,68,68,69,71,72,72

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

%C Essentially partial sums of A007877.

%C 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 G. C. Greubel, <a href="/A098181/b098181.txt">Table of n, a(n) for n = 0..10000</a>

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

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

%F a(n) = ( (2*n+3) - cos(Pi*n/2) + sin(Pi*n/2) )/2.

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

%F a(n) = floor(C(n+3, 2)/2)-floor(C(n+1, 2)/2). - _Paul Barry_, Jan 01 2005

%F 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 Euler transform of length 4 sequence [ 3, -2, 0, 1]. - _Michael Somos_, Sep 11 2014

%F a(-3-n) = -a(n) for all n in Z. - _Michael Somos_, Sep 11 2014

%F a(n) = |log_2(A174882(n+2)|. [Barry] - _R. J. Mathar_, Aug 18 2017

%F a(n) = (2*n+3 - (-1)^ceiling(n/2))/2. - _Wesley Ivan Hurt_, Sep 29 2017

%e 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 A:=seq((2*n+3 - cos(Pi*n/2) + sin(Pi*n/2))/2, n=0..50); \\ _Bernard Schott_, Jun 07 2019

%t 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 (PARI) {a(n) = n\4*4 + [1, 3, 4, 4][n%4+1]}; /* _Michael Somos_, Sep 11 2014 */

%o (Magma) R<x>:=PowerSeriesRing(Integers(), 80); Coefficients(R!( (1+x)/((1-x)^2*(1+x^2)) )); // _G. C. Greubel_, May 22 2019

%o (Sage) ((1+x)/((1-x)^2*(1+x^2))).series(x, 80).coefficients(x, sparse=False) # _G. C. Greubel_, May 22 2019

%o (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 Cf. A098180.

%K easy,nonn

%O 0,2

%A _Paul Barry_, Aug 30 2004

%E Name edited by _G. C. Greubel_, Jun 06 2019

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 17 17:07 EDT 2024. Contains 372603 sequences. (Running on oeis4.)