Table $ 2n-1 $ from $ n=2 $ to $ 50 $ except when $ n=3m-1 $
up vote
4
down vote
favorite
How to Table
$ 2n-1 $ for $ n $ from $ 2 $ to $ 50 $, except when $ n=3m-1 $ for another integer $ m $?
list-manipulation table
New contributor
add a comment |
up vote
4
down vote
favorite
How to Table
$ 2n-1 $ for $ n $ from $ 2 $ to $ 50 $, except when $ n=3m-1 $ for another integer $ m $?
list-manipulation table
New contributor
Possible duplicate of How to generate a table with i != j
– Michael E2
23 hours ago
add a comment |
up vote
4
down vote
favorite
up vote
4
down vote
favorite
How to Table
$ 2n-1 $ for $ n $ from $ 2 $ to $ 50 $, except when $ n=3m-1 $ for another integer $ m $?
list-manipulation table
New contributor
How to Table
$ 2n-1 $ for $ n $ from $ 2 $ to $ 50 $, except when $ n=3m-1 $ for another integer $ m $?
list-manipulation table
list-manipulation table
New contributor
New contributor
edited 2 days ago
Αλέξανδρος Ζεγγ
3,5281927
3,5281927
New contributor
asked 2 days ago
Amr
212
212
New contributor
New contributor
Possible duplicate of How to generate a table with i != j
– Michael E2
23 hours ago
add a comment |
Possible duplicate of How to generate a table with i != j
– Michael E2
23 hours ago
Possible duplicate of How to generate a table with i != j
– Michael E2
23 hours ago
Possible duplicate of How to generate a table with i != j
– Michael E2
23 hours ago
add a comment |
4 Answers
4
active
oldest
votes
up vote
7
down vote
Using Drop
, Riffle
and Complement
:
Drop[Range[5, 2 50 - 1, 2], {3, -1, 3} ]
{5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53,
55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95, 97}
Riffle[#, # + 2] &[2 Range[3, 50, 3] - 1]
same result
2 Complement[#, #[[;; ;; 3]]] & @ Range[2, 50] - 1;
same result
All three are faster than Pick
+ Unitize
combination from Henrik's answer:
nmax = 1000000;
e0 = Drop[Range[5, 2 nmax - 1, 2], {3, -1, 3} ]; // AbsoluteTiming
0.0102131
e1 = Riffle[#, # + 2] &[2 Range[3, nmax, 3] - 1]; // AbsoluteTiming // First
0.0126898
e2 = 2 Complement[#, #[[;; ;; 3]]] & @ Range[2, nmax] - 1; // AbsoluteTiming // First
0.0354908
versus Henrik's
d = Pick[2 # - 1, Unitize[Mod[#, 3] - 2], 1] &@Range[2, nmax]; // AbsoluteTiming // First
0.0526116
and chyanog's method:
(k = Floor[(2 nmax + 1)/3] - 1;
res = Range[4, 3 k + 1, 3] + BitAnd[Range[k], 1];) // AbsoluteTiming // First
0.0125891
e0 == e1 == e2 == d == res
True
Very clever! +1
– ciao
2 days ago
add a comment |
up vote
5
down vote
The condition to avoid can be rewritten using Mod, hence:
Table[If[Mod[n, 3] != 2, 2 n - 1, Nothing], {n, 2, 50}]
Or you can use Map /@ instead of Table:
If[Mod[#, 3] != 2, 2 # - 1, Nothing] & /@ Range[2, 50]
(Thanks to Lukas Lang for the easier use of Nothing).
1
You could also returnNothing
in the else case to remove the unwanted elements directly
– Lukas Lang
2 days ago
add a comment |
up vote
4
down vote
An idiomatic way with Sow
and Reap
:
Reap[
Do[If[Mod[n, 3] != 2, Sow[2 n - 1]], {n, 2, 50}]
][[2, 1]]
{5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53,
55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95, 97}
A harder to read, vectorized way: First create the list and pick the valid elements with Pick
.
Pick[2 # - 1, Unitize[Mod[#, 3] - 2], 1] &@Range[2, 50]
{5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53,
55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95, 97}
The vectorized version is about 40 times faster:
nmax = 1000000;
a = Reap[Do[If[Mod[n, 3] != 2, Sow[2 n - 1]], {n, 2, nmax}]][[2, 1]]; // AbsoluteTiming // First
b = Table[If[Mod[n, 3] != 2, 2 n - 1, Nothing], {n, 2, nmax}]; // AbsoluteTiming // First
c = If[Mod[#, 3] != 2, 2 # - 1, Nothing] & /@ Range[2, nmax]; // AbsoluteTiming // First
d = Pick[2 # - 1, Unitize[Mod[#, 3] - 2], 1] &@Range[2, nmax]; // AbsoluteTiming // First
a == b == c == d
0.943828
0.907419
1.34615
0.018833
True
add a comment |
up vote
2
down vote
More efficient way
Clear["f*"];
f1[m_] := Module[{r = Range[4, 2 m - Mod[m, 3], 3]}, r[[1 ;; ;; 2]] += 1; r];
f2[m_] := Drop[Range[5, 2 m - 1, 2], {3, -1, 3}];
r1 = f1[10^7]; // RepeatedTiming
r2 = f2[10^7]; // RepeatedTiming
r1 == r2
{0.11, Null}
{0.14, Null}
True
add a comment |
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
7
down vote
Using Drop
, Riffle
and Complement
:
Drop[Range[5, 2 50 - 1, 2], {3, -1, 3} ]
{5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53,
55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95, 97}
Riffle[#, # + 2] &[2 Range[3, 50, 3] - 1]
same result
2 Complement[#, #[[;; ;; 3]]] & @ Range[2, 50] - 1;
same result
All three are faster than Pick
+ Unitize
combination from Henrik's answer:
nmax = 1000000;
e0 = Drop[Range[5, 2 nmax - 1, 2], {3, -1, 3} ]; // AbsoluteTiming
0.0102131
e1 = Riffle[#, # + 2] &[2 Range[3, nmax, 3] - 1]; // AbsoluteTiming // First
0.0126898
e2 = 2 Complement[#, #[[;; ;; 3]]] & @ Range[2, nmax] - 1; // AbsoluteTiming // First
0.0354908
versus Henrik's
d = Pick[2 # - 1, Unitize[Mod[#, 3] - 2], 1] &@Range[2, nmax]; // AbsoluteTiming // First
0.0526116
and chyanog's method:
(k = Floor[(2 nmax + 1)/3] - 1;
res = Range[4, 3 k + 1, 3] + BitAnd[Range[k], 1];) // AbsoluteTiming // First
0.0125891
e0 == e1 == e2 == d == res
True
Very clever! +1
– ciao
2 days ago
add a comment |
up vote
7
down vote
Using Drop
, Riffle
and Complement
:
Drop[Range[5, 2 50 - 1, 2], {3, -1, 3} ]
{5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53,
55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95, 97}
Riffle[#, # + 2] &[2 Range[3, 50, 3] - 1]
same result
2 Complement[#, #[[;; ;; 3]]] & @ Range[2, 50] - 1;
same result
All three are faster than Pick
+ Unitize
combination from Henrik's answer:
nmax = 1000000;
e0 = Drop[Range[5, 2 nmax - 1, 2], {3, -1, 3} ]; // AbsoluteTiming
0.0102131
e1 = Riffle[#, # + 2] &[2 Range[3, nmax, 3] - 1]; // AbsoluteTiming // First
0.0126898
e2 = 2 Complement[#, #[[;; ;; 3]]] & @ Range[2, nmax] - 1; // AbsoluteTiming // First
0.0354908
versus Henrik's
d = Pick[2 # - 1, Unitize[Mod[#, 3] - 2], 1] &@Range[2, nmax]; // AbsoluteTiming // First
0.0526116
and chyanog's method:
(k = Floor[(2 nmax + 1)/3] - 1;
res = Range[4, 3 k + 1, 3] + BitAnd[Range[k], 1];) // AbsoluteTiming // First
0.0125891
e0 == e1 == e2 == d == res
True
Very clever! +1
– ciao
2 days ago
add a comment |
up vote
7
down vote
up vote
7
down vote
Using Drop
, Riffle
and Complement
:
Drop[Range[5, 2 50 - 1, 2], {3, -1, 3} ]
{5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53,
55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95, 97}
Riffle[#, # + 2] &[2 Range[3, 50, 3] - 1]
same result
2 Complement[#, #[[;; ;; 3]]] & @ Range[2, 50] - 1;
same result
All three are faster than Pick
+ Unitize
combination from Henrik's answer:
nmax = 1000000;
e0 = Drop[Range[5, 2 nmax - 1, 2], {3, -1, 3} ]; // AbsoluteTiming
0.0102131
e1 = Riffle[#, # + 2] &[2 Range[3, nmax, 3] - 1]; // AbsoluteTiming // First
0.0126898
e2 = 2 Complement[#, #[[;; ;; 3]]] & @ Range[2, nmax] - 1; // AbsoluteTiming // First
0.0354908
versus Henrik's
d = Pick[2 # - 1, Unitize[Mod[#, 3] - 2], 1] &@Range[2, nmax]; // AbsoluteTiming // First
0.0526116
and chyanog's method:
(k = Floor[(2 nmax + 1)/3] - 1;
res = Range[4, 3 k + 1, 3] + BitAnd[Range[k], 1];) // AbsoluteTiming // First
0.0125891
e0 == e1 == e2 == d == res
True
Using Drop
, Riffle
and Complement
:
Drop[Range[5, 2 50 - 1, 2], {3, -1, 3} ]
{5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53,
55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95, 97}
Riffle[#, # + 2] &[2 Range[3, 50, 3] - 1]
same result
2 Complement[#, #[[;; ;; 3]]] & @ Range[2, 50] - 1;
same result
All three are faster than Pick
+ Unitize
combination from Henrik's answer:
nmax = 1000000;
e0 = Drop[Range[5, 2 nmax - 1, 2], {3, -1, 3} ]; // AbsoluteTiming
0.0102131
e1 = Riffle[#, # + 2] &[2 Range[3, nmax, 3] - 1]; // AbsoluteTiming // First
0.0126898
e2 = 2 Complement[#, #[[;; ;; 3]]] & @ Range[2, nmax] - 1; // AbsoluteTiming // First
0.0354908
versus Henrik's
d = Pick[2 # - 1, Unitize[Mod[#, 3] - 2], 1] &@Range[2, nmax]; // AbsoluteTiming // First
0.0526116
and chyanog's method:
(k = Floor[(2 nmax + 1)/3] - 1;
res = Range[4, 3 k + 1, 3] + BitAnd[Range[k], 1];) // AbsoluteTiming // First
0.0125891
e0 == e1 == e2 == d == res
True
edited 2 days ago
answered 2 days ago
kglr
172k8194399
172k8194399
Very clever! +1
– ciao
2 days ago
add a comment |
Very clever! +1
– ciao
2 days ago
Very clever! +1
– ciao
2 days ago
Very clever! +1
– ciao
2 days ago
add a comment |
up vote
5
down vote
The condition to avoid can be rewritten using Mod, hence:
Table[If[Mod[n, 3] != 2, 2 n - 1, Nothing], {n, 2, 50}]
Or you can use Map /@ instead of Table:
If[Mod[#, 3] != 2, 2 # - 1, Nothing] & /@ Range[2, 50]
(Thanks to Lukas Lang for the easier use of Nothing).
1
You could also returnNothing
in the else case to remove the unwanted elements directly
– Lukas Lang
2 days ago
add a comment |
up vote
5
down vote
The condition to avoid can be rewritten using Mod, hence:
Table[If[Mod[n, 3] != 2, 2 n - 1, Nothing], {n, 2, 50}]
Or you can use Map /@ instead of Table:
If[Mod[#, 3] != 2, 2 # - 1, Nothing] & /@ Range[2, 50]
(Thanks to Lukas Lang for the easier use of Nothing).
1
You could also returnNothing
in the else case to remove the unwanted elements directly
– Lukas Lang
2 days ago
add a comment |
up vote
5
down vote
up vote
5
down vote
The condition to avoid can be rewritten using Mod, hence:
Table[If[Mod[n, 3] != 2, 2 n - 1, Nothing], {n, 2, 50}]
Or you can use Map /@ instead of Table:
If[Mod[#, 3] != 2, 2 # - 1, Nothing] & /@ Range[2, 50]
(Thanks to Lukas Lang for the easier use of Nothing).
The condition to avoid can be rewritten using Mod, hence:
Table[If[Mod[n, 3] != 2, 2 n - 1, Nothing], {n, 2, 50}]
Or you can use Map /@ instead of Table:
If[Mod[#, 3] != 2, 2 # - 1, Nothing] & /@ Range[2, 50]
(Thanks to Lukas Lang for the easier use of Nothing).
edited 2 days ago
answered 2 days ago
bill s
52.3k375148
52.3k375148
1
You could also returnNothing
in the else case to remove the unwanted elements directly
– Lukas Lang
2 days ago
add a comment |
1
You could also returnNothing
in the else case to remove the unwanted elements directly
– Lukas Lang
2 days ago
1
1
You could also return
Nothing
in the else case to remove the unwanted elements directly– Lukas Lang
2 days ago
You could also return
Nothing
in the else case to remove the unwanted elements directly– Lukas Lang
2 days ago
add a comment |
up vote
4
down vote
An idiomatic way with Sow
and Reap
:
Reap[
Do[If[Mod[n, 3] != 2, Sow[2 n - 1]], {n, 2, 50}]
][[2, 1]]
{5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53,
55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95, 97}
A harder to read, vectorized way: First create the list and pick the valid elements with Pick
.
Pick[2 # - 1, Unitize[Mod[#, 3] - 2], 1] &@Range[2, 50]
{5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53,
55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95, 97}
The vectorized version is about 40 times faster:
nmax = 1000000;
a = Reap[Do[If[Mod[n, 3] != 2, Sow[2 n - 1]], {n, 2, nmax}]][[2, 1]]; // AbsoluteTiming // First
b = Table[If[Mod[n, 3] != 2, 2 n - 1, Nothing], {n, 2, nmax}]; // AbsoluteTiming // First
c = If[Mod[#, 3] != 2, 2 # - 1, Nothing] & /@ Range[2, nmax]; // AbsoluteTiming // First
d = Pick[2 # - 1, Unitize[Mod[#, 3] - 2], 1] &@Range[2, nmax]; // AbsoluteTiming // First
a == b == c == d
0.943828
0.907419
1.34615
0.018833
True
add a comment |
up vote
4
down vote
An idiomatic way with Sow
and Reap
:
Reap[
Do[If[Mod[n, 3] != 2, Sow[2 n - 1]], {n, 2, 50}]
][[2, 1]]
{5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53,
55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95, 97}
A harder to read, vectorized way: First create the list and pick the valid elements with Pick
.
Pick[2 # - 1, Unitize[Mod[#, 3] - 2], 1] &@Range[2, 50]
{5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53,
55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95, 97}
The vectorized version is about 40 times faster:
nmax = 1000000;
a = Reap[Do[If[Mod[n, 3] != 2, Sow[2 n - 1]], {n, 2, nmax}]][[2, 1]]; // AbsoluteTiming // First
b = Table[If[Mod[n, 3] != 2, 2 n - 1, Nothing], {n, 2, nmax}]; // AbsoluteTiming // First
c = If[Mod[#, 3] != 2, 2 # - 1, Nothing] & /@ Range[2, nmax]; // AbsoluteTiming // First
d = Pick[2 # - 1, Unitize[Mod[#, 3] - 2], 1] &@Range[2, nmax]; // AbsoluteTiming // First
a == b == c == d
0.943828
0.907419
1.34615
0.018833
True
add a comment |
up vote
4
down vote
up vote
4
down vote
An idiomatic way with Sow
and Reap
:
Reap[
Do[If[Mod[n, 3] != 2, Sow[2 n - 1]], {n, 2, 50}]
][[2, 1]]
{5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53,
55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95, 97}
A harder to read, vectorized way: First create the list and pick the valid elements with Pick
.
Pick[2 # - 1, Unitize[Mod[#, 3] - 2], 1] &@Range[2, 50]
{5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53,
55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95, 97}
The vectorized version is about 40 times faster:
nmax = 1000000;
a = Reap[Do[If[Mod[n, 3] != 2, Sow[2 n - 1]], {n, 2, nmax}]][[2, 1]]; // AbsoluteTiming // First
b = Table[If[Mod[n, 3] != 2, 2 n - 1, Nothing], {n, 2, nmax}]; // AbsoluteTiming // First
c = If[Mod[#, 3] != 2, 2 # - 1, Nothing] & /@ Range[2, nmax]; // AbsoluteTiming // First
d = Pick[2 # - 1, Unitize[Mod[#, 3] - 2], 1] &@Range[2, nmax]; // AbsoluteTiming // First
a == b == c == d
0.943828
0.907419
1.34615
0.018833
True
An idiomatic way with Sow
and Reap
:
Reap[
Do[If[Mod[n, 3] != 2, Sow[2 n - 1]], {n, 2, 50}]
][[2, 1]]
{5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53,
55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95, 97}
A harder to read, vectorized way: First create the list and pick the valid elements with Pick
.
Pick[2 # - 1, Unitize[Mod[#, 3] - 2], 1] &@Range[2, 50]
{5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53,
55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95, 97}
The vectorized version is about 40 times faster:
nmax = 1000000;
a = Reap[Do[If[Mod[n, 3] != 2, Sow[2 n - 1]], {n, 2, nmax}]][[2, 1]]; // AbsoluteTiming // First
b = Table[If[Mod[n, 3] != 2, 2 n - 1, Nothing], {n, 2, nmax}]; // AbsoluteTiming // First
c = If[Mod[#, 3] != 2, 2 # - 1, Nothing] & /@ Range[2, nmax]; // AbsoluteTiming // First
d = Pick[2 # - 1, Unitize[Mod[#, 3] - 2], 1] &@Range[2, nmax]; // AbsoluteTiming // First
a == b == c == d
0.943828
0.907419
1.34615
0.018833
True
edited 2 days ago
answered 2 days ago
Henrik Schumacher
45.5k366131
45.5k366131
add a comment |
add a comment |
up vote
2
down vote
More efficient way
Clear["f*"];
f1[m_] := Module[{r = Range[4, 2 m - Mod[m, 3], 3]}, r[[1 ;; ;; 2]] += 1; r];
f2[m_] := Drop[Range[5, 2 m - 1, 2], {3, -1, 3}];
r1 = f1[10^7]; // RepeatedTiming
r2 = f2[10^7]; // RepeatedTiming
r1 == r2
{0.11, Null}
{0.14, Null}
True
add a comment |
up vote
2
down vote
More efficient way
Clear["f*"];
f1[m_] := Module[{r = Range[4, 2 m - Mod[m, 3], 3]}, r[[1 ;; ;; 2]] += 1; r];
f2[m_] := Drop[Range[5, 2 m - 1, 2], {3, -1, 3}];
r1 = f1[10^7]; // RepeatedTiming
r2 = f2[10^7]; // RepeatedTiming
r1 == r2
{0.11, Null}
{0.14, Null}
True
add a comment |
up vote
2
down vote
up vote
2
down vote
More efficient way
Clear["f*"];
f1[m_] := Module[{r = Range[4, 2 m - Mod[m, 3], 3]}, r[[1 ;; ;; 2]] += 1; r];
f2[m_] := Drop[Range[5, 2 m - 1, 2], {3, -1, 3}];
r1 = f1[10^7]; // RepeatedTiming
r2 = f2[10^7]; // RepeatedTiming
r1 == r2
{0.11, Null}
{0.14, Null}
True
More efficient way
Clear["f*"];
f1[m_] := Module[{r = Range[4, 2 m - Mod[m, 3], 3]}, r[[1 ;; ;; 2]] += 1; r];
f2[m_] := Drop[Range[5, 2 m - 1, 2], {3, -1, 3}];
r1 = f1[10^7]; // RepeatedTiming
r2 = f2[10^7]; // RepeatedTiming
r1 == r2
{0.11, Null}
{0.14, Null}
True
edited 2 days ago
answered 2 days ago
chyanog
6,80921546
6,80921546
add a comment |
add a comment |
Amr is a new contributor. Be nice, and check out our Code of Conduct.
Amr is a new contributor. Be nice, and check out our Code of Conduct.
Amr is a new contributor. Be nice, and check out our Code of Conduct.
Amr is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f186475%2ftable-2n-1-from-n-2-to-50-except-when-n-3m-1%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Possible duplicate of How to generate a table with i != j
– Michael E2
23 hours ago