Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A137331
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A137331 a(n) = 1 if the binary weight of n is prime, otherwise 0. +0
1
0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1 (list; graph; listen)
OFFSET

0,1

FORMULA

a(n) = A010051(A000120(n)). - R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Apr 09 2008

EXAMPLE

a(0) = 0 (binary). Bits set = 0, 0 not prime -> 0.

a(1) = 1 (binary). Bits set = 1, 1 not prime -> 0.

a(2) = 10 (binary). Bits set = 1, 1 not prime -> 0.

a(3) = 11 (binary). Bits set = 2, 2 prime -> 1.

MAPLE

A000120 := proc(n) add(i, i=convert(n, base, 2)) ; end: A010051 := proc(n) if isprime(n) then 1 ; else 0 ; fi ; end: A137331 := proc(n) A010051(A000120(n)) ; end: seq(A137331(n), n=0..200) ; - R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Apr 09 2008

MATHEMATICA

Table[If[PrimeQ[Plus @@ IntegerDigits[n, 2]], 1, 0], {n, 0, 100}] - Stefan Steinerberger (stefan.steinerberger(AT)gmail.com), Apr 09 2008

CROSSREFS

Begins the same as A135136, but differs starting at a(31).

Adjacent sequences: A137328 A137329 A137330 this_sequence A137332 A137333 A137334

Sequence in context: A095792 A093385 A135136 this_sequence A093386 A011658 A135461

KEYWORD

nonn,easy

AUTHOR

George Pollard (porges(AT)porg.es), Apr 07 2008

EXTENSIONS

More terms from R. J. Mathar (mathar(AT)strw.leidenuniv.nl) and Stefan Steinerberger (stefan.steinerberger(AT)gmail.com), Apr 09 2008

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified October 11 13:47 EDT 2008. Contains 144830 sequences.


AT&T Labs Research