login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Index of n in A359804, or -1 if n never appears there.
4

%I #19 Mar 19 2023 21:12:31

%S 1,2,3,5,4,6,8,10,9,7,13,14,42,12,11,24,347,19,3466,15,16,17,49012,25,

%T 18,31,32,20,528231,21,717126,38,22,44,23,35,63056215,47,45,26,

%U 1375559400,27,7038527851,28,29,55

%N Index of n in A359804, or -1 if n never appears there.

%C Conjectured to be a permutation of the natural numbers.

%t nn = 2^20; c[_] = 0; q[_] = 1;

%t Array[Set[{a[#], c[#]}, {#, #}] &, 2];

%t Set[{i, j}, {a[1], a[2]}]; u = 3;

%t Monitor[Do[

%t (k = q[#]; While[c[k #] > 0, k++]; k *= #;

%t While[c[# q[#]] > 0, q[#]++]) &[(p = 2;

%t While[Divisible[i j, p], p = NextPrime[p]]; p)]; Sow[p];

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

%t If[k == u, While[c[u] > 0, u++]], {n, 3, nn}], n];

%t TakeWhile[Array[c, 120], # > 0 &] (* _Michael De Vlieger_, Mar 18 2023 *)

%Y Cf. A359804, A361502.

%K nonn,more

%O 1,2

%A _N. J. A. Sloane_, Mar 18 2023