Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A133155
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A133155 Numbers formed by setting bits representing odd primes, where bit_no = (prime-1)/2. Setting bit number b is the same as OR-ing with 2^b (i.e. bit numbers start at zero). +0
1
2, 6, 14, 46, 110, 366, 878, 2926, 19310, 52078, 314222, 1362798, 3459950, 11848558, 78957422, 615828334, 1689570158, 10279504750, 44639243118, 113358719854, 663114533742, 2862137789294, 20454323833710, 301929300544366 (list; graph; listen)
OFFSET

1,1

FORMULA

a(n) = setbit(a(n-1),(p-1)/2) where p is n-th odd prime

EXAMPLE

a(3) = 14 because 3, 5, and 7 are odd primes so therefore bits 1, 2, and 3 are set and bit zero is not. 1110(base2) = 14(base10)

PROGRAM

#!/usr/bin/python import gmpy a = gmpy.mpz(0) i = 0 for p in range(3, 100, 2): if gmpy.is_prime(p): a = gmpy.setbit(a, (p-1)/2) i += 1 print i, a

CROSSREFS

Sequence in context: A004066 A123383 A122109 this_sequence A011455 A055691 A072171

Adjacent sequences: A133152 A133153 A133154 this_sequence A133156 A133157 A133158

KEYWORD

nonn

AUTHOR

Alan Griffiths (a1an_g(AT)yahoo.co.uk), Oct 08 2007

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 July 25 07:41 EDT 2008. Contains 142293 sequences.


AT&T Labs Research