# Carol number

Given $n$, compute $4^{n}-2^{n+1}-1$ or $(2^{n}-1)^{2}-2$ or $(2^{2n}-1)-2^{n+1}$ or

 $\sum_{\begin{subarray}{c}i\neq n+1\\ i=0\end{subarray}}^{2n}2^{i}.$

Any of these formulas gives the Carol number for $n$. Regardless of how they’re computed, these numbers are almost repunits in binary, needing only the addition of $2^{n+1}$ to become so.

The first few Carol numbers are 7, 47, 223, 959, 3967, 16127, 65023, 261119, 1046527, 4190207, 16769023 (listed in A093112 of Sloane’s OEIS). Every third Carol number is divisible by 7, thus prime Carol numbers can’t have $n=3x+2$ (except of course for $n=2$. The largest Carol number known to be prime is $(2^{248949}-1)^{2}-2$, found by Japke Rosink using MultiSieve and OpenPFGW in March 2006.

Title Carol number CarolNumber 2013-03-22 16:13:10 2013-03-22 16:13:10 PrimeFan (13766) PrimeFan (13766) 5 PrimeFan (13766) Definition msc 11N05