OFFSET
1,1
COMMENTS
Thomas Ordowski (private communication) observes that a(n) appears to be composite whenever n is composite. Is there any prime a(n) for composite n ?
Conjecture: for n > 2, a(n) is prime if and only if n is in A000043. Note that a(n) = 2^n - 1 if and only if n is an odd prime or pseudoprime to base 2 (A001567), so a counterexample cannot be a Fermat pseudoprime to base 2. - Thomas Ordowski, Oct 14 2018
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = 2^(n-1) + n*floor(2^(n-1)/n). (Due to Thomas Ordowski).
For k >= 0, a(2^k) = 2^(2^k) = A001146(k). For n > 1, a(prime(n)) = 2^prime(n) - 1 = A001348(n). If p is an odd prime, then a(2p) = 4^p - 2. - Thomas Ordowski, Oct 14 2018
MATHEMATICA
Table[2^n-PowerMod[2, n-1, n], {n, 40}] (* Harvey P. Dale, Jun 08 2024 *)
PROG
(PARI) A320465(n)=2^n-2^(n-1)%n
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Oct 13 2018
STATUS
approved