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

%I #28 Oct 21 2017 21:16:03

%S 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,

%T 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,

%U 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

%N 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.

%C Previous name was: Recursive depth of n modulo sopfr(n), where sopfr(n) is the sum of the prime factors of n, with multiplicity.

%C Indices of records are 0, 2, 8, 22, 166, ... (A238530) - _David A. Corneth_ & _Antti Karttunen_, Oct 20 2017

%H Antti Karttunen, <a href="/A238529/b238529.txt">Table of n, a(n) for n = 0..16384</a>

%F a(0) = a(1) = 0; for n > 1, a(n) = 1 + a(A238525(n)). - _Antti Karttunen_, Oct 20 2017

%e a(2) = 1, because 2 mod sopfr(2) = 2 mod 2 = 0, and further recursion (0 mod sopfr(0)) is undefined.

%e 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.

%t Array[-1 + Length@ NestWhileList[Mod[#, Total@ Flatten@ Map[ConstantArray[#1, #2] & @@ # &, FactorInteger@ #]] &, #, # > 1 &] &, 105, 0] (* _Michael De Vlieger_, Oct 20 2017 *)

%o (Sage)

%o def a(n):

%o d = 0

%o while n>1:

%o n = n % sum([f[0]*f[1] for f in factor(n)])

%o d = d+1

%o return d

%o # _Ralf Stephan_, Mar 09 2014

%o (PARI)

%o A001414(n) = { my(f=factor(n)); sum(k=1, matsize(f)[1], f[k, 1]*f[k, 2]); };

%o A238525(n) = (n%A001414(n));

%o A238529(n) = if(n<=1,0,1+A238529(A238525(n))); \\ _Antti Karttunen_, Oct 20 2017

%Y Cf. A001414, A238525, A238530.

%K nonn

%O 0,9

%A _J. Stauduhar_, Feb 28 2014

%E More terms from _Ralf Stephan_, Mar 09 2014

%E Terms a(0) = a(1) = 0 prepended and name changed by _Antti Karttunen_, Oct 20 2017

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 April 24 05:49 EDT 2024. Contains 371918 sequences. (Running on oeis4.)