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.

Showing 1-2 of 2 results.

A054085 a(n) = order of n in the permutation A054084 of the natural numbers if this order exists; a(n) = -1 otherwise.

Original entry on oeis.org

2, 2, 7, 7, 7, 7, 7, 7, 9, 7, 9, 9, 9, 9, 9, 9, -1, 9, -1, 9, -1, -1, -1, -1, 16, -1, 16, -1, 16, -1, -1, 16, 16, 16, 16, 16, -1, -1, 16, 16, -1, 16, -1, 16, -1, -1, 16, -1, -1, 16, -1, 16, -1, -1, -1, -1, -1, -1, -1, -1, -1, 16, -1, -1, -1, -1, -1, -1, -1
Offset: 1

Views

Author

Keywords

Examples

			3 -> 5 -> 7 -> 10 -> 8 -> 6 -> 4 -> 3, so that 3 has order 7.
		

Crossrefs

Programs

  • Mathematica
    a054084[n_] := a054084[n] = If[EvenQ[n], Floor[n/2*GoldenRatio],
    Floor[(n + 1)/2*GoldenRatio^2]];
    Array[a054084[#] &, 40]  (* after Jean-François Alcover *)
    Table[Length[NestWhileList[a054084, a054084[n], # != n &, 1,
         10000]] /. (10001 -> -1), {n, 1, 500}]
    (* Peter J. C. Moses, Jan 26 2022 *)

Extensions

Data truncated by Sean A. Irvine, Jan 23 2022
Edited by Clark Kimberling, Jan 26 2022

A064786 Inverse permutation to A054084.

Original entry on oeis.org

2, 1, 4, 6, 3, 8, 5, 10, 12, 7, 14, 16, 9, 18, 11, 20, 22, 13, 24, 15, 26, 28, 17, 30, 32, 19, 34, 21, 36, 38, 23, 40, 42, 25, 44, 27, 46, 48, 29, 50, 31, 52, 54, 33, 56, 58, 35, 60, 37, 62, 64, 39, 66, 41, 68, 70, 43, 72, 74, 45, 76, 47, 78, 80, 49, 82, 84, 51, 86, 53, 88, 90
Offset: 1

Views

Author

N. J. A. Sloane, Oct 20 2001

Keywords

Extensions

More terms from Vladeta Jovovic, Oct 22 2001
Showing 1-2 of 2 results.