cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A085073 Smallest k such that n+k and n*k have the same prime signature, or 0 if no such number exists.

This page as a plain text file.
%I A085073 #20 Nov 17 2020 14:19:00
%S A085073 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,
%T A085073 2,13,212,5,2742,2,1669,1,1,31,2764,2,1,13,1094,4,2298,3,1,123,14,11,
%U A085073 8912,3,202,17,2,2,1146,23,904,1,26,3,11028,13,22,57,3581,37,1194,2,172,15
%N A085073 Smallest k such that n+k and n*k have the same prime signature, or 0 if no such number exists.
%H A085073 Michel Marcus, <a href="/A085073/b085073.txt">Table of n, a(n) for n = 1..3000</a>
%e A085073 a(6) = 379 as 6*379 = 2*3*379 and 6+379 = 385 = 5*7*11 both have prime signature p*q*r.
%p A085073 s:= proc(n) s(n):= sort(map(i-> i[2], ifactors(n)[2])) end:
%p A085073 a:= proc(n) option remember; local k; for k
%p A085073        while s(n*k)<>s(n+k) do od; k
%p A085073     end:
%p A085073 seq(a(n), n=1..70);  # _Alois P. Heinz_, Mar 06 2019
%t A085073 kmax = 10^6;
%t A085073 s[n_] := FactorInteger[n][[All, 2]] // Sort;
%t A085073 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];
%t A085073 Array[a, 70] (* _Jean-François Alcover_, Nov 17 2020 *)
%o A085073 (PARI) sgntr(n) = vecsort(factor(n)[, 2]~);
%o A085073 a(n) = {my(k=1); while (sgntr(n+k) != sgntr(n*k), k++); k; } \\ _Michel Marcus_, Nov 17 2020
%Y A085073 Cf. A052213 (a(n)=1), A085072.
%K A085073 nonn
%O A085073 1,1
%A A085073 _Amarnath Murthy_, Jul 01 2003
%E A085073 Corrected by _Jason Earls_, Jul 10 2003
%E A085073 More terms from _David Wasserman_, Jan 12 2005