%I #36 May 10 2021 06:01:48
%S 2,8,22,166,778,4962,29922,179682,688078,7060198,42361338,674524645
%N Position of first occurrence of n in A238529 (Recursive depth of n modulo sopfr(n)).
%e 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.
%e a(10) = 7060198, because 7060198->3530097->392185->78417->8665->1713->565->93->25->5
%o (Python)
%o def primfacs(n):
%o i = 2
%o primfacs = []
%o while i * i <= n:
%o while n % i == 0:
%o primfacs.append(i)
%o n = n / i
%o i = i + 1
%o if n > 1:
%o primfacs.append(n)
%o return primfacs
%o def sopfr(n):
%o plist = list(primfacs(n))
%o l = len(plist)
%o s = 0
%o while l > 0:
%o s += plist[l - 1]
%o l -= 1
%o return s
%o def sd(n):
%o d = 1
%o s = n % sopfr(n)
%o if s > 1:
%o d += sd(s)
%o return d
%o n=2
%o max=1000
%o rec = 0
%o lst = []
%o while n <= max:
%o r = sd(n)
%o if r > rec:
%o lst.append(n)
%o rec = r
%o n += 1
%o print(lst)
%K nonn,more
%O 1,1
%A _J. Stauduhar_, Feb 28 2014
%E a(12) from _Michel Marcus_, Mar 26 2014