The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A238529 a(0) = a(1) = 0, and for n > 1, a(n) = number of iterations of A238525 (n modulo sopfr(n)) needed to reach either 0 or 1. Here sopfr(n) is the sum of the prime factors of n, with multiplicity, A001414. 5
0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 3, 1, 2, 2, 2, 1, 2, 1, 1, 1, 2, 2, 3, 2, 2, 1, 2, 2, 2, 1, 2, 1, 3, 1, 2, 1, 2, 2, 2, 2, 1, 1, 3, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 1, 2, 2, 1, 1, 1, 1, 3, 3, 2, 2, 2, 1, 2, 3, 3, 1, 1, 2, 2, 2, 2, 1, 3, 2, 2, 3, 2, 2, 2, 1, 2, 3, 2, 1, 3, 1, 3, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,9
COMMENTS
Previous name was: Recursive depth of n modulo sopfr(n), where sopfr(n) is the sum of the prime factors of n, with multiplicity.
Indices of records are 0, 2, 8, 22, 166, ... (A238530) - David A. Corneth & Antti Karttunen, Oct 20 2017
LINKS
FORMULA
a(0) = a(1) = 0; for n > 1, a(n) = 1 + a(A238525(n)). - Antti Karttunen, Oct 20 2017
EXAMPLE
a(2) = 1, because 2 mod sopfr(2) = 2 mod 2 = 0, and further recursion (0 mod sopfr(0)) is undefined.
a(8) = 2, because 8 mod sopfr(8) = 8 mod 6 = 2, and 2 mod sopfr(2) is defined as above, giving 8 a recursive depth of 2.
MATHEMATICA
Array[-1 + Length@ NestWhileList[Mod[#, Total@ Flatten@ Map[ConstantArray[#1, #2] & @@ # &, FactorInteger@ #]] &, #, # > 1 &] &, 105, 0] (* Michael De Vlieger, Oct 20 2017 *)
PROG
(Sage)
def a(n):
d = 0
while n>1:
n = n % sum([f[0]*f[1] for f in factor(n)])
d = d+1
return d
# Ralf Stephan, Mar 09 2014
(PARI)
A001414(n) = { my(f=factor(n)); sum(k=1, matsize(f)[1], f[k, 1]*f[k, 2]); };
A238525(n) = (n%A001414(n));
A238529(n) = if(n<=1, 0, 1+A238529(A238525(n))); \\ Antti Karttunen, Oct 20 2017
CROSSREFS
Sequence in context: A105971 A280314 A080354 * A195150 A022307 A029413
KEYWORD
nonn
AUTHOR
J. Stauduhar, Feb 28 2014
EXTENSIONS
More terms from Ralf Stephan, Mar 09 2014
Terms a(0) = a(1) = 0 prepended and name changed by Antti Karttunen, Oct 20 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 16 16:19 EDT 2024. Contains 372554 sequences. (Running on oeis4.)