OFFSET
1,1
COMMENTS
This is a subsequence of A227897 (numbers k such that k^2 + 2 is not squarefree).
If we consider the pairs (m, k), k is not unique, in contrast to the same problem with m^2 + 1 (see A282092) where conjecturally k seems unique.
The corresponding pairs (m, k) are (4, 2), (5, 1), (14, 8), (22, 2), (22, 4), (71, 11), (140, 8), (140, 14), (194, 112), (218, 40), (265, 7), (602, 146), (707, 141), ... The cases where k is not unique are given by the pairs (22, 2), (22, 4), (140, 8), (140, 14), (2695, 11), (2695, 71), (3866, 248), (3866, 2030), ...
EXAMPLE
4 is in the sequence because with the pair (m, k) = (4, 2), we obtain the numbers 4^2+2 = 2*3^2 and 2^2+2 = 2*3 with the same prime factors 2 and 3.
140 is in the sequence because with the first pair (m, k) = (140, 8), we obtain the numbers 140^2+2 = 2*3*11^2 and 8^2+2 = 2*3*11 with the same prime factors 2, 3 and 11; with the second pair (m, k) = (140, 14), we obtain the numbers 140^2+2 = 2*3*11^2 and 14^2+2 = 2*3^2*11 with the same prime factors 2, 3 and 11.
MATHEMATICA
Select[Range@ 2000, Function[m, Total@ Boole@ Table[Function[w, And[SameQ[First@ w, #], SameQ[Last@ w, #]] &@ Union@ Flatten@ w]@ Map[FactorInteger[#][[All, 1]] &, {m^2 + 2, k^2 + 2}], {k, m - 1}] > 0]] (* program from Michael De Vlieger, adapted for the sequence - see A282092 *)
PROG
(Magma) M:=178000; S:=[]; for k in [1..M] do S[k]:=[&*PrimeDivisors(k^2+2), k]; end for; S:=Sort(S); a:=[]; for j in [2..#S] do if S[j][1] eq S[j-1][1] then a[#a+1]:=S[j][2]; end if; end for; a:=Sort(a); a; // Jon E. Schoenfield, Jan 28 2022
(PARI) isok(m) = {if (!issquarefree(m^2+2), my(f=factor(m^2+2)[, 1]); for (k=1, m-1, if (factor(k^2+2)[, 1] == f, return(1)); ); ); } \\ Michel Marcus, Feb 02 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Jan 28 2022
EXTENSIONS
More terms from Jinyuan Wang, Jan 28 2022
STATUS
approved