|
Search: id:A135543
|
|
|
| A135543 |
|
Record number of steps under iterations of "map n to n - (largest prime <= n)" (A064722) until reaching the limiting value 0 or 1. Also, places where A121561 reaches a new record. |
|
+0 1
|
| |
|
|
OFFSET
|
0,2
|
|
|
COMMENT
|
a(5) must be very large (>100000000). Can anyone extend the sequence?
|
|
FORMULA
|
Iterate n - (largest prime <= n) until reaching 0 or 1. Count the # of iterations required to reach 0 or 1 and determine if it is a new record.
|
|
EXAMPLE
|
a(4) = 1357323 because after iterating n - (largest prime <= n) we get:
1357323 - 1357201 = 122 =>
122 - 113 = 9 =>
9 - 7 = 2 =>
2 - 2 = 0,
which takes 4 steps.
|
|
MATHEMATICA
|
LrgstPrm[n_] := Block[{k = n}, While[ !PrimeQ@ k, k-- ]; k]; f[n_] := Block[{c = 0, d = n}, While[d > 1, d = d - LrgstPrm@d; c++ ]; c]; lst = {}; record = -1; Do[ a = f@n; If[a > record, record = a; AppendTo[lst, a]; Print@ n], {n, 100}] (* Robert G. Wilson v *)
|
|
CROSSREFS
|
Cf. A121559, A121560, A064722, A121561, A121560, A064722.
Sequence in context: A006126 A075538 A067965 this_sequence A088862 A062457 A067966
Adjacent sequences: A135540 A135541 A135542 this_sequence A135544 A135545 A135546
|
|
KEYWORD
|
hard,more,nonn
|
|
AUTHOR
|
Sergio Pimentel (ferdiego(AT)suddenlink.net), Feb 22 2008
|
|
|
Search completed in 0.002 seconds
|