OFFSET
1,1
EXAMPLE
For k = 11475 = 3^3 * 5^2 * 17, sopf(k)=25 divides k and sopf(sopf(k))=5 divides sopf(k).
MAPLE
f := proc (n)
add(d, d = numtheory[factorset](n))
end proc:
h := proc (n)
option remember;
if isprime(n) then
1
else
1+h(convert(numtheory[factorset](n), `+`)) end if:
end proc:
checkDivisibility := proc (n)
local k, fk, fk1, result:
result := true:
fk := n;
for k from 0 to h(n)-1 do
fk1 := f(fk);
if fk1 = 0 or `mod`(fk, fk1) <> 0 then
result := false:
break:
end if:
fk := fk1:
end do:
return result:
end proc:
g := proc (n)
nops(numtheory[factorset](n)):
end proc:
findNumbers := proc (upper_limit)
local n, results:
results := []:
for n from 2 to upper_limit do
if checkDivisibility(n) and 2 <= g(n) then
results := [op(results), n]:
end if:
end do:
return results:
end proc:
upper_limit := 10000:
numbers := findNumbers(upper_limit);
MATHEMATICA
s[n_] := DivisorSum[n, # &, PrimeQ[#] &]; q[n_] := !PrimePowerQ[n] && AllTrue[Ratios@ Reverse@ FixedPointList[s, n], IntegerQ]; Select[Range[2, 17000], q] (* Amiram Eldar, May 30 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Rafik Khalfi, May 30 2024
STATUS
approved