OFFSET
1,2
COMMENTS
Numbers j such that 2^j - (2^j mod j) + 1 is prime.
The associated primes are 2^1+1, 2^2+1, 2^3-1, 2^4+1, 2^5-1, 2^6-3, 2^7-1, 2^8+1, 2^10-3, 2^12-3, 2^13-1, 2^14-3, 2^16+1, 2^17-1, 2^19-1, ...
Are there composite numbers h such that 2^h - (2^(h-1) mod h) is prime?
An odd prime p is in the sequence if and only if 2^p - 1 is prime. Also r = 2^t is a term if and only if 2^r + 1 is an odd prime. So these numbers give all Mersenne primes > 3 and all Fermat primes. Besides, they probably give infinitely many other primes; for example, all primes of the form 4^p - 3 with p prime: 2*p is in the sequence if and only if p is in A058253.
No Fermat pseudoprimes (odd and even) to base 2 in the sequence.
It seems that there are no odd prime powers p^s with s > 1 in the sequence.
MATHEMATICA
Select[Range[7000], PrimeQ[#*Floor[2^#/#] + 1] &] (* G. C. Greubel, Oct 09 2018 *)
PROG
(PARI) for(n=1, 1000, if(isprime(n * floor(2^n/n) + 1), print1(n, ", "))) \\ Amiram Eldar, Oct 09 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Thomas Ordowski, Oct 08 2018
EXTENSIONS
Three missing terms supplemented by Amiram Eldar, Oct 09 2018
a(47)-a(49) added by G. C. Greubel, Oct 09 2018
a(50)-a(61) added by Amiram Eldar, Oct 09 2018
STATUS
approved