Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A135543
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
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
1, 2, 9, 122, 1357323 (list; graph; listen)
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.

Adjacent sequences: A135540 A135541 A135542 this_sequence A135544 A135545 A135546

Sequence in context: A006126 A075538 A067965 this_sequence A088862 A062457 A067966

KEYWORD

hard,more,nonn

AUTHOR

Sergio Pimentel (ferdiego(AT)suddenlink.net), Feb 22 2008

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified October 6 12:54 EDT 2008. Contains 144667 sequences.


AT&T Labs Research