OFFSET
1,1
LINKS
Michel Marcus, Table of n, a(n) for n = 1..3000
EXAMPLE
a(6) = 379 as 6*379 = 2*3*379 and 6+379 = 385 = 5*7*11 both have prime signature p*q*r.
MAPLE
s:= proc(n) s(n):= sort(map(i-> i[2], ifactors(n)[2])) end:
a:= proc(n) option remember; local k; for k
while s(n*k)<>s(n+k) do od; k
end:
seq(a(n), n=1..70); # Alois P. Heinz, Mar 06 2019
MATHEMATICA
kmax = 10^6;
s[n_] := FactorInteger[n][[All, 2]] // Sort;
a[n_] := Module[{k}, If[n == 1, Return[2]]; For[k = 1, k <= kmax, k++, If[s[n k] == s[n+k], Return[k]]]; 0];
Array[a, 70] (* Jean-François Alcover, Nov 17 2020 *)
PROG
(PARI) sgntr(n) = vecsort(factor(n)[, 2]~);
a(n) = {my(k=1); while (sgntr(n+k) != sgntr(n*k), k++); k; } \\ Michel Marcus, Nov 17 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jul 01 2003
EXTENSIONS
Corrected by Jason Earls, Jul 10 2003
More terms from David Wasserman, Jan 12 2005
STATUS
approved