cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A317744 Prime numbers which result as a concatenation of a decimal number and its binary representation.

Original entry on oeis.org

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

Views

Author

Philip Mizzi, Aug 05 2018

Keywords

Comments

The decimal number plus its Hamming weight A000120 must not be divisible by 3. - M. F. Hasler, Apr 05 2024

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    Select[Table[FromDigits[Join[IntegerDigits[n],IntegerDigits[n,2]]],{n,400}],PrimeQ] (* Harvey P. Dale, Jul 15 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
  • 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
    
Showing 1-1 of 1 results.