OFFSET
1,2
COMMENTS
Suggested by Eric Angelini.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(n+12) = a(n) + 60 for n >= 13. - Robert Israel, Jan 17 2023
MAPLE
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
MATHEMATICA
NestList[#+Complement[Range[#+50], Divisors[#]][[3]]&, 1, 60] (* Harvey P. Dale, Apr 21 2022 *)
PROG
(PARI) 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
CROSSREFS
KEYWORD
nonn
AUTHOR
Jacques Tramu, Jun 25 2008
EXTENSIONS
More terms from Michel Marcus, Oct 04 2018
STATUS
approved