login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A085073 Smallest k such that n+k and n*k have the same prime signature, or 0 if no such number exists. 2
2, 1, 7, 41, 15, 134, 3, 127, 11, 2, 3, 548, 2, 1, 3, 389, 5, 582, 2, 316, 1, 38, 3, 2216, 3, 2, 13, 212, 5, 2742, 2, 1669, 1, 1, 31, 2764, 2, 1, 13, 1094, 4, 2298, 3, 1, 123, 14, 11, 8912, 3, 202, 17, 2, 2, 1146, 23, 904, 1, 26, 3, 11028, 13, 22, 57, 3581, 37, 1194, 2, 172, 15 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
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
Cf. A052213 (a(n)=1), A085072.
Sequence in context: A320519 A183272 A138346 * A131288 A111789 A179447
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 07:33 EDT 2024. Contains 371905 sequences. (Running on oeis4.)