login
A373781
List of indices of numbers k such that A373390(k) and A373390(k+2) are coprime.
2
1, 9, 13, 19, 24, 25, 35, 36, 38, 42, 51, 53, 61, 62, 64, 73, 75, 77, 79, 85, 87, 91, 93, 99, 101, 105, 107, 114, 118, 129, 131, 139, 148, 150, 152, 154, 155, 157, 168, 170, 174, 176, 177, 179, 185, 187, 188, 190, 192, 194, 204, 206, 208, 213, 215, 217, 219, 220
OFFSET
1,2
LINKS
Michael De Vlieger, Plot a(n) at (x,y) = (a(n) mod 1000, -floor(a(n)/1000) - 1), n = 1..10^6 in black.
EXAMPLE
Let s = A373390.
a(1) = 1 since gcd(s(1), s(3)) = gcd(1, 3) = 1.
a(2) = 9 since gcd(s(9), s(11)) = gcd(5, 7) = 1.
8 is not in the sequence since gcd(s(8), s(10)) = gcd(14, 6) = 2.
MATHEMATICA
c[_] := False; p[_] := False; nn = 222;
Array[Set[{a[#], c[#], p[#]}, {#, True, True}] &, 3]; i = a[2]; j = a[3]; u = 4;
{1}~Join~Reap[Do[k = u;
While[Or[c[k], ! CoprimeQ[j, k],
NoneTrue[Set[s, #], p] &@ FactorInteger[k][[All, 1]] ], k++];
Map[Set[p[#], True] &, s]; If[CoprimeQ[i, k], Sow[n - 2]];
Set[{a[n], c[k], i, j}, {k, True, j, k}];
If[k == u, While[c[u], u++]], {n, 4, nn}] ][[-1, 1]]
CROSSREFS
Sequence in context: A090415 A026283 A307287 * A373914 A026045 A371728
KEYWORD
nonn,easy
AUTHOR
Michael De Vlieger, Jul 01 2024
STATUS
approved