OFFSET
1,1
EXAMPLE
The depth of 22 is 3 because 22->9->3, that is, 22 mod (11 + 2) = 9, 9 mod (3 + 3) = 3, and 3 mod (3) = 0, and 22 is the smallest number to have a depth of 3.
a(10) = 7060198, because 7060198->3530097->392185->78417->8665->1713->565->93->25->5
PROG
(Python)
def primfacs(n):
i = 2
primfacs = []
while i * i <= n:
while n % i == 0:
primfacs.append(i)
n = n / i
i = i + 1
if n > 1:
primfacs.append(n)
return primfacs
def sopfr(n):
plist = list(primfacs(n))
l = len(plist)
s = 0
while l > 0:
s += plist[l - 1]
l -= 1
return s
def sd(n):
d = 1
s = n % sopfr(n)
if s > 1:
d += sd(s)
return d
n=2
max=1000
rec = 0
lst = []
while n <= max:
r = sd(n)
if r > rec:
lst.append(n)
rec = r
n += 1
print(lst)
CROSSREFS
KEYWORD
nonn,more
AUTHOR
J. Stauduhar, Feb 28 2014
EXTENSIONS
a(12) from Michel Marcus, Mar 26 2014
STATUS
approved