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.

A338206 Inverse of permutation in A160016.

Original entry on oeis.org

0, 2, 1, 6, 3, 10, 4, 14, 5, 18, 7, 22, 8, 26, 9, 30, 11, 34, 12, 38, 13, 42, 15, 46, 16, 50, 17, 54, 19, 58, 20, 62, 21, 66, 23, 70, 24, 74, 25, 78, 27, 82, 28, 86, 29, 90, 31, 94, 32, 98, 33, 102, 35, 106, 36, 110, 37, 114, 39, 118, 40, 122, 41, 126, 43, 130, 44, 134, 45, 138, 47, 142, 48, 146, 49, 150, 51, 154, 52, 158
Offset: 0

Views

Author

Georg Fischer, Oct 16 2020

Keywords

Comments

Permutation of the nonnegative integers.

Crossrefs

Cf. A160016.

Programs

  • Maple
    gf := (x*(1 + x^2)*(2 + x + 2*x^2 + x^3 + 2*x^4))/((-1 + x)^2*(1 + x)^2*(1 - x + x^2)*(1 + x + x^2)): ser := series(gf, x, 82):
    seq(coeff(ser, x, n), n=0..79); # Peter Luschny, Oct 16 2020
  • Mathematica
    LinearRecurrence[{0,1,0,0,0,1,0,-1}, {0,2,1,6,3,10,4,14},80]
  • PARI
    my(x='x+O('x^80)); Vec((x*(2+x+4*x^2+2*x^3+4*x^4+x^5+2*x^6))/((1-x^2)^2*(1+x^2+x^4)))

Formula

Blocks of 6 numbers: a(6*k+0 .. 6*k+5) = (4*k+0, 12*k+2, 4*k+1, 12*k+6, 4*k+3, 12*k+10) for k >= 0.
O.g.f.: x*(1 + x^2)*(2 + x + 2*x^2 + x^3 + 2*x^4)/((1 - x^2)^2*(1 + x^2 + x^4)).
If n is odd, then a(n) = 2*n; otherwise, a(n) = nearest integer to 2*n/3. - Philippe Deléham, Nov 09 2023