The self-counting sequence is the sequence in which each positive integer occurs consecutive times, beginning with 1. Its first terms are 1,
2, 2, 3, 3, 3, 4, 4, 4, 4, ... (OEIS A002024 ).
For a positive integer , the th term is given by
where
is the floor function and is the ceiling function
(Graham et al. 1994, p. 97). The sequence
is also given by the recurrence relation
(3)
for ,
with
(Wolfram 2002, p. 129 ).
Explore with Wolfram|Alpha
References Gould, H. W. "Solution to Problem 571." Math. Mag. 38 , 185-187, 1965. Graham, R. L.; Knuth, D. E.;
and Patashnik, O. Exercise 3.23 in Concrete
Mathematics: A Foundation for Computer Science, 2nd ed. Reading, MA: Addison-Wesley,
p. 97, 1994. Knuth, D. E. The
Art of Computer Programming, Vol. 1: Fundamental Algorithms, 3rd ed.
Reading, MA: Addison-Wesley, p. 43, 1997. Sloane, N. J. A.
Sequence A002024 /M0250 in "The On-Line
Encyclopedia of Integer Sequences." Wolfram, S. A
New Kind of Science. Champaign, IL: Wolfram Media, p. 129 ,
2002. Referenced on Wolfram|Alpha Self-Counting Sequence
Cite this as:
Weisstein, Eric W. "Self-Counting Sequence."
From MathWorld --A Wolfram Resource. https://mathworld.wolfram.com/Self-CountingSequence.html
Subject classifications More... Less...