login
Numbers in A379165 that share a factor with both previous terms, in order of appearance.
2

%I #18 Dec 20 2024 11:40:15

%S 6,10,18,20,16,24,28,36,42,38,40,48,54,50,56,60,62,64,72,75,70,78,74,

%T 76,84,88,96,102,98,100,108,114,110,112,118,120,126,130,132,136,138,

%U 144,150,156,154,160,162,158,164,166,168,174,180,176,182,186,190,192,194,196,204,200,206,210,214,216,228,230,226,234,240,238,244,246,248,250,258,260

%N Numbers in A379165 that share a factor with both previous terms, in order of appearance.

%C See A379165 for further details.

%H Scott R. Shannon, <a href="/A379166/b379166.txt">Table of n, a(n) for n = 1..10000</a>

%t nn = 2^8; c[_] := False; i = 1; j = 2; c[1] = c[2] = True; u = 3;

%t Reap[Do[k = u;

%t While[

%t Or[c[k], Nor[And[#1, #2], Nor[#1, #2]]] &[

%t CoprimeQ[k, i], CoprimeQ[k, j]], k++];

%t Set[{c[k], i, j}, {True, j, k}];

%t If[AllTrue[{{i, k}, {j, k}}, ! CoprimeQ[##] & @@ # &], Sow[k] ];

%t If[k == u, While[c[u], u++]], {n, 3, nn}] ][[-1, 1]] (* _Michael De Vlieger_, Dec 20 2024 *)

%Y Cf. A379165, A353239, A098550, A336957, A064413.

%K nonn

%O 1,1

%A _Scott R. Shannon_, Dec 17 2024