[go: up one dir, main page]

login
A167392
Characteristic function of partition numbers.
14
0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0
OFFSET
0,1
FORMULA
a(A000041(n)) = 1; a(A167376(n)) = 0.
MATHEMATICA
nmax = 14;
(* nmax=14 gives P(nmax)+1 = 136 terms; nmax=33 gives 10144 terms *)
PP = Table[PartitionsP[n], {n, 0, nmax}];
a[n_] := Boole[MemberQ[PP, n]];
Table[a[n], {n, 0, PartitionsP[nmax]}] (* Jean-François Alcover, Mar 02 2019 *)
PROG
(PARI) a(n) = {k=0; while ((pk=numbpart(k)) != n, if (pk > n, return(0)); k++); return (1); } \\ Michel Marcus, Nov 03 2015
(Haskell)
import Data.List.Ordered (member)
a167392 = fromEnum . flip member a000041_list
-- Reinhard Zumkeller, Nov 03 2015
CROSSREFS
Cf. A167393.
For n >= 1, column 1 of A186114, also right border of A193870. - Omar E. Pol, Aug 14 2011
Sequence in context: A159637 A095076 A285080 * A190201 A189702 A168395
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Nov 03 2009
STATUS
approved