OFFSET
1,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..20000
FORMULA
A317241(a(n)) = 0.
MAPLE
q:= proc(n, s) option remember; is (n=1 or ormap(p->
q((n-1)/p, s union {p}), numtheory[factorset](n-1) minus s))
end:
a:= proc(n) option remember; local k; for k from
`if`(n=1, 2, 1+a(n-1)) while q(k, {}) do od; k
end:
seq(a(n), n=1..100);
MATHEMATICA
b[n_, s_] := b[n, s] = If[n == 1, 1, Sum[If[p == 1, 0, b[(n - 1)/p, s ~Union~ {p}]], {p, FactorInteger[n - 1][[All, 1]] ~Complement~ s}]];
Position[Array[b[#, {}]&, 10^5], 0] // Flatten (* Jean-François Alcover, Jul 14 2021, after Alois P. Heinz in A317241 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 24 2018
STATUS
approved