cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A100795 n occurs n times, as early as possible subject to the constraint that no two successive terms are identical.

This page as a plain text file.
%I A100795 #8 Jan 17 2014 16:45:17
%S A100795 1,2,3,2,3,4,3,4,5,4,5,4,5,6,5,6,5,6,7,6,7,6,7,6,7,8,7,8,7,8,7,8,9,8,
%T A100795 9,8,9,8,9,8,9,10,9,10,9,10,9,10,9,10,11,10,11,10,11,10,11,10,11,10,
%U A100795 11,12,11,12,11,12,11,12,11,12,11,12,13,12,13,12,13,12,13,12,13,12,13,12
%N A100795 n occurs n times, as early as possible subject to the constraint that no two successive terms are identical.
%C A100795 Permutation of A002024. - _Reinhard Zumkeller_, Jan 17 2014
%H A100795 Reinhard Zumkeller, <a href="/A100795/b100795.txt">Table of n, a(n) for n = 1..10000</a>
%e A100795 After a(8) = 4 the next term is 5 as 3 has already occurred three times.
%o A100795 (Haskell)
%o A100795 a100795 n = a100795_list !! (n-1)
%o A100795 a100795_list = f 0 a002024_list where
%o A100795    f x ws = v : f v (us ++ vs) where (us, v:vs) = span (== x) ws
%o A100795 -- _Reinhard Zumkeller_, Jan 17 2014
%Y A100795 Cf. A061925, A074148, A100798.
%K A100795 easy,nonn
%O A100795 1,2
%A A100795 _Amarnath Murthy_, Dec 05 2004
%E A100795 Corrected and extended by _Ray Chandler_, Dec 08 2004