login
A370673
a(n) is the minimum value of k > 0 such that sopf(n) = sopf(n+k) with n > 1 (where sopf(n)=A008472(n)).
0
2, 6, 4, 1, 6, 3, 8, 18, 10, 110, 6, 9, 14, 30, 16, 193, 6, 15, 20, 9, 22, 250, 1, 11, 26, 54, 28, 370, 30, 27, 32, 37, 34, 7, 12, 398, 38, 16, 9, 610, 42, 39, 44, 30, 46, 730, 6, 1, 30, 40, 52, 850, 18, 11, 42, 28, 58, 1586, 3, 57, 62, 27, 64, 12, 51
OFFSET
2,1
EXAMPLE
For n=12, sopf(12) = sopf(12+6), and there is no positive k < 6 such that sopf(12) = sopf(12+k), so a(12)=6.
MAPLE
f:= proc(n)
add( d, d= numtheory[factorset](n)) ;
end proc:
g := proc(n)
local k;
for k from 1 do
if f(n+k) = f(n) then
return k;
fi;
end do;
end proc:map(g, [$2..100]);
MATHEMATICA
sopf[n_]:=Total[First/@FactorInteger[n]]; a[n_]:=Module[{k=1}, While[sopf[n]!=sopf[n+k], k++]; k]; Array[a, 65, 2] (* Stefano Spezia, Mar 26 2024 *)
PROG
(Python)
from sympy import primefactors
def f(n):
return sum(primefactors(n))
def g(n):
k = 1
while True:
if f(n + k) == f(n):
return k
k += 1
print([g(i) for i in range(2, 100)])
(PARI) sopf(n) = vecsum(factor(n)[, 1]); \\ A008472
a(n) = my(k=1, s=sopf(n)); while (sopf(n+k) != s, k++); k; \\ Michel Marcus, Mar 25 2024
CROSSREFS
Cf. A008472 (sopf).
Sequence in context: A332395 A004600 A369558 * A325497 A021795 A008904
KEYWORD
nonn
AUTHOR
Rafik Khalfi, Mar 22 2024
STATUS
approved