login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A167392 Characteristic function of partition numbers. 14

%I #17 Mar 03 2019 03:44:30

%S 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,

%T 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,

%U 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

%N Characteristic function of partition numbers.

%H Reinhard Zumkeller, <a href="/A167392/b167392.txt">Table of n, a(n) for n = 0..10000</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%F a(A000041(n)) = 1; a(A167376(n)) = 0.

%t nmax = 14;

%t (* nmax=14 gives P(nmax)+1 = 136 terms; nmax=33 gives 10144 terms *)

%t PP = Table[PartitionsP[n], {n, 0, nmax}];

%t a[n_] := Boole[MemberQ[PP, n]];

%t Table[a[n], {n, 0, PartitionsP[nmax]}] (* _Jean-François Alcover_, Mar 02 2019 *)

%o (PARI) a(n) = {k=0; while ((pk=numbpart(k)) != n, if (pk > n, return(0)); k++); return (1);} \\ _Michel Marcus_, Nov 03 2015

%o (Haskell)

%o import Data.List.Ordered (member)

%o a167392 = fromEnum . flip member a000041_list

%o -- _Reinhard Zumkeller_, Nov 03 2015

%Y Cf. A167393.

%Y For n >= 1, column 1 of A186114, also right border of A193870. - _Omar E. Pol_, Aug 14 2011

%K nonn

%O 0,1

%A _Reinhard Zumkeller_, Nov 03 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)