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!)
A026098 Triangular array T read by rows: T(1,1)=1, T(2,1)=3, T(2,2)=2; for n >= 3, T(n,1)=prime(n) and for k=2,3,...,n, T(n,k) = m*prime(n+1-k), where m is the least positive integer such that m*p(n+1-k) is not any T(i,j) for 1<=i<=n-1 nor any T(n,j) for j<=k-1. 8

%I #22 Sep 05 2019 14:28:48

%S 1,3,2,5,6,4,7,10,9,8,11,14,15,12,16,13,22,21,20,18,24,17,26,33,28,25,

%T 27,30,19,34,39,44,35,40,36,32,23,38,51,52,55,42,45,48,46,29,69,57,68,

%U 65,66,49,50,54,56,31,58,92,76,85,78,77,63,60,72,62,37,93,87,115,95,102,91,88,70,75,81,64

%N Triangular array T read by rows: T(1,1)=1, T(2,1)=3, T(2,2)=2; for n >= 3, T(n,1)=prime(n) and for k=2,3,...,n, T(n,k) = m*prime(n+1-k), where m is the least positive integer such that m*p(n+1-k) is not any T(i,j) for 1<=i<=n-1 nor any T(n,j) for j<=k-1.

%C A permutation of the natural numbers.

%H Michel Marcus, <a href="/A026098/b026098.txt">Rows n=1..100 of triangle, flattened</a>

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

%e 1;

%e 3, 2;

%e 5, 6, 4;

%e 7, 10, 9, 8;

%e 11, 14, 15, 12, 16;

%e 13, 22, 21, 20, 18, 24;

%e 17, 26, 33, 28, 25, 27, 30;

%e 19, 34, 39, 44, 35,..

%t T[1, 1] = 1; T[2, 1] = 3; T[2, 2] = 2;

%t T[n_, 1] := Prime[n];

%t T[n_, k_] := T[n, k] = Module[{m, mp, jtt}, For[m = 1, True, m++, mp = m Prime[n + 1 - k]; jtt = Join[Table[T[i, j], {i, 1, n - 1}, {j, 1, i}] // Flatten, Table[T[n, j], {j, 1, k - 1}]]; If[FreeQ[jtt, mp], Return[mp]]]];

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

%o (PARI) getrow(n, all) = {if (n==1, return ([1])); if (n==2, return ([3, 2])); my(row = vector(n)); row[1] = prime(n); for (k=2, n, my(ok = 0, m = 1, val); until(ok, val = m*prime(n+1-k); if (!setsearch(all, val) && !setsearch(Set(row), val), ok = 1); m++;); row[k] = val;); return (row);}

%o tabl(nn) = {my(all = []); for (n=1, nn, my(row = getrow(n, all)); print(row); /* for (k=1, n, print1(row[k], ", ")); */ all = Set(concat(all, row)););} \\ _Michel Marcus_, Sep 04 2019

%Y Inverse permutation: A070264.

%K nonn,tabl

%O 1,2

%A _Clark Kimberling_

%E Corrected by _David Wasserman_, Aug 12 2002

%E More terms from _Michel Marcus_, Sep 04 2019

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 July 16 05:19 EDT 2024. Contains 374343 sequences. (Running on oeis4.)