login
A317744
Prime numbers which result as a concatenation of a decimal number and its binary representation.
1
11, 311, 5101, 131101, 2511001, 37100101, 51110011, 59111011, 731001001, 931011101, 971100001, 1191110111, 12910000001, 13110000011, 13710001001, 15310011001, 17310101101, 19311000001, 21311010101, 21511010111, 24711110111, 25511111111, 319100111111
OFFSET
1,1
COMMENTS
The decimal number plus its Hamming weight A000120 must not be divisible by 3. - M. F. Hasler, Apr 05 2024
LINKS
EXAMPLE
11 is in the sequence because the binary representation of 1 is 1 and the concatenation of 1 and 1 gives 11, which is prime.
931011101 is in the sequence because it is the concatenation of 93 and 1011101 (the binary representation of 93) and is prime.
MATHEMATICA
Select[Table[FromDigits[Join[IntegerDigits[n], IntegerDigits[n, 2]]], {n, 400}], PrimeQ] (* Harvey P. Dale, Jul 15 2020 *)
PROG
(Python)
from sympy import isprime
def nbinn(n): return int(str(n)+bin(n)[2:])
def ok(n): return isprime(nbinn(n))
def aprefixupto(p): return [nbinn(k) for k in range(1, p+1, 2) if ok(k)]
print(aprefixupto(319)) # Michael S. Branicky, Dec 27 2020
(PARI) nb(n)=fromdigits(concat(n, binary(n)))
A317744_upto(N=666)=[p|n<-[1..N], is/*pseudo*/prime(p=nb(n))] \\ M. F. Hasler, Apr 05 2024
KEYWORD
nonn,base,less
AUTHOR
Philip Mizzi, Aug 05 2018
STATUS
approved