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.

A180176 Lexicographically earliest permutation of the natural numbers such that a(n) != n and in decimal representation a(n) and n have at least one common digit.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Aug 15 2010

Keywords

Comments

The permutation is self-inverse;
a(n) = A004442(n) for n >= 20.

Programs

  • Mathematica
    CoefficientList[Series[(-9 x^22 - 2 x^21 + 11 x^20 + 20 x^12 - 20 x^10 - 9 x^2 + x + 10) / ((x - 1)^2 (x + 1)), {x, 0, 100}], x] (* Vincenzo Librandi, Oct 23 2018 *)

Formula

From Chai Wah Wu, Oct 22 2018: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3) for n > 22.
G.f.: (-9*x^22 - 2*x^21 + 11*x^20 + 20*x^12 - 20*x^10 - 9*x^2 + x + 10)/((x - 1)^2*(x + 1)). (End)