OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
79, a prime, in binary is 1001111. This has two 0's and has five 1's. Since both two and five are primes, 79 is included in the sequence.
MAPLE
A080791 := proc(n) local i, dgs ; dgs := convert(n, base, 2) ; nops(dgs)-add(i, i=dgs) ; end: A000120 := proc(n) local i, dgs ; dgs := convert(n, base, 2) ; add(i, i=dgs) ; end: isA144214 := proc(n) local no0, no1 ; no0 := A080791(n) ; no1 := A000120(n) ; isprime(n) and isprime(no0) and isprime(no1) ; end: for n from 1 to 1200 do if isA144214(n) then printf("%d, ", n) ; fi; od: # R. J. Mathar, Sep 17 2008
MATHEMATICA
Select[Prime[Range[6! ]], PrimeQ[DigitCount[ #, 2, 0]]&&PrimeQ[DigitCount[ #, 2, 1]]&] (* Vladimir Joseph Stephan Orlovsky, Feb 16 2010 *)
PROG
(Python)
from sympy import isprime
def ok(n): return isprime(c:=n.bit_count()) and isprime(n.bit_length()-c) and isprime(n)
print([k for k in range(710) if ok(k)]) # Michael S. Branicky, Dec 27 2023
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Sep 14 2008
EXTENSIONS
More terms from R. J. Mathar, Sep 17 2008
STATUS
approved