A simple (summertime?!) arithmetic Le Monde mathematical puzzle
- A “powerful integer” is such that all its prime divisors are at least with multiplicity 2. Are there two powerful integers in a row, i.e. such that both n and n+1 are powerful?
- Are there odd integers n such that n² – 1 is a powerful integer ?
The first question can be solved by brute force. Here is a R code that leads to the solution:
isperfz 1)} lesperf=NULL for (t in 4:1e5) if (isperfz(t)) lesperf=c(lesperf,t) twinz=lesperf[diff(lesperf)==1]
with solutions 8, 288, 675, 9800, 12167.
The second puzzle means rerunning the code only on integers n²-1…
 8  288  675  9800  235224  332928  1825200  11309768
R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more…
From:: R News