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!)
A140488 Trajectory of 5 under repeated application of the map: n -> n + second-smallest number that does not divide n. 8

%I #16 Oct 19 2021 20:16:56

%S 5,8,13,16,21,25,28,33,37,40,46,50,54,59,62,66,71,74,78,83,86,90,97,

%T 100,106,110,114,119,122,126,131,134,138,143,146,150,157,160,166,170,

%U 174,179,182,186,191,194,198,203,206,210,218,222,227,230,234,239,242,246

%N Trajectory of 5 under repeated application of the map: n -> n + second-smallest number that does not divide n.

%H Robert Israel, <a href="/A140488/b140488.txt">Table of n, a(n) for n = 1..10000</a>

%F It appears that a(n+98) = a(n)+420 for n >= 9. - _Robert Israel_, Oct 19 2021

%p f:= proc(n) local k,c;

%p c:= 0:

%p for k from 2 do

%p if n mod k <> 0 then

%p if c = 1 then return n+k fi;

%p c:= 1;

%p fi

%p od

%p end proc:

%p R:= 5: t:= 5:

%p for count from 2 to 100 do

%p t:= f(t);

%p R:= R,t;

%p od:

%p R; # _Robert Israel_, Oct 19 2021

%t a = {5}; Do[AppendTo[a, a[[ -1]] + Select[Range[a[[ -1]]], Mod[a[[ -1]], # ] > 0 &][[2]]], {60}]; a (* _Stefan Steinerberger_, Jul 01 2008 *)

%o (Python)

%o def aupton(terms):

%o alst = [5]

%o while len(alst) < terms:

%o an, k, smallest = alst[-1], 2, False

%o while not smallest or an%k == 0:

%o if not smallest and an%k != 0: smallest = True

%o k += 1

%o alst.append(an+k)

%o return alst

%o print(aupton(58)) # _Michael S. Branicky_, Oct 19 2021

%Y Cf. A140485, A140486, A140487, A140489.

%K nonn

%O 1,1

%A _Eric Angelini_, Jun 25 2008

%E Corrected and extended by _Stefan Steinerberger_, Jul 01 2008

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 August 18 15:26 EDT 2024. Contains 375269 sequences. (Running on oeis4.)