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!)
A030451 a(2*n) = n, a(2*n+1) = n+2. 9

%I #45 Jul 02 2023 14:04:36

%S 0,2,1,3,2,4,3,5,4,6,5,7,6,8,7,9,8,10,9,11,10,12,11,13,12,14,13,15,14,

%T 16,15,17,16,18,17,19,18,20,19,21,20,22,21,23,22,24,23,25,24,26,25,27,

%U 26,28,27,29,28,30,29,31,30,32,31,33,32,34,33,35,34,36,35,37,36,38,37

%N a(2*n) = n, a(2*n+1) = n+2.

%C Previous name was: Once started, this mixes the natural numbers and the natural numbers shifted by 1.

%C Smallest number of integer-sided squares needed to tile a 2 X n rectangle. a(5) = 4:

%C ._._._._._.

%C | | |_|

%C |___|___|_|. - _Alois P. Heinz_, Jun 12 2013

%H <a href="/index/Tu#2wis">Index entries for two-way infinite sequences</a>.

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

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

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

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

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

%F a(n) = -a(-3-n).

%F a(n) = A110570(n,2) for n>1. - _Reinhard Zumkeller_, Jul 28 2005

%F a(n) = (n+1)-a(n-1) with n>0, a(0)=0. - _Vincenzo Librandi_, Nov 18 2010

%F a(n) = Sum_{k=1..n} (-1)^(n+k)*(k+1). - _Arkadiusz Wesolowski_, Nov 23 2012

%F a(n+1) = (a(0) + a(1) + ... + a(n))/a(n) for n>0. This formula with different initial conditions produces A008619. - _Ivan Neretin_, Apr 25 2016

%F E.g.f.: (x*exp(x) + 3*sinh(x))/2. - _Ilya Gutkovskiy_, Apr 25 2016

%F Sum_{n>=1} (-1)^n/a(n) = 1. - _Amiram Eldar_, Oct 04 2022

%p a:= n-> iquo(n, 2, 'r') +[0, 2][r+1]:

%p seq(a(n), n=0..80); # _Alois P. Heinz_, Jun 12 2013

%t Riffle[# + 1, #] &@ Range[0, 37] (* or *)

%t Table[3/4 - (-1)^n 3/4 + n/2, {n, 0, 72}] (* or *)

%t CoefficientList[Series[(2 x - x^2)/((1 - x) (1 - x^2)), {x, 0, 72}], x] (* _Michael De Vlieger_, Apr 25 2016 *)

%o (PARI) a(n)=n\2+2*(n%2)

%Y Cf. A008619, A028242, A110570.

%Y Row m=2 of A113881, A219158.

%K nonn,easy

%O 0,2

%A Daniel Smith (2true(AT)gte.net)

%E New name (using existing formula) from _Joerg Arndt_, Apr 26 2016

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 April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)