Paste: A028913

Author: Rex
Mode: ml
Date: Sat, 16 May 2009 03:27:46
Plain Text |
% This produces the integer sequence described at the following url:
% http://www.research.att.com/~njas/sequences/A028913
% By Rex Ford

seq_size=1400;
seq=1:seq_size;

n=1;
while (2*n+1<=length(seq))
	for x=2*n+1:n+1:length(seq)
		seq(x)=0;
	end
	seq=seq(seq ~= 0);
	n=n+1;
end

seq_diff=zeros(1,length(seq)-1);
for i=1:length(seq)-1
	seq_diff(i)=seq(i+1)-seq(i);
end
seq_diff

New Annotation

Summary:
Author:
Mode:
Body: