login
Characteristic function of pseudoperfect (or semiperfect) numbers.
7

%I #9 Jul 13 2013 12:04:24

%S 0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,1,0,0,0,1,0,1,0,0,0,0,

%T 0,1,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,1,0,0,

%U 0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,1,0,0

%N Characteristic function of pseudoperfect (or semiperfect) numbers.

%C a(A005835(n)) = 1 and a(A136447(n)) = 0.

%H Reinhard Zumkeller, <a href="/A210455/b210455.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SemiperfectNumber.html">Semiperfect Number</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Semiperfect_number">Semiperfect number</a>

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

%o (Haskell)

%o a210455 n = fromEnum $ p (a027751_row n) n where

%o p ks m = m == 0 || not (null ks) && head ks <= m &&

%o (p (tail ks) (m - head ks) || p (tail ks) m)

%Y Cf. A027751.

%K nonn

%O 1

%A _Reinhard Zumkeller_, Jan 21 2013