OFFSET
0,2
COMMENTS
a(n) is the smallest divisor of A002378(n+2) not yet in the sequence.
The numbers that are smaller than the preceding terms are: 3, 5, 9, 17, 33, 44, 55, 65, 90, 99, 143, 208, ...
EXAMPLE
For n = 0, a(0) = 1 since 1 is the smallest divisor of 6 not yet in the sequence.
For n = 3, a(3) = 3 since 3 is the smallest divisor of 30 not yet in the sequence.
MATHEMATICA
s = {}; Do[d = Divisors[(n + 2)(n + 3)]; Do[d1 = d[[k]]; If[FreeQ[s, d1], AppendTo[s, d1]; Break[]], {k, Length[d]}], {n, 0, 100}]; s (* Amiram Eldar, Nov 14 2018 *)
PROG
(PARI) toadd(n, v) = {fordiv(n, d, if (!vecsearch(v, d), return(d)); ); }
lista(nn) = {v = []; for (n = 0, nn, newt = toadd((n+2)*(n+3), v); print1(newt, ", "); v = vecsort(concat(v, newt)); ); } \\ Michel Marcus, Nov 20 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Enrique Navarrete, Oct 19 2018
STATUS
approved