%I #28 Apr 27 2026 22:20:46
%S 2,17,37,521,101,1741,197,257,5851,401,245389,577,677,17847761,27031,
%T 32801,1337527,1297,79291523,1601,74131,85229,20493114628643,110641,
%U 1992984693875051,1028459361541,2917,3137,656555303,216061,242173,1090523201,4357,319057
%N a(n) is the smallest prime in the form of ((2n)^m - 1)/(2n - 1) - (2n)^(k - 1), where k < m are both positive integers.
%C For some numbers 2n, there is no prime number of the form of 1 + 2n + (2n)^2 + ... + (2n)^m. The smallest ones are 32, 64, 92, ...
%C However, it seems when one term is taken off from the sum, there always exists prime terms for a finite pair of (m, k) in the form of 1 + 2n + (2n)^2 +...+ (2n)^(k - 2) + ... (2n)^k +...+ (2n)^m.
%C This sequence lists the smallest such prime numbers for each n.
%C It is checked up to n = 50000 without exception.
%C a(50000) = 10000100001000010000100001000010000100001000010000000001, for (m, k) = (12, 2) = 111111111101 base 100000.
%C This is also the smallest prime in base 2n (cf. A390983) in the form 1..0..1, or smallest near unit digit primes base 2n.
%e When n = 1, 2n = 2, (2^2 - 1)/(2 - 1) - 2^(1 - 1) = 2 is prime, where m = 2, k = 1. So a(1) = 2 = 10 base 2.
%e When n = 2, 2n = 4, if m = 2, (4^2 - 1)/(4 - 1) = 5, 5 - 4^(1 - 1) = 4 is not prime;
%e for m = 3, (4^3 - 1)/(4 - 1) = 21, 21 - 4^(2 - 1) = 17 is prime, so (m, k) = (3, 2) makes a(2) = 17 = 101 base 4.
%e ...
%e When n = 4, 2n = 8, if m = 2, (8^2 - 1)/(8 - 1) = 9, 9 - 8^(1 - 1) = 8 is not prime;
%e for m = 3, (8^3 - 1)/(8 - 1) = 73, 73 - 8^(2 - 1) = 65 is not prime;
%e for m = 4, (8^4 - 1)/(8 - 1) = 585, 585 - 8^(3 - 1) = 521 is prime, so (m, k) = (4, 3) makes a(4) = 521 = 1011 base 8.
%e ...
%e When n = 11, 2n = 22, in the same way to check, it is found that (m, k) = (5, 2) makes a(11) = 245389 = (22^5 - 1)/(22 - 1) - 22^(2 - 1) = 11101 base 22.
%t Table[m = 1; ct = 0; While[q = 0; Do[q = q + (2*n)^i, {i, 0, m}]; Do[p = q - (2*n)^i; If[PrimeQ[p], ct++; p0 = p], {i, 0, m - 1}]; ct == 0, m++]; p0, {n, 1, 34}]
%Y Cf. A390983.
%K nonn,easy
%O 1,1
%A _Lei Zhou_, Apr 22 2026