OFFSET
1,1
COMMENTS
The prime number maze is a maze of prime numbers where two primes are connected if and only if their base 2 representations differ in just one bit.
LINKS
Michael I. Hartley, Partitions in the prime number maze, Acta Arithmetica 105 (2002), 227-238.
W. Paulsen, The Prime Maze, Fib. Quart., 40 (2002), 272-279.
MATHEMATICA
f[ n_ ] := Block[ {d = Reverse[ IntegerDigits[ n, 2 ] ], l = s = 0, k = 1}, l = Length[ d ]; While[ k < l + 1, s = s - (-1)^k*d[ [ k ] ]; k++ ]; Return[ s ] ]; Select[ Range[ 5, 40000, 2 ], PrimeQ[ # ] && EvenQ[ Count[ IntegerDigits[ #, 2 ], 1 ] ] != OddQ[ Mod[ #, 3 ] ] && (f[ # ] > 2 || f[ # ] < 1) & ]
CROSSREFS
KEYWORD
base,nonn,changed
AUTHOR
William Paulsen (wpaulsen(AT)csm.astate.edu), Nov 13 2001
EXTENSIONS
More terms from Robert G. Wilson v, Dec 15 2001
STATUS
approved