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!)
A098180 Odd numbers with twice the odd numbers repeated in order between them. 4
1, 2, 2, 3, 5, 6, 6, 7, 9, 10, 10, 11, 13, 14, 14, 15, 17, 18, 18, 19, 21, 22, 22, 23, 25, 26, 26, 27, 29, 30, 30, 31, 33, 34, 34, 35, 37, 38, 38, 39, 41, 42, 42, 43, 45, 46, 46, 47, 49, 50, 50, 51, 53, 54, 54, 55, 57, 58, 58, 59, 61, 62, 62, 63, 65, 66, 66, 67, 69, 70, 70, 71 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Partial sums of A098178.
Also A042968 with the even terms repeated. - Michel Marcus, Apr 14 2015
Fixed points are [2,3,6,7,10,11,..] = A042964. - Wesley Ivan Hurt, Oct 13 2015
LINKS
FORMULA
G.f.: (1+x)(1-x+x^2)/((1-x)^2(1+x^2)).
a(n) = sqrt(2)*sin(Pi*n/2+Pi/4)/2+n+1/2.
a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-a(n-4), n>3.
From Wesley Ivan Hurt, Apr 12 2015, Oct 13 2015: (Start)
a(n) = (2n+1-(-1)^((n+1)*(n+2)/2))/2.
a(n) = n + A002265(n) - A002265(n-2). (End)
E.g.f: (exp(-i*x)*((1+i) + (1-i)*exp(2*i*x) + exp((1+i)*x)*(2+4*x)))/4, where i = sqrt(-1). - Iain Fox, Oct 17 2018
MAPLE
A098180:=n->(2*n+1-(-1)^((n+1)*(n+2)/2))/2: seq(A098180(n), n=0..100); # Wesley Ivan Hurt, Apr 12 2015
MATHEMATICA
Table[(2 n + 1 - (-1)^((n + 1) (n + 2)/2))/2, {n, 0, 40}] (* Wesley Ivan Hurt, Apr 12 2015 *)
PROG
(Magma) [Floor((2*n+1-(-1)^((n+1)*(n+2)/2))/2): n in [0..80]]; // Vincenzo Librandi, Apr 13 2015
(PARI) first(n) = Vec((1+x)*(1-x+x^2)/((1-x)^2*(1+x^2)) + O(x^n)) \\ Iain Fox, Oct 17 2018
(PARI) a(n) = (2*n+1-(-1)^((n+1)*(n+2)/2))/2 \\ Iain Fox, Oct 17 2018
CROSSREFS
Sequence in context: A308773 A051732 A098382 * A357411 A270875 A117752
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Aug 30 2004
STATUS
approved

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 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)