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.

A007062 Let P(n) of a sequence s(1),s(2),s(3),... be obtained by leaving s(1),...,s(n) fixed and reversing every n consecutive terms thereafter; apply P(2) to 1,2,3,... to get PS(2), then apply P(3) to PS(2) to get PS(3), then apply P(4) to PS(3), etc. This sequence is the limit of PS(n).

Original entry on oeis.org

1, 2, 4, 5, 7, 12, 14, 15, 23, 28, 30, 41, 43, 48, 56, 67, 69, 84, 86, 87, 111, 116, 124, 139, 141, 162, 180, 181, 183, 224, 232, 237, 271, 276, 278, 315, 333, 338, 372, 383, 385, 426, 428, 439, 473, 478, 538, 543, 551, 556, 620
Offset: 1

Views

Author

Keywords

Comments

From Gerald McGarvey, Aug 05 2004: (Start)
Consider the following array:
.1..2..3..4..5..6..7..8..9.10.11.12.13.14.15.16.17.18.19.20
.2..1..4..3..6..5..8..7.10..9.12.11.14.13.16.15.18.17.20.19
.4..1..2..5..6..3.10..7..8.11.12..9.16.13.14.17.18.15.22.19
.5..2..1..4..7.10..3..6..9.12.11..8.17.14.13.16.19.22.15.18
.7..4..1..2..5.12..9..6..3.10.13.14.17..8.11.18.15.22.19.16
12..5..2..1..4..7.14.13.10..3..6..8.22.15.18.11..8.17.24.23
14..7..4..1..2..5.12.15.22..8..6..3.10.13.20.23.24.17..8.11
15.12..5..2..1..4..7.14.23.20.13.10..3..6..8.22.25.28.31.18
23.14..7..4..1..2..5.12.15.28.25.22..8..6..3.10.13.20.33.30
28.15.12..5..2..1..4..7.14.23.30.33.20.13.10..3..6..8.22.25
which is formed as follows:
. first row is the positive integers
. second row: group the first row in pairs of two and reverse the order within groups; e.g., 1 2 -> 2 1 and 3 4 -> 4 3
. n-th row: group the (n-1)st row in groups of n and reverse the order within groups
This sequence is the first column of this array, as well as the diagonal excluding the diagonal's first term. It is also various other 'partial columns' and 'partial diagonals'.
To calculate the i-th column / j-th row value, one can work backwards to find which column of the first row it came from. For each row, first reverse its position within the group, then go up. It appears that lim_{n->oo} a(n)/n^2 exists and is ~ 0.22847 ~ sqrt(0.0522). (End)

Examples

			PS(2) begins with 1,2,4,3,6,5,8; PS(3) with 1,2,4,5,6,3,10; PS(4) with 1,2,4,5,7,10,3.
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A057030 (here we have "s(1), ..., s(n)", whereas 057030 has "s(1), ..., s(n-1)").

Programs

  • Mathematica
    (* works per the name description *)
    a007062=Range[x=3500]; Do[a007062=Flatten[Join[{Take[a007062,n]},Map[Reverse,Partition[Drop[a007062,n],n]]]],{n,2,NestWhile[#+1&,1,(x=# Floor[x/#])>0&]-1}]; a007062
    (* works by making McGarvey's array *) a=Range[x=10000];rows=Table[a=Flatten[Map[Reverse,Partition[a,n]]],{n,NestWhile[#+1&,1,(x=# Floor[x/#])>0&]-1}];a007062=Map[First,rows] (* Peter J. C. Moses, Nov 10 2016 *)

Formula

Conjecture: a(n) = A057030(n-1) + 1 for n > 1 with a(1) = 1. - Mikhail Kurkov, Feb 24 2023

Extensions

More terms and better description from Clark Kimberling, Jul 28 2000