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.
%I A085072 #25 Dec 28 2020 07:44:45 %S A085072 1,2,5,2,4,4,19,16,4,2,6,4,1,6,65,2,2,4,8,1,4,6,16,24,7,98,16,2,12,6, %T A085072 211,1,1,3,64,4,1,7,14,2,24,4,1,5,5,6,32,72,2,4,11,6,2,2,32,1,4,2,24, %U A085072 6,3,5,665,4,4,4,7,5,8,2,36,6,3,1,16,5,24,4,32,544,3,6,6,1,1,4,16,8,36,2 %N A085072 Smallest k such that n and n+k have the same prime signature. %H A085072 Alois P. Heinz, <a href="/A085072/b085072.txt">Table of n, a(n) for n = 2..20000</a> %F A085072 a(prime(k)^r) = prime(k+1)^r- prime(k)^r. %F A085072 a(2^m*prime(k)) = 2^m*(prime(k+1) - prime(k)). %F A085072 a(n) = A081761(n) - n. - _Michel Marcus_, Nov 02 2020 %e A085072 a(28) = 17 as 28 = 2^2*7 and 28+17 = 45 = 3^2*5, both have the prime signature p^2*q where p and q are primes. %p A085072 s:= n-> sort(map(i-> i[2], ifactors(n)[2])): %p A085072 a:= proc(n) option remember; local k; %p A085072 for k while s(n)<>s(n+k) do od; k %p A085072 end: %p A085072 seq(a(n), n=2..100); # _Alois P. Heinz_, Feb 28 2018 %t A085072 s[n_] := Sort[FactorInteger[n][[All, 2]]]; %t A085072 a[n_] := Module[{sn = s[n], k}, For[k = 1, True, k++, If[sn == s[n+k], Return[k]]]]; %t A085072 a /@ Range[2, 100] (* _Jean-François Alcover_, Nov 02 2020 *) %o A085072 (PARI) a(n) = {my(k=1, s = vecsort(factor(n)[,2]~)); while (vecsort(factor(n+k)[,2]~) != s, k++); k;} \\ _Michel Marcus_, Nov 02 2020 %Y A085072 Cf. A046523, A081761, A085073. %K A085072 nonn %O A085072 2,2 %A A085072 _Amarnath Murthy_, Jul 01 2003 %E A085072 More terms from _David Wasserman_, Jan 12 2005