login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A111201 a(1)=1 then a(n)=a(n-1)+n if n is already in the sequence, a(n)=a(n-1)+n+1 otherwise. 0
1, 4, 8, 12, 18, 25, 33, 41, 51, 62, 74, 86, 100, 115, 131, 148, 166, 184, 204, 225, 247, 270, 294, 319, 344, 371, 399, 428, 458, 489, 521, 554, 587, 622, 658, 695, 733, 772, 812, 853, 894, 937, 981, 1026, 1072, 1119, 1167, 1216, 1266, 1317, 1368, 1421, 1475 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..53.

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

Sequence in context: A311640 A311641 A082645 * A311642 A311643 A145203

Adjacent sequences:  A111198 A111199 A111200 * A111202 A111203 A111204

KEYWORD

nonn

AUTHOR

Benoit Cloitre, Oct 24 2005

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 21 18:05 EST 2020. Contains 332107 sequences. (Running on oeis4.)