%I #21 Nov 16 2021 11:18:56
%S 1,3,7,12,22,30,47,61,85,113,126,177,193,246,279,321,341,428,499,571,
%T 616,686,754,854,975,1052,1150,1317,1376,1457,1513,1664,1761,1961,
%U 2307,2434,2591,2795,2843,3057,3226,3405,3508,3776,3930,4023,4196,4575,4731
%N a(1)=1; thereafter, a(n) is the smallest number such that the addition and multiplication tables for (a(1),...,a(n)) together contain n*(n+1) different entries (the maximum possible).
%H Peter Kagey, <a href="/A337946/b337946.txt">Table of n, a(n) for n = 1..1000</a>
%H Peter Kagey, <a href="/A337946/a337946.txt">Haskell program</a>
%e The addition table of a(k) for k=1..5:
%e + | 1 3 7 12 22
%e ---+-------------
%e 1 | 2 4 8 13 23
%e 3 | 6 10 15 25
%e 7 | 14 19 29
%e 12 | 24 34
%e 22 | 44
%e The multiplication table of a(k) for k=1..5:
%e * | 1 3 7 12 22
%e ---+---------------
%e 1 | 1 3 7 12 22
%e 3 | 9 21 36 66
%e 7 | 49 84 154
%e 12 | 144 264
%e 22 | 484
%e These two tables contain the 5*(5+1) = 30 values {1, 2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15, 19, 21, 22, 23, 24, 25, 29, 34, 36, 44, 49, 66, 84, 144, 154, 264, 484}.
%t j={k=1};Do[While[l=Join[j,{++k}];g=Union[Sort/@Tuples[l,{2}]];p=Times@@#&/@g;s=Total/@g;!SameQ@@Flatten[{Length@Union@Flatten@{p,s},Length@l(Length@l+1)}]];j=Join[j,{k}];k=Last@j,48];j (* _Giorgos Kalogeropoulos_, Nov 16 2021 *)
%Y Cf. A005282 (addition table), A066720 (multiplication table), A337655, A337656, A337947.
%K nonn
%O 1,2
%A _Peter Kagey_, Oct 02 2020