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.

A066249 Inverse permutation to A066248.

Original entry on oeis.org

3, 1, 5, 2, 7, 4, 8, 6, 9, 10, 11, 12, 13, 16, 14, 18, 15, 22, 17, 28, 19, 30, 20, 36, 21, 40, 23, 42, 24, 46, 25, 52, 26, 58, 27, 60, 29, 66, 31, 70, 32, 72, 33, 78, 34, 82, 35, 88, 37, 96, 38, 100, 39, 102, 41, 106, 43, 108, 44, 112, 45, 126, 47, 130, 48, 136, 49, 138, 50
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 09 2001

Keywords

Comments

Permutation of natural numbers.

Crossrefs

Programs

  • Mathematica
    seq[nmax_] := Module[{p = Prime[Range[nmax]]}, Riffle[Take[Complement[Range[2, p[[-1]]], p] - 1, Length[p]], p - 1]]; seq[35] (* Amiram Eldar, Mar 19 2025 *)

Formula

a(n) = (if n is even then A000040(n/2) else A002808((n+1)/2)) - 1.