A348889 Numbers m such that there exists at least one integer k < m where m^2 + 2 and k^2 + 2 have the same prime factors.
4, 5, 14, 22, 71, 140, 194, 218, 265, 602, 707, 724, 1020, 1048, 1112, 1642, 2030, 2459, 2695, 3155, 3866, 4433, 4756, 5426, 5756, 8240, 10046, 10084, 11008, 15386, 15926, 19462, 21362, 23092, 23144, 24475, 35230, 37634, 44306, 56327, 64876, 85352, 161564, 177530
Offset: 1
Keywords
Examples
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.
Programs
-
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
-
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 *)
-
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
Extensions
More terms from Jinyuan Wang, Jan 28 2022
Comments