OFFSET
1,2
FORMULA
a(n)=(1/2)*(n^2+3*n-sqrt(3n)-sqrt(n))+o(n^(1/2))
EXAMPLE
2 is not in the sequence thus a(2)=a(1)+2+1=4 which is in the sequence thus a(4)=a(3)+4 but 3 is not in the sequence thus a(3)=a(2)+4=8 and a(4)=12
PROG
(PARI) an=vector(100); a(n)=if(n<0, 0, an[n]); an[1]=1; for(n=2, 1000, an[n]=if(setsearch(Set(vector(n-1, i, a(i))), n), a(n-1)+n, a(n-1)+n+1))
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Oct 24 2005
STATUS
approved