%I #9 Jul 07 2024 20:57:19
%S 2,3,4,5,6,7,8,10,11,12,14,15,16,17,18,20,21,22,23,26,27,28,29,30,31,
%T 32,33,34,37,39,40,41,43,44,45,46,47,48,49,50,52,54,55,56,57,58,59,60,
%U 63,65,66,67,68,69,70,71,72,74,76,78,80,81,82,83,84,86,88
%N Indices k such that A373390(k) and A373390(k+2) are not coprime.
%H Michael De Vlieger, <a href="/A373782/b373782.txt">Table of n, a(n) for n = 1..10000</a>
%H Michael De Vlieger, <a href="/A373781/a373781.png">Plot a(n) at (x,y) = (a(n) mod 1000, -floor(a(n)/1000) - 1)</a>, n = 1..10^6 in white.
%e Let s = A373390.
%e a(1) = 2 since s(2) | s(4), i.e., 2 | 4.
%e a(2) = 3 since s(3) | s(5), i.e., 3 | 9.
%e a(3) = 4 since s(4) | s(6), i.e., 4 | 8.
%e a(4) = 5 since s(5) | s(7), i.e., gcd(9, 15) = 3.
%e 9 is not in the sequence since a(9) = 5 and a(11) = 7 are coprime.
%t c[_] := False; p[_] := False; nn = 90;
%t Array[Set[{a[#], c[#], p[#]}, {#, True, True}] &, 3]; i = a[2]; j = a[3]; u = 4;
%t Reap[Do[k = u;
%t While[Or[c[k], ! CoprimeQ[j, k], NoneTrue[Set[s, #], p] &@
%t FactorInteger[k][[All, 1]]], k++];
%t Map[Set[p[#], True] &, s]; If[! CoprimeQ[i, k], Sow[n - 2]];
%t Set[{a[n], c[k], i, j}, {k, True, j, k}];
%t If[k == u, While[c[u], u++]], {n, 4, nn}] ][[-1, 1]]
%Y Cf. A373390, A373781.
%K nonn,easy
%O 1,1
%A _Michael De Vlieger_, Jul 01 2024
|