A317242 Positive integers having no representation of the form 1 + p1 * (1 + p2* ... * (1 + p_j)...), where [p1, ..., p_j] is a (possibly empty) list of distinct primes.
2, 5, 7, 11, 15, 23, 26, 27, 28, 31, 33, 35, 36, 47, 50, 56, 57, 63, 66, 78, 81, 82, 95, 96, 106, 116, 119, 120, 122, 129, 136, 156, 162, 166, 167, 190, 193, 215, 218, 219, 227, 236, 244, 254, 263, 286, 289, 330, 335, 342, 352, 359, 387, 393, 395, 396, 414
Offset: 1
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..20000
Programs
-
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 *)
Formula
A317241(a(n)) = 0.