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.

A229830 Trajectory of 1 under the morphism 1 -> 12, 2 -> 1232, 3 -> 123432, 4 -> 12345432, etc.

Original entry on oeis.org

1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 3, 4, 3, 2, 1
Offset: 1

Views

Author

Keywords

Comments

It appears that records occur at A000111. [This is false. - Rémy Sigrist, Nov 15 2018]
The n-th local maximum equals a(n) + 1. - Rémy Sigrist, Nov 13 2018
Records at {1, 2, 5, 16, 61, 258, 1161, 5440, 26233, 129282, 648141, 3294864, ...}, which seems to match A104858. - Michael De Vlieger, Nov 13 2018

Crossrefs

Programs

  • Mathematica
    With[{n = 5}, Take[#, LengthWhile[#, # <= n &] + 1] &@ Nest[Flatten[# /. Array[Last@ # - 1 -> Most[#~Join~Reverse@ Most@ #] &@ Range@ # &, Max@ #, 2]] &, {1}, n]] (* Michael De Vlieger, Nov 13 2018 *)
  • PARI
    my(a = vector(87), n=0); a[1]=1; for (p=1, oo, my(h=1+a[p]); for (v=1, h, a[n++]=v; print1 (v ", "); if (n==#a, break (2))); forstep (v=h-1, 2, -1, a[n++]=v; print1 (v ", "); if (n==#a, break (2)))) \\ Rémy Sigrist, Nov 13 2018

Extensions

Data corrected by Rémy Sigrist, Nov 13 2018