OFFSET
1,1
COMMENTS
For known formulas of differences of other Stanley sequences see A093682.
LINKS
Ralf Stephan, Table of n, a(n) for n = 1..999
PROG
(PARI) NAP(sv, N)=local(v, vv, m, k, l, sl, vvl); sl=length(sv); vvl=min(N*N, 10^5); v=vector(N); vv=vector(vvl); for(k=1, sl, v[k]=sv[k]; for(l=1, k-1, vv[2*v[k]-v[l]]=1)); m=v[sl]+1; for(k=sl+1, N, while(m<=vvl&&vv[m], m=m+1); if(m>vvl, return(v)); for(l=1, k-1, sl=2*m-v[l]; if(sl<=vvl, vv[sl]=1)); vv[m]=1; v[k]=m); v
S05(n)=N=1000; NAP([0, 5], N)[n]
a(n)=S05(n+1)-S05(n)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ralf Stephan, Jan 30 2014
STATUS
approved