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.

A290561 a(n) = n + cos(n*Pi/2).

This page as a plain text file.
%I A290561 #23 Aug 07 2017 09:07:40
%S A290561 1,1,1,3,5,5,5,7,9,9,9,11,13,13,13,15,17,17,17,19,21,21,21,23,25,25,
%T A290561 25,27,29,29,29,31,33,33,33,35,37,37,37,39,41,41,41,43,45,45,45,47,49,
%U A290561 49,49,51,53,53,53,55,57,57,57,59,61,61,61,63,65,65,65
%N A290561 a(n) = n + cos(n*Pi/2).
%C A290561 a(n) divides A289296(n).
%H A290561 Colin Barker, <a href="/A290561/b290561.txt">Table of n, a(n) for n = 0..1000</a>
%H A290561 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,-2,2,-1).
%F A290561 G.f.: (x^3 + x^2 - x + 1)/((x - 1)^2*(x^2 + 1)).
%F A290561 a(n) = n if n == 3 (mod 4), and a(n) = a(n-4) + 4 otherwise, for n>2.
%F A290561 a(n) = a(n+20) - 20.
%F A290561 a(n) = 2*A004524(n) + 1.
%F A290561 a(n) + A290562(n) = 2*n.
%F A290561 a(n) * A290562(n) = n^2 - cos(n*Pi/2)^2 = A085046(n) for n>0.
%F A290561 A290562(n) = -a(-n).
%F A290561 From _Colin Barker_, Aug 06 2017: (Start)
%F A290561 a(n) = ((-i)^n + i^n)/2 + n where i=sqrt(-1).
%F A290561 a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>3. (End)
%p A290561 A290561:=n->n+cos(n*Pi/2): seq(A290561(n), n=0..150); # _Wesley Ivan Hurt_, Aug 06 2017
%t A290561 a[n_] := n + Cos[n*Pi/2]; Table[a[n], {n, 0, 60}]
%o A290561 (PARI) a(n) = n + round(cos(n*Pi/2)); \\ _Michel Marcus_, Aug 06 2017
%o A290561 (PARI) Vec((x^3 + x^2 - x + 1)/((x - 1)^2*(x^2 + 1)) + O(x^100)) \\ _Colin Barker_, Aug 06 2017
%Y A290561 Cf. A004524, A085046, A289296, A290562.
%K A290561 nonn,easy
%O A290561 0,4
%A A290561 _Jean-François Alcover_ and _Paul Curtz_, Aug 06 2017