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!)
A075860 a(n) is the fixed point reached when the map x -> A008472(x) is iterated, starting from x = n, with the convention a(1)=0. 12
0, 2, 3, 2, 5, 5, 7, 2, 3, 7, 11, 5, 13, 3, 2, 2, 17, 5, 19, 7, 7, 13, 23, 5, 5, 2, 3, 3, 29, 7, 31, 2, 3, 19, 5, 5, 37, 7, 2, 7, 41, 5, 43, 13, 2, 5, 47, 5, 7, 7, 7, 2, 53, 5, 2, 3, 13, 31, 59, 7, 61, 3, 7, 2, 5, 2, 67, 19, 2, 3, 71, 5, 73, 2, 2, 7, 5, 5, 79, 7, 3, 43, 83, 5, 13, 2, 2, 13, 89 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
For n>1, the sequence reaches a fixed point, which is prime.
From Robert Israel, Mar 31 2020: (Start)
a(n) = n if n is prime.
a(n) = n/2 + 2 if n is in A108605.
a(n) = n/4 + 2 if n is in 4*A001359. (End)
LINKS
EXAMPLE
Starting with 60 = 2^2 * 3 * 5 as the first term, add the prime factors of 60 to get the second term = 2 + 3 + 5 = 10. Then add the prime factors of 10 = 2 * 5 to get the third term = 2 + 5 = 7, which is prime. (Successive terms of the sequence will be equal to 7.) Hence a(60) = 7.
MAPLE
f:= proc(n) option remember;
if isprime(n) then n
else procname(convert(numtheory:-factorset(n), `+`))
fi
end proc:
f(1):= 0:
map(f, [$1..100]); # Robert Israel, Mar 31 2020
MATHEMATICA
f[n_] := Module[{a}, a = n; While[ !PrimeQ[a], a = Apply[Plus, Transpose[FactorInteger[a]][[1]]]]; a]; Table[f[i], {i, 2, 100}]
(* Second program: *)
a[n_] := If[n == 1, 0, FixedPoint[Total[FactorInteger[#][[All, 1]]]&, n]];
Array[a, 100] (* Jean-François Alcover, Apr 01 2020 *)
PROG
(Python)
from sympy import primefactors
def a(n, pn):
if n == pn:
return n
else:
return a(sum(primefactors(n)), n)
print([a(i, None) for i in range(1, 100)]) # Gleb Ivanov, Nov 05 2021
(PARI) fp(n, pn) = if (n == pn, n, fp(vecsum(factor(n)[, 1]), n));
a(n) = if (n==1, 0, fp(n, 0)); \\ Michel Marcus, Sep 02 2023
CROSSREFS
Cf. A008472 (sum of prime divisors of n), A029908.
Sequence in context: A095402 A086294 A361632 * A361630 A323171 A008472
KEYWORD
nonn,look
AUTHOR
Joseph L. Pe, Oct 15 2002
EXTENSIONS
Better description from Labos Elemer, Apr 09 2003
Name clarified by Michel Marcus, Sep 02 2023
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 April 23 10:29 EDT 2024. Contains 371905 sequences. (Running on oeis4.)