|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
LINKS
|
|
|
FORMULA
|
|
|
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]];
|
|
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|