OFFSET
1,2
COMMENTS
See A152009 for the definition of the (L)-sieve transform.
This appears to be the same sequence that is defined in Problem 193 of Popular Computing, Number 55 (see link). - N. J. A. Sloane, Apr 16 2015
LINKS
Popular Computing (Calabasas, CA), Coding Fun: Rearranging All The Numbers, Annotated and scanned copy of pages PC55-2, PC55-3, and PC55-1(cover) of Vol. 5 (No. 55, Oct 1977).
FORMULA
All listed terms satisfy the recurrence a(n) = floor((4*a(n-1)+3)/3), with a(1)=1.
MAPLE
# Maple program for Popular Computing Problem 193, which produces terms which appear to match this sequence, from N. J. A. Sloane, Apr 16 2015
with(LinearAlgebra): M:=1000; B:=300;
t1:=Array(1..M, 0); t2:=Array(1..M, 0); t3:=Array(1..M, -1);
for n from 1 to M do t1[n]:=n+2; od:
for n from 1 to B do
i:=t1[1];
if t3[i] = -1 then t3[i]:=n-1; fi;
for j from 1 to i do t2[j]:=t1[j+1]; od:
t2[i+1]:=i;
for p from i+2 to M-2 do t2[p]:=t1[p]; od;
for q from 1 to M-2 do t1[q]:=t2[q]; od:
od:
[seq(t3[n], n=3..B)];
MATHEMATICA
NestList[Floor[(4#+3)/3]&, 1, 40] (* Harvey P. Dale, Oct 04 2021 *)
KEYWORD
nonn
AUTHOR
John W. Layman, Jan 21 2009
STATUS
approved