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!)
A323153 a(n) = 1 if n is either a prime or a perfect number, 0 otherwise. 2

%I #9 Jan 09 2019 21:21:42

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

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

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

%N a(n) = 1 if n is either a prime or a perfect number, 0 otherwise.

%C Characteristic function of A053813.

%C Differs from A323152 at positions n = 1, 120, 672, 30240, 32760, ...

%H Antti Karttunen, <a href="/A323153/b323153.txt">Table of n, a(n) for n = 1..65537</a>

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

%o (PARI) A323153(n) = ((n>1)&&!(n%sumdiv(n,d,(d<n)*d)));

%Y Cf. A000040, A000396, A053813, A053814, A323152.

%K nonn

%O 1

%A _Antti Karttunen_, Jan 09 2019

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 July 21 06:08 EDT 2024. Contains 374463 sequences. (Running on oeis4.)