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!)
A256122 Number of iterations needed to reach 0 or 1 under the map n-> n-sopf(n), where sopf(n) is the sum of the distinct primes dividing n (A008472). 1
0, 1, 1, 2, 1, 1, 1, 2, 2, 2, 1, 2, 1, 2, 2, 3, 1, 2, 1, 2, 2, 3, 1, 2, 3, 2, 3, 2, 1, 3, 1, 4, 2, 3, 2, 2, 1, 2, 2, 3, 1, 4, 1, 2, 2, 3, 1, 2, 5, 2, 2, 2, 1, 6, 3, 2, 3, 4, 1, 3, 1, 2, 2, 3, 2, 3, 1, 6, 2, 3, 1, 2, 1, 3, 2, 4, 2, 4, 1, 2, 5, 3, 1, 3, 3, 2, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
EXAMPLE
a(16) = 3 because:
16 - sopf(16) = 16 - 2 = 14 (first iteration);
14 - sopf(14) = 14 - 9 = 5 (second iteration);
5 - sopf(5)= 5 - 5 = 0 (third iteration and reaching 0).
a(22) = 3 because:
22 - sopf(22) = 22 - 13 = 9 (first iteration);
9 - sopf(9) = 9 - 3 = 6 (second iteration);
6 - sopf(6)= 6 - 5 = 1 (third iteration and reaching 1).
MAPLE
A008472:= n -> add(d, d = select(isprime, numtheory[divisors](n))):
A:= proc(n)
a := 0 ;
x := n ;
while x>1 do
x := x-A008472(x) ;
a := a+1 ;
end do:
a ;
end proc:
seq(A(n), n=1..100);
MATHEMATICA
t[n_] := -1 + Length[NestWhileList[#-Total[Transpose[FactorInteger[#]][[1]]]&, n, #>1&]]; Table[t[n], {n, 100}]
CROSSREFS
Cf. A008472.
Sequence in context: A069010 A353332 A353362 * A087048 A109700 A087742
KEYWORD
nonn
AUTHOR
Michel Lagneau, Mar 15 2015
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 June 5 12:10 EDT 2024. Contains 373105 sequences. (Running on oeis4.)