OFFSET
1,2
COMMENTS
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
221=11011101 in base 2, prime(221)=1381=10101100101 in base 2, both have 6 "1's" in their binary representation, hence 221 is in the sequence.
MATHEMATICA
Select[Range[400], DigitCount[#, 2, 1]==DigitCount[Prime[#], 2, 1]&] (* Harvey P. Dale, Mar 09 2015 *)
PROG
(PARI) for(n=1, 1000, s=1; if(sum(i=1, length(binary(n)), component(binary(n), i))==sum(i=1, length(binary(prime(n))), component(binary(prime(n)), i)), print1(n, ", ")))
(PARI) is(n)=hammingweight(n)==hammingweight(prime(n)) \\ Charles R Greathouse IV, Mar 07 2013
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Benoit Cloitre, Jun 01 2002
STATUS
approved