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!)
A153024 a(n) is the number of iterations of the map k -> A048050(k) to reach zero. If we never reach 0, then a(n) = -1. A048050 gives the sum of proper divisors of k, excluding both 1 and n from the sum. 2

%I #15 Nov 03 2017 09:55:48

%S 1,1,1,2,1,2,1,3,2,2,1,5,1,3,4,4,1,5,1,4,3,2,1,7,2,5,6,7,1,2,1,3,4,2,

%T 6,8,1,4,5,3,1,2,1,6,4,3,1,-1,2,3,5,5,1,7,5,5,3,2,1,2,1,5,4,6,6,7,1,4,

%U 6,2,1,6,1,6,-1,5,6,2,1,7,6,2,1,2,3,5,4,6,1,9,5,-1,3,3,8,10,1,7,6,5,1,2,1,7,6

%N a(n) is the number of iterations of the map k -> A048050(k) to reach zero. If we never reach 0, then a(n) = -1. A048050 gives the sum of proper divisors of k, excluding both 1 and n from the sum.

%C Previous name was: The number of iterations for A153023 to converge when started at n.

%H Antti Karttunen, <a href="/A153024/b153024.txt">Table of n, a(n) for n = 1..10000</a>

%e With m(n) = A048050(n) we have: m(18) -> m(20) -> m(21) -> m(10) -> m(7) -> 0, thus a(18) = 5.

%e On the other hand, m(48) = 75 and m(75) = 48, so we ended in a cycle, thus a(48) = a(75) = -1. - Edited by _Antti Karttunen_, Nov 03 2017

%p f := proc(n) L := {} ; a := n ; while not isprime(a) do a := A048050(a) ; if a in L then RETURN(-1) ; fi; L := L union {a} ; od; 1+nops(L) ; end:

%p A153023 := proc(n) if n =1 then 1; elif isprime(n) then 1; else f(n) ; fi; end: # _R. J. Mathar_, May 25 2013

%t With[{nn = 100}, Table[If[! CompositeQ[n], 1, Length@ NestWhileList[DivisorSigma[1, #] - (# + 1) &, n, Nor[PrimeQ@ #, # == 0] &, 1, 100]] /. k_ /; k == nn + 1 -> -1, {n, 104}]] (* _Michael De Vlieger_, Nov 03 2017 *)

%o (Scheme)

%o (define (A153024 n) (let loop ((n n) (visited (list n)) (i 0)) (let ((next (A048050 n))) (cond ((zero? n) i) ((member next visited) -1) (else (loop next (cons next visited) (+ 1 i)))))))

%o (define (A048050 n) (if (= 1 n) 0 (- (A001065 n) 1)))

%o (define (A001065 n) (- (A000203 n) n)) ;; For an implementation of A000203, see under that entry.

%o ;; _Antti Karttunen_, Nov 03 2017

%Y Cf. A048050, A153023.

%K sign

%O 1,4

%A Andrew Carter (acarter09(AT)newarka.edu), Dec 16 2008

%E Name changed and more terms added by _Antti Karttunen_, Nov 03 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 25 11:39 EDT 2024. Contains 371969 sequences. (Running on oeis4.)