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!)
A097285 Contains exactly once every pair (i,j) of distinct positive integers. 7

%I #9 Apr 11 2019 11:45:40

%S 1,2,1,3,2,3,1,4,2,4,3,4,1,5,2,5,3,5,4,5,1,6,2,6,3,6,4,6,5,6,1,7,2,7,

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

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

%N Contains exactly once every pair (i,j) of distinct positive integers.

%H Robert Israel, <a href="/A097285/b097285.txt">Table of n, a(n) for n = 1..10000</a>

%F Juxtapose segments: 1 2, then 1 3 2 3, then 1 4 2 4 3 4. General segment is 1 n 2 n ... n-1 n, followed by 1, so that clearly, every i<j and every i>j is uniquely present.

%p A097285:= proc(n) local k,j;

%p k:= floor(sqrt(n-3/4)-1/2);

%p j:= floor((n-k^2-k)/2);

%p if n::odd then j+1 else k+2 fi

%p end proc;

%p seq(A097285(n),n=1..100); # _Robert Israel_, May 08 2014

%t S = {1, 2}; Do[S = Join[S, Riffle[Range[n-1], n], {n}], {n, 3, 12}];

%t S (* _Jean-François Alcover_, Apr 11 2019 *)

%Y Cf. A097286.

%K nonn

%O 1,2

%A _Clark Kimberling_, Aug 05 2004

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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)