A140488 Trajectory of 5 under repeated application of the map: n -> n + second-smallest number that does not divide n.
5, 8, 13, 16, 21, 25, 28, 33, 37, 40, 46, 50, 54, 59, 62, 66, 71, 74, 78, 83, 86, 90, 97, 100, 106, 110, 114, 119, 122, 126, 131, 134, 138, 143, 146, 150, 157, 160, 166, 170, 174, 179, 182, 186, 191, 194, 198, 203, 206, 210, 218, 222, 227, 230, 234, 239, 242, 246
Offset: 1
Keywords
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
f:= proc(n) local k,c; c:= 0: for k from 2 do if n mod k <> 0 then if c = 1 then return n+k fi; c:= 1; fi od end proc: R:= 5: t:= 5: for count from 2 to 100 do t:= f(t); R:= R,t; od: R; # Robert Israel, Oct 19 2021
-
Mathematica
a = {5}; Do[AppendTo[a, a[[ -1]] + Select[Range[a[[ -1]]], Mod[a[[ -1]], # ] > 0 &][[2]]], {60}]; a (* Stefan Steinerberger, Jul 01 2008 *)
-
Python
def aupton(terms): alst = [5] while len(alst) < terms: an, k, smallest = alst[-1], 2, False while not smallest or an%k == 0: if not smallest and an%k != 0: smallest = True k += 1 alst.append(an+k) return alst print(aupton(58)) # Michael S. Branicky, Oct 19 2021
Formula
It appears that a(n+98) = a(n)+420 for n >= 9. - Robert Israel, Oct 19 2021
Extensions
Corrected and extended by Stefan Steinerberger, Jul 01 2008