|
Search: id:A153023
|
|
|
| A153023 |
|
a(1)=1 if n is prime a(n)=n. Otherwise, start with n and iterate the map (k -> sum of proper divisors of k) until we reach a prime p; then a(n) = p. If we never reach a prime, a(n) = -1. |
|
+0 2
|
|
| 1, 2, 3, 2, 5, 5, 7, 5, 3, 7, 11, 5, 13, 3, 5, 3, 17, 7, 19, 7, 7, 13, 23, 5, 5, 5, 5, 5, 29, 41, 31, 41, 3, 19, 5, 7, 37, 7, 3, 7, 41, 53, 43, 3, 41, 5, 47, -1, 7, 53, 7, 41, 53, 7, 3, 7, 13, 31, 59, 107, 61, 3, 7, 3, 7, 7, 67, 13, 5, 73, 71, 7, 73, 3, -1, 7, 7, 89, 79, 41, 3, 43, 83, 139, 13
(list; graph; listen)
|
|
|
OFFSET
|
1,2
|
|
|
EXAMPLE
|
a(18)->2.3.6.9->20->2.4.5.10->21->3.7->10->2.5->7=7
|
|
MAPLE
|
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; a ; end: A048050 := proc(n) numtheory[sigma](n)-n-1 ; end: A153023 := proc(n) if n =1 then 1; elif isprime(n) then n; else f(n) ; fi; end: for n from 1 to 180 do printf("%d, ", A153023(n)) ; od: [From R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Dec 19 2008]
|
|
CROSSREFS
|
Cf. A001065, A120716
Sequence in context: A074036 A074251 A074196 this_sequence A068319 A133775 A099043
Adjacent sequences: A153020 A153021 A153022 this_sequence A153024 A153025 A153026
|
|
KEYWORD
|
sign
|
|
AUTHOR
|
Andrew Carter (acarter09(AT)newarka.edu), Dec 16 2008
|
|
EXTENSIONS
|
Extended by R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Dec 19 2008
|
|
|
Search completed in 0.004 seconds
|