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!)
A171008 Write the n-th prime in binary and change all 0's to 1's and all 1's to 0's. 2
1, 0, 10, 0, 100, 10, 1110, 1100, 1000, 10, 0, 11010, 10110, 10100, 10000, 1010, 100, 10, 111100, 111000, 110110, 110000, 101100, 100110, 11110, 11010, 11000, 10100, 10010, 1110, 0, 1111100, 1110110, 1110100, 1101010, 1101000, 1100010, 1011100 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
MAPLE
A171008 := proc(n) local p2 ; p2 := convert(ithprime(n), base, 2) ; add( (1-op(i, p2)) *10^(i-1), i=1..nops(p2)) ; end proc: seq(A171008(n), n=1..80) ; # R. J. Mathar, Sep 04 2010
MATHEMATICA
FromDigits/@(IntegerDigits[#, 2]&/@Prime[Range[40]]/.{0->1, 1->0}) (* Harvey P. Dale, Aug 19 2017 *)
PROG
(PARI) a(n)=my(v=binary(prime(n)), k=1/10); sum(i=0, #v-1, k*=10; (1-v[ #v-i])*k) \\ Charles R Greathouse IV, Sep 08 2010
CROSSREFS
See A145382 for the decimal equivalents.
Sequence in context: A286120 A286774 A285772 * A167320 A092916 A285780
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Sep 03 2010
EXTENSIONS
More terms from Charles R Greathouse IV and R. J. Mathar, Sep 04 2010
STATUS
approved

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 April 19 15:11 EDT 2024. Contains 371794 sequences. (Running on oeis4.)