A140595 A140485 read by columns.
1, 2, 3, 4, 5, 6, 7, 9, 8, 11, 10, 13, 14, 12, 15, 16, 18, 19, 17, 21, 23, 22, 20, 25, 26, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37
Offset: 0
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
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
a = {5}; Do[AppendTo[a, a[[ -1]] + Select[Range[a[[ -1]]], Mod[a[[ -1]], # ] > 0 &][[2]]], {60}]; a (* Stefan Steinerberger, Jul 01 2008 *)
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
a = {3, 7}; Do[AppendTo[a, a[[ -1]] + Select[Range[a[[ -1]]], Mod[a[[ -1]], # ] > 0 &][[2]]], {60}]; a (* Stefan Steinerberger, Jul 01 2008 *)
f:= proc(n) local k,count; count:= 0; for k from 2 do if n mod k <> 0 then count:= count+1; if count = 3 then return n+k fi fi od end proc: R:= 1: x:= 1: for i from 1 to 100 do x:= f(x); R:= R, x od: R; # Robert Israel, Jan 17 2023
NestList[#+Complement[Range[#+50],Divisors[#]][[3]]&,1,60] (* Harvey P. Dale, Apr 21 2022 *)
third(n) = {my(nb = 0, k = 1); while (nb != 3, if (n % k, nb++); if (nb != 3, k++);); k;} f(n) = n + third(n); lista1(nn) = {a = 1; print1(a, ", "); for (n=2, nn, newa = f(a); print1(newa, ", "); a = f(a););} \\ Michel Marcus, Oct 04 2018
NestList[Complement[Range[3+#],Divisors[#]][[3]]+#&,2,60] (* Harvey P. Dale, Jan 15 2024 *)
third(n) = {my(nb = 0, k = 1); while (nb != 3, if (n % k, nb++); if (nb != 3, k++);); k;} f(n) = n + third(n); lista2(nn) = {a = 2; print1(a, ", "); for (n=2, nn, newa = f(a); print1(newa, ", "); a = f(a););} \\ Michel Marcus, Oct 04 2018
NestList[Complement[Range[#+10],Divisors[#]][[3]]+#&,4,60] (* Harvey P. Dale, Aug 28 2023 *)
third(n) = {my(nb = 0, k = 1); while (nb != 3, if (n % k, nb++); if (nb != 3, k++);); k;} f(n) = n + third(n); lista4(nn) = {a = 4; print1(a, ", "); for (n=2, nn, newa = f(a); print1(newa, ", "); a = f(a););} \\ Michel Marcus, Oct 04 2018
Join[{3},NestList[#+Complement[Range[#],Divisors[#]][[3]]&,8,50]] (* Harvey P. Dale, Apr 04 2015 *)
third(n) = {my(nb = 0, k = 1); while (nb != 3, if (n % k, nb++); if (nb != 3, k++);); k;} f(n) = n + third(n); lista3(nn) = {a = 3; print1(a, ", "); for (n=2, nn, newa = f(a); print1(newa, ", "); a = f(a););} \\ Michel Marcus, Oct 04 2018
Comments