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.

A290562 a(n) = n - cos(n*Pi/2).

This page as a plain text file.
%I A290562 #16 Aug 08 2017 06:54:57
%S A290562 -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,
%T A290562 27,27,27,29,31,31,31,33,35,35,35,37,39,39,39,41,43,43,43,45,47,47,47,
%U A290562 49,51,51,51,53,55,55,55,57,59,59,59,61,63,63,63,65,67
%N A290562 a(n) = n - cos(n*Pi/2).
%C A290562 a(n) divides A289870(n).
%H A290562 Colin Barker, <a href="/A290562/b290562.txt">Table of n, a(n) for n = 0..1000</a>
%H A290562 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,-2,2,-1).
%F A290562 G.f.: (x^3 - x^2 + 3 x - 1)/((x - 1)^2*(x^2 + 1)).
%F A290562 a(n) = n if n == 1 (mod 4), and a(n) = a(n-4) + 4 otherwise, for n>4.
%F A290562 a(n) = a(n+20) - 20.
%F A290562 a(n) = -A290561(-n).
%F A290562 a(n) + A290561(n) = 2*n.
%F A290562 a(n) * A290561(n) = n^2 - cos(n*Pi/2)^2 = A085046(n) for n>0.
%F A290562 From _Colin Barker_, Aug 08 2017: (Start)
%F A290562 a(n) = n - (-i)^n/2 - i^n/2 where i=sqrt(-1).
%F A290562 a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>3.
%F A290562 (End)
%t A290562 a[n_] := n - Cos[n*Pi/2]; Table[a[n], {n, 0, 60}]
%o A290562 (PARI) a(n) = n - round(cos(n*Pi/2)); \\ _Michel Marcus_, Aug 06 2017
%o A290562 (PARI) Vec((x^3 - x^2 + 3*x - 1)/((x - 1)^2*(x^2 + 1)) + O(x^100)) \\ _Colin Barker_, Aug 08 2017
%Y A290562 Cf. A085046, A289870, A290561.
%K A290562 sign,easy
%O A290562 0,3
%A A290562 _Jean-François Alcover_ and _Paul Curtz_, Aug 06 2017