Description Usage Arguments Value References Examples
View source: R/prime_parallelograms.R
Take a prime number, convert it to binary, reverse it, convert it back to decimal, and then substract it from the original prime number.
1  | prime_parallelograms(n, plot = FALSE)
 | 
n | 
 The upper limit of the region that is searched for primes.  | 
plot | 
 Logical. Should the parallelograms be plotted?  | 
A data frame with columns for the primes, the result of the binary reversal and substraction, and the indices of the primes.
This sequence in the On-Line Encyclopedia of Integer Sequences: A265326.
The Numberphile video featuring Neil Sloane and Brady Haran: Amazing Graphs (skip to 7:47).
1 2  | pp <- prime_parallelograms(10000)
plot(pp$i, pp$y, pch = 20, cex = 0.3)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.