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.

A130722 The twice repeated nonnegative integers at even indices, the non-repeated nonnegative integers at odd indices.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 1, 3, 2, 4, 2, 5, 3, 6, 3, 7, 4, 8, 4, 9, 5, 10, 5, 11, 6, 12, 6, 13, 7, 14, 7, 15, 8, 16, 8, 17, 9, 18, 9, 19, 10, 20, 10, 21, 11, 22, 11, 23, 12, 24, 12, 25, 13, 26, 13, 27, 14, 28, 14, 29, 15, 30, 15, 31, 16, 32, 16, 33, 17, 34, 17, 35, 18, 36, 18, 37, 19, 38, 19, 39
Offset: 0

Views

Author

Paul Curtz, Aug 16 2007

Keywords

Crossrefs

Programs

  • Maple
    a := n -> A005044(n+2) - A005044(n-7): A005044 := n -> floor((1/48)*(n^2 + 3*n + 21 + (-1)^(n-1)*3*n)): seq(a(n), n=0..79); # Johannes W. Meijer, Oct 08 2013
  • Mathematica
    Table[Sum[Sign[Mod[n - 2 i, 4]], {i, Floor[n/2]}], {n, 0, 100}] (* Wesley Ivan Hurt, Apr 10 2018 *)
  • PARI
    a(n) = if(n%2, n\2, n\4); \\ Altug Alkan, Apr 16 2018

Formula

a(2*n) = A004526(n) = floor(n/2). a(2*n+1) = A001477(n) = n.
O.g.f.: (x^2+x+1)*x^3/((x-1)^2*(1+x)^2*(1+x^2)). - R. J. Mathar, Jul 07 2008
a(n) = A005044(n+2) - A005044(n-7). - Johannes W. Meijer, Oct 08 2013
a(n) = Sum_{i=1..floor(n/2)} sign((n-2i) mod 4). - Wesley Ivan Hurt, Apr 10 2018
a(n) = A106466(n-3) for n>=3. - Georg Fischer, Oct 07 2018

Extensions

Edited by R. J. Mathar, Jul 07 2008