A238530 Position of first occurrence of n in A238529 (Recursive depth of n modulo sopfr(n)).
2, 8, 22, 166, 778, 4962, 29922, 179682, 688078, 7060198, 42361338, 674524645
Offset: 1
Examples
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
Programs
-
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)
Extensions
a(12) from Michel Marcus, Mar 26 2014
Comments