login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A100798 n occurs n times, as early as possible subject to the constraint that two successive occurrences of n are separated by at least by n terms. 5
1, 2, 3, 4, 2, 5, 3, 6, 4, 7, 3, 5, 8, 4, 6, 9, 10, 5, 4, 7, 11, 6, 8, 5, 12, 9, 13, 7, 6, 5, 10, 8, 11, 14, 15, 6, 7, 9, 12, 16, 8, 10, 6, 13, 7, 11, 17, 9, 14, 8, 15, 12, 7, 10, 18, 19, 16, 9, 8, 11, 7, 13, 20, 14, 10, 12, 15, 8, 9, 17, 21, 11, 22, 16, 18, 10, 8, 13, 9, 12, 14, 19, 15, 11 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Subsidiary sequences: first (A100919) and the last (A100920) occurrences of n.
LINKS
EXAMPLE
Index of the first occurrence of 2 is 2 and that of the second occurrence is 5, separated by a(3) and a(4), two terms.
MATHEMATICA
mx = 22; lst = cnt = ConstantArray[0, mx + 1]; a = {}; Do[k = Min@Select[Range[mx + 1], lst[[#]] <= n && cnt[[#]] < # &]; AppendTo[a, k]; lst[[k]] = n + k + 1; cnt[[k]]++; If[k > mx, Break[]], {n, mx^2}]; a (* Ivan Neretin, Nov 25 2016 *)
CROSSREFS
Sequence in context: A212645 A364951 A364950 * A302785 A319825 A305829
KEYWORD
easy,nonn
AUTHOR
Amarnath Murthy, Dec 05 2004
EXTENSIONS
Extended by Ray Chandler, Dec 08 2004
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 06:49 EDT 2024. Contains 371964 sequences. (Running on oeis4.)