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!)
A115409 Inverse integer permutation of A115408. 4

%I #16 Sep 20 2021 09:37:22

%S 1,5,4,7,6,2,17,16,12,10,20,19,15,13,3,43,42,38,36,26,23,51,50,46,44,

%T 34,31,8,105,104,100,98,88,85,62,54,114,113,109,107,97,94,71,63,9

%N Inverse integer permutation of A115408.

%C Seen as a triangle read by rows T(n,k) = a(n*(n-1)/2+k) = A024431(n)-A024431(k-1), 1<=k<=n.

%C T(n,1) = A024431(n)-1; T(n,n) = A247414(n-1). - _Reinhard Zumkeller_, Sep 16 2014

%H Reinhard Zumkeller, <a href="/A115409/b115409.txt">>Rows n = 1..125 of triangle, flattened</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%e Triangle begins:

%e 1;

%e 5, 4;

%e 7, 6, 2;

%e 17, 16, 12, 10;

%e 20, 19, 15, 13, 3;

%e ...

%t nmax = 9;

%t differenceQ[seq_, x_] := Module[{r = False}, Do[If[x==seq[[k]] - seq[[j]], r = True; Break[]], {j, 1, Length[seq]}, {k, 1, Length[seq]}]; r];

%t seq[1] = {1, 2};

%t seq[i_] := seq[i] = Module[{j, k}, k = Max[seq[i-1]]; j = First[Select[ Range[k], !differenceQ[seq[i-1], #]&, 1]]; Union[seq[i-1], {2k+2, 2k+2+j}]];

%t A024431 = seq[nmax];

%t T[n_, k_] := A024431[[n+1]] - A024431[[k]];

%t Table[T[n, k], {n, 1, nmax}, {k, 1, n}] // Flatten (* _Jean-François Alcover_, Sep 20 2021 *)

%o (Haskell)

%o import Data.List (inits)

%o a115409 n k = a115409_tabl !! (n-1) !! (k-1)

%o a115409_row n = a115409_tabl !! (n-1)

%o a115409_tabl = map f $ drop 2 $ inits a024431_list where

%o f xs = reverse $ map (z -) zs where (z:zs) = reverse xs

%o a115409_list = concat a115409_tabl

%o -- _Reinhard Zumkeller_, Sep 16 2014

%Y Cf. A024431, A115408, A247414.

%K nonn,tabl,look

%O 1,2

%A _Reinhard Zumkeller_, Jan 22 2006

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 30 08:41 EDT 2024. Contains 372131 sequences. (Running on oeis4.)