A208982 Numbers n such that the next larger number with mutual Hamming distance 1 is prime.
1, 2, 3, 4, 5, 6, 9, 10, 12, 15, 16, 17, 18, 19, 21, 22, 23, 27, 28, 29, 30, 36, 39, 40, 41, 42, 43, 45, 46, 52, 57, 58, 60, 63, 65, 66, 67, 69, 70, 71, 72, 75, 77, 78, 81, 82, 88, 95, 96, 99, 100, 101, 102, 105, 106, 108, 111, 112, 119, 123, 125, 126, 129, 130, 136, 137, 138, 147, 148, 149, 150
Offset: 1
Crossrefs
Programs
-
PARI
isok(n) = my(nextn = n+1); while (hammingweight(bitxor(n, nextn)) != 1, nextn++); isprime(nextn); \\ Michel Marcus, Jul 01 2014
Comments