cp's OEIS Frontend

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.

A317241 Number of representations of n of the form 1 + p1 * (1 + p2* ... * (1 + p_j)...), where [p1, ..., p_j] is a (possibly empty) list of distinct primes.

This page as a plain text file.
%I A317241 #18 May 26 2019 16:15:19
%S A317241 1,0,1,1,0,1,0,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,0,1,2,0,0,0,2,1,0,1,0,1,
%T A317241 0,0,2,1,1,2,2,1,3,1,1,1,0,1,2,0,2,2,1,1,1,0,0,1,1,1,3,1,0,1,1,0,2,1,
%U A317241 1,1,2,1,1,1,1,1,2,0,1,1,0,0,1,1,2,1,2,2,2,1,3,1,1,1,0,0,2,1,1,1,1,1,2,1,1
%N A317241 Number of representations of n of the form 1 + p1 * (1 + p2* ... * (1 + p_j)...), where [p1, ..., p_j] is a (possibly empty) list of distinct primes.
%H A317241 Alois P. Heinz, <a href="/A317241/b317241.txt">Table of n, a(n) for n = 1..65536</a>
%F A317241 a(n) = 0 <=> n in { A317242 }.
%F A317241 a(n) <= A317240(n).
%e A317241 a(25) = 2: 1 + 2 * (1 + 11) = 1 + 3 * (1 + 7) = 25.
%e A317241 a(43) = 3: 1 + 2 * (1 + 5 * (1 + 3)) = 1 + 3 * (1 + 13) = 1 + 7 * (1 + 5) = 43.
%p A317241 b:= proc(n, s) option remember; `if`(n=1, 1,
%p A317241       add(b((n-1)/p, s union {p}), p=numtheory[factorset](n-1) minus s))
%p A317241     end:
%p A317241 a:= n-> b(n, {}):
%p A317241 seq(a(n), n=1..200);
%t A317241 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}]];
%t A317241 a[n_] := b[n, {}];
%t A317241 Array[a, 200] (* _Jean-François Alcover_, May 26 2019, after _Alois P. Heinz_ *)
%Y A317241 Cf. A317240, A317242, A317385.
%K A317241 nonn
%O A317241 1,25
%A A317241 _Alois P. Heinz_, Jul 24 2018