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).
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
Keywords
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).
Links
- Peter J. C. Moses, Table of n, a(n) for n = 1..5000
- Clark Kimberling and David Callan, Problem E3163, Amer. Math. Monthly, 96 (1989), 57.
Crossrefs
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
Comments