A358213 The index of the first occurrence of A002110(n) in A356309.
1, 2, 3, 10, 35, 77, 286, 2431, 4199, 37145
Offset: 0
Programs
-
Mathematica
f[nn_] := Block[{m = 1, i = 1, n = nn, p}, While[n > 0, p = Prime[i]; m *= p^Mod[n, p]; n = Quotient[n, p]; i++]; m]; q = P = 1; Reap[Do[k = j; While[! CoprimeQ[j, f[k]], k++]; If[k == P, Sow[j]; P *= Prime[q]; q++], {j, 0, 2500}] ][[-1, -1]] (* Michael De Vlieger, Nov 06 2022 *)
-
PARI
\\ Very slow: A002110(n) = prod(i=1,n,prime(i)); A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); }; A356309(n) = { my(j=n); while(gcd(A276086(j),n)!=1,j++); (j); }; A358213(n) = { my(x=A002110(n)); for(i=0,oo,if(A356309(i)==x,return(i))); };
Comments