The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”). Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A227859 Sequence of integers such that there are d terms between pairs of integers d. Cycle through d=0,...,9, trying to insert the least unused pair starting at the next free position. 1

%I

%S 0,0,1,2,1,3,2,4,5,3,6,7,4,8,5,9,1,6,1,7,0,0,8,2,3,9,2,4,3,5,6,7,4,8,

%T 9,5,1,6,1,7,0,0,8,2,9,3,2,4,5,3,6,7,4,8,5,9,1,6,1,7,0,0,8,2,3,9,2,4,

%U 3,5,6,7,4,8,9,5,1,6,1,7,0,0,8,2,9,3,2,4,5,3

%N Sequence of integers such that there are d terms between pairs of integers d. Cycle through d=0,...,9, trying to insert the least unused pair starting at the next free position.

%C After the first 5 initial terms, there starts a cycle of 2x20 terms, (3,2,4,...,9,2,4,...), the two half-cycles differing only in 3 transpositions (3,9), (5,3) and (5,9).

%C The sequence is not related to the base-10 (or any other) representation of the numbers. The choice of the range {0,...,9} is somewhat arbitrary, the same could be done for other ranges. But one can see that R={0,1} and R={0,1,2} are not possible, while R={0,2} or R={0,1,2,3} for example are possible, see A227860.

%H E. Angelini, <a href="http://list.seqfan.eu/pipermail/seqfan/2013-November/011822.html">Skolem + digits (+ loop)</a>, SeqFan List, Nov 01 2013.

%e Between a(1)=0 and a(2)=0 there are 0 other terms. Then one can place a(3)=1 and has to set a(5)=1 as to have 1 term in between these two. Then one can set a(4)=2=a(7). Then the next free position is a(6)=3=a(10), etc.

%e After setting a(16)=9=a(26), one cannot place the pair (0,0) starting with the next free position a(17), because a(18)=6 is already set. So the pair a(17)=1=a(19) is inserted, and only thereafter the pair (0,0) at a(21)=0=a(22), then another pair (2,2), and so on.

%o (PARI) a(n)=digits(8239243567489516170082932453674859161700121)[(n+17)%40+(n<6)*20+1]

%Y Cf. A227860.

%K nonn

%O 1,4

%A _Eric Angelini_ and _M. F. Hasler_, Nov 01 2013

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.

Last modified December 3 21:17 EST 2021. Contains 349468 sequences. (Running on oeis4.)