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.

A263426 Permutation of the nonnegative integers: [4k+2, 4k+1, 4k, 4k+3, ...].

Original entry on oeis.org

2, 1, 0, 3, 6, 5, 4, 7, 10, 9, 8, 11, 14, 13, 12, 15, 18, 17, 16, 19, 22, 21, 20, 23, 26, 25, 24, 27, 30, 29, 28, 31, 34, 33, 32, 35, 38, 37, 36, 39, 42, 41, 40, 43, 46, 45, 44, 47, 50, 49, 48, 51, 54, 53, 52, 55, 58, 57, 56, 59, 62, 61, 60, 63, 66, 65, 64
Offset: 0

Views

Author

Wesley Ivan Hurt, Oct 17 2015

Keywords

Comments

Fixed points are the odd numbers (A005408).

Crossrefs

Programs

  • Magma
    [n+(1+(-1)^n)*(-1)^(n*(n+1) div 2) : n in [0..80]];
    
  • Magma
    /* By definition: */ &cat[[4*k+2,4*k+1,4*k,4*k+3]: k in [0..20]]; // Bruno Berselli, Nov 08 2015
    
  • Maple
    A263426:=n->n + (1 + (-1)^n)*(-1)^(n*(n + 1)/2): seq(A263426(n), n=0..80);
  • Mathematica
    Table[n + (1 + (-1)^n)*(-1)^(n*(n + 1)/2), {n, 0, 80}]
  • PARI
    Vec((2-3*x+2*x^2+x^3)/((x-1)^2*(1+x^2)) + O(x^100)) \\ Altug Alkan, Oct 19 2015

Formula

G.f.: (2 - 3*x + 2*x^2 + x^3)/((x - 1)^2*(1 + x^2)).
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>3.
a(n) = n + (1 + (-1)^n)*(-1)^(n*(n+1)/2).
a(n) = 4*floor((n+1)/4) - (n mod 4) + 2.
a(n) = A092486(n) - 1.
a(n) = n + A176742(n) for n>0.
a(2n) = 2*A004442(n), a(2n+1) = A005408(n).
a(-n-1) = -A263449(n).
a(n+1) = a(n) - A132429(n+1)*(-1)^n.
Sum_{n>=0, n!=2} (-1)^(n+1)/a(n) = 1 - log(2) (A244009). - Amiram Eldar, Dec 25 2023