OFFSET
1,2
COMMENTS
It appears that this is not a permutation of the integers: 3, 6, 10, 12, 14, 18, 20, 24, ... are not terms. - Michel Marcus, Feb 19 2016
Indeed, see the first formula here and the first comment in A069829. - Mikhail Kurkov, Mar 08 2023
FORMULA
a(n) = A057032(n-1) + 1 for n > 1. - Sean A. Irvine, May 19 2022
EXAMPLE
PS(2) begins with 1,2,4,3,6,5,8; PS(3) with 1,2,4,5,3,6,10; PS(4) with 1,2,4,5,8,3,6.
PROG
(PARI) get(v, iv) = if (iv > #v, 0, v[iv]);
fcp(nbn, nbp, startv, v) = {w = vector(nbn); for (k=1, nbn, j = k % nbp; if (j == 1, jv = startv+k+nbp-2, jv = startv+k-2); w[k] = get(v, jv); ); w; }
lista(nn) = {v = vector(nn, n, n); print1(v[1], ", ", v[2], ", "); startv = 3; for (n=3, nn, w = fcp(nn-n+1, n-1, startv, v); startv = 2; if (w[1] == 0, break); print1(w[1], ", "); v = w; ); } \\ Michel Marcus, Feb 19 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Aug 01 2000
EXTENSIONS
More terms from Michel Marcus, Feb 19 2016
STATUS
approved