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!)
A290562 a(n) = n - cos(n*Pi/2). 2
-1, 1, 3, 3, 3, 5, 7, 7, 7, 9, 11, 11, 11, 13, 15, 15, 15, 17, 19, 19, 19, 21, 23, 23, 23, 25, 27, 27, 27, 29, 31, 31, 31, 33, 35, 35, 35, 37, 39, 39, 39, 41, 43, 43, 43, 45, 47, 47, 47, 49, 51, 51, 51, 53, 55, 55, 55, 57, 59, 59, 59, 61, 63, 63, 63, 65, 67 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
a(n) divides A289870(n).
LINKS
FORMULA
G.f.: (x^3 - x^2 + 3 x - 1)/((x - 1)^2*(x^2 + 1)).
a(n) = n if n == 1 (mod 4), and a(n) = a(n-4) + 4 otherwise, for n>4.
a(n) = a(n+20) - 20.
a(n) = -A290561(-n).
a(n) + A290561(n) = 2*n.
a(n) * A290561(n) = n^2 - cos(n*Pi/2)^2 = A085046(n) for n>0.
From Colin Barker, Aug 08 2017: (Start)
a(n) = n - (-i)^n/2 - i^n/2 where i=sqrt(-1).
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>3.
(End)
MATHEMATICA
a[n_] := n - Cos[n*Pi/2]; Table[a[n], {n, 0, 60}]
PROG
(PARI) a(n) = n - round(cos(n*Pi/2)); \\ Michel Marcus, Aug 06 2017
(PARI) Vec((x^3 - x^2 + 3*x - 1)/((x - 1)^2*(x^2 + 1)) + O(x^100)) \\ Colin Barker, Aug 08 2017
CROSSREFS
Sequence in context: A282243 A214748 A225225 * A346476 A307446 A122519
KEYWORD
sign,easy
AUTHOR
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 24 03:08 EDT 2024. Contains 371918 sequences. (Running on oeis4.)