login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A346408 Primes whose bitwise XOR of decimal digits is a prime. 1
2, 3, 5, 7, 13, 29, 31, 41, 43, 47, 61, 83, 103, 113, 131, 137, 139, 151, 157, 173, 193, 211, 223, 227, 233, 241, 263, 269, 277, 281, 311, 317, 337, 353, 367, 373, 379, 389, 397, 401, 409, 421, 443, 461, 467, 487, 557, 571, 577, 599, 601, 641, 647, 673, 683 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Table of n, a(n) for n=1..55.

Wikipedia, Bitwise operation

EXAMPLE

421 is a term because it is a prime whose bitwise XOR of digits is 7 which is also a prime.

MAPLE

b:= l-> `if`(l=[], 0, Bits[Xor](l[1], b(subsop(1=[][], l)))):

q:= n-> isprime(b(convert(n, base, 10))):

select(q, [ithprime(i)$i=1..160])[];  # Alois P. Heinz, Jul 21 2021

MATHEMATICA

Select[Range[1000], PrimeQ[#] && PrimeQ[BitXor @@ IntegerDigits[#]] &] (* Amiram Eldar, Jul 21 2021 *)

PROG

(Sage)

def XOR(a, b):

    return a ^^ b

[n for n in (0..100) if (n in Primes() and reduce(XOR, map(lambda x: int(x), str(n))) in Primes())]

CROSSREFS

Cf. A000040, A346511 (XOR of digits of n).

Sequence in context: A114741 A096177 A075238 * A158281 A115261 A063792

Adjacent sequences:  A346405 A346406 A346407 * A346409 A346410 A346411

KEYWORD

base,nonn,less

AUTHOR

Jeremias M. Gomes, Jul 21 2021

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 20 16:50 EDT 2021. Contains 347586 sequences. (Running on oeis4.)