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.

Showing 1-3 of 3 results.

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

Original entry on oeis.org

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, 25, 27, 29, 29, 29, 31, 33, 33, 33, 35, 37, 37, 37, 39, 41, 41, 41, 43, 45, 45, 45, 47, 49, 49, 49, 51, 53, 53, 53, 55, 57, 57, 57, 59, 61, 61, 61, 63, 65, 65, 65
Offset: 0

Views

Author

Keywords

Comments

a(n) divides A289296(n).

Crossrefs

Programs

  • Maple
    A290561:=n->n+cos(n*Pi/2): seq(A290561(n), n=0..150); # Wesley Ivan Hurt, Aug 06 2017
  • Mathematica
    a[n_] := n + Cos[n*Pi/2]; Table[a[n], {n, 0, 60}]
  • PARI
    a(n) = n + round(cos(n*Pi/2)); \\ Michel Marcus, Aug 06 2017
    
  • PARI
    Vec((x^3 + x^2 - x + 1)/((x - 1)^2*(x^2 + 1)) + O(x^100)) \\ Colin Barker, Aug 06 2017

Formula

G.f.: (x^3 + x^2 - x + 1)/((x - 1)^2*(x^2 + 1)).
a(n) = n if n == 3 (mod 4), and a(n) = a(n-4) + 4 otherwise, for n>2.
a(n) = a(n+20) - 20.
a(n) = 2*A004524(n) + 1.
a(n) + A290562(n) = 2*n.
a(n) * A290562(n) = n^2 - cos(n*Pi/2)^2 = A085046(n) for n>0.
A290562(n) = -a(-n).
From Colin Barker, Aug 06 2017: (Start)
a(n) = ((-i)^n + i^n)/2 + n 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)

A289870 a(n) = n*(n + 1) for n odd, otherwise a(n) = (n - 1)*(n + 1).

Original entry on oeis.org

-1, 2, 3, 12, 15, 30, 35, 56, 63, 90, 99, 132, 143, 182, 195, 240, 255, 306, 323, 380, 399, 462, 483, 552, 575, 650, 675, 756, 783, 870, 899, 992, 1023, 1122, 1155, 1260, 1295, 1406, 1443, 1560, 1599, 1722, 1763, 1892, 1935, 2070, 2115, 2256, 2303, 2450, 2499
Offset: 0

Views

Author

Keywords

Comments

a(n) is a fifth-order linear recurrence whose main interest is that it is related to (at least) eight other sequences (see the formula section).

Crossrefs

After -1, subsequence of A035106, A198442 and A214297.

Programs

  • Mathematica
    a[n_] := (n + 1)(n - 1 + Mod[n, 2]); Table[a[n], {n, 0, 50}]
  • PARI
    a(n)=if(n%2, n, n-1)*(n+1) \\ Charles R Greathouse IV, Jul 14 2017

Formula

a(n) = (n + 1)*(n - 1 + (n mod 2)).
a(n) = n * A109613(n-1) for n>0.
a(n) = -A114285(n) * A109613(n).
a(n) = A002378(n) - A193356(n).
a(n) = A289296(-n).
a(n) = n^2 - (-1)^n * A093178(n).
a(2*k) = A000466(k).
G.f.: (1-3*x-3*x^2-3*x^3)/((-1+x)^3*(1+x)^2).

A294178 a(2n) = 2*n + 1, a(2n+1) = 6*n + 3.

Original entry on oeis.org

1, 3, 3, 9, 5, 15, 7, 21, 9, 27, 11, 33, 13, 39, 15, 45, 17, 51, 19, 57, 21, 63, 23, 69, 25, 75, 27, 81, 29, 87, 31, 93, 33, 99, 35, 105, 37, 111, 39, 117, 41, 123, 43, 129, 45, 135, 47, 141, 49, 147, 51, 153
Offset: 0

Views

Author

Paul Curtz, Jun 28 2018

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0,2,0,-1},{1,3,3,9},100] (* Paolo Xausa, Nov 13 2023 *)
  • PARI
    Vec((1 + 3*x)*(1 + x^2) / ((1 - x)^2*(1 + x)^2) + O(x^40)) \\ Colin Barker, Jun 29 2018

Formula

a(n) = 2*a(n-2) - a(n-4).
a(n) = A289296(n+1) - A289296(n).
G.f.: (1 + 3*x)*(1 + x^2) / ((1 - x)^2*(1 + x)^2). - Colin Barker, Jun 29 2018
Showing 1-3 of 3 results.