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.

A167392 Characteristic function of partition numbers.

This page as a plain text file.
%I A167392 #17 Mar 03 2019 03:44:30
%S A167392 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 A167392 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 A167392 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 A167392 Characteristic function of partition numbers.
%H A167392 Reinhard Zumkeller, <a href="/A167392/b167392.txt">Table of n, a(n) for n = 0..10000</a>
%H A167392 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%F A167392 a(A000041(n)) = 1; a(A167376(n)) = 0.
%t A167392 nmax = 14;
%t A167392 (* nmax=14 gives P(nmax)+1 = 136 terms; nmax=33 gives 10144 terms *)
%t A167392 PP = Table[PartitionsP[n], {n, 0, nmax}];
%t A167392 a[n_] := Boole[MemberQ[PP, n]];
%t A167392 Table[a[n], {n, 0, PartitionsP[nmax]}] (* _Jean-François Alcover_, Mar 02 2019 *)
%o A167392 (PARI) a(n) = {k=0; while ((pk=numbpart(k)) != n, if (pk > n, return(0)); k++); return (1);} \\ _Michel Marcus_, Nov 03 2015
%o A167392 (Haskell)
%o A167392 import Data.List.Ordered (member)
%o A167392 a167392 = fromEnum . flip member a000041_list
%o A167392 -- _Reinhard Zumkeller_, Nov 03 2015
%Y A167392 Cf. A167393.
%Y A167392 For n >= 1, column 1 of A186114, also right border of A193870. - _Omar E. Pol_, Aug 14 2011
%K A167392 nonn
%O A167392 0,1
%A A167392 _Reinhard Zumkeller_, Nov 03 2009