login
A232190
a(n) is the number of primes of the form 2^b + 2n +- 2^k +- 1 and 2^(b+2) - 2^b - 2n +- 2^k +- 1, where b is the length of the binary representation of 2n, and 0<k<=b.
1
5, 9, 7, 10, 11, 10, 10, 13, 14, 14, 15, 12, 13, 11, 12, 15, 18, 15, 15, 15, 17, 17, 18, 12, 15, 14, 14, 12, 16, 14, 13, 14, 16, 23, 20, 16, 18, 16, 17, 16, 17, 16, 16, 13, 17, 15, 15, 15, 20, 18, 20, 19, 17, 18, 18, 14, 15, 18, 18, 13, 17, 14, 15, 17, 17, 16
OFFSET
1,1
COMMENTS
Tested up to n = 1000000000, a(n)> 0.
If any zero terms exist, it is likely that the first one will appear in the interval [2*10^9, 2*10^10].
The terms of this sequence form a bell-shaped distribution with the commonest value of 21 when n is large enough. Up to the first 100 million terms, the range of a(n) is [3..55].
EXAMPLE
When n=1, 2n=2, b=2, the set of numbers of the form 2^b + 2n + 2^k + 1 is {9, 11}; form 2^b + 2n + 2^k - 1: {7, 9}; form 2^b + 2n - 2^k - 1: {1, 3}; form 2^b + 2n - 2^k + 1: {3, 5}; form 2^(b+2) - 2^b - 2n - 2^k - 1: {7, 5}; form 2^(b+2) - 2^b - 2n - 2^k + 1: {9, 7}; form 2^(b+2) - 2^b - 2n + 2^k + 1: {15, 13}; form 2^(b+2) - 2^b - 2n + 2^k - 1: {13, 11}. The union of the above sets is {1, 3, 5, 7, 9, 11, 13, 15}. Among the 8 numbers, 5 are primes. So a(1)=5.
When n=11, using the same rule, the candidate number set is {21, 23, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 105, 107}. Among these 32 numbers, 15 are prime: {23, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 107}. So a(11)=15.
MATHEMATICA
Table[n2 = 2*n; b = Ceiling[Log[2, n2 + 1]]; sdm = 2^b + n2 - 1;
sdp = 2^b + n2 + 1; cset = {}; Do[cpmp = sdm + 2^k; cpmm = sdm - 2^k; cppp = sdp + 2^k; cppm = sdp - 2^k; upl = 2^(b + 2); cset = Join[
cset, {cpmp, upl - cpmp, cpmm, upl - cpmm, cppp, upl - cppp, cppm,
upl - cppm}], {k, 1, b}]; cset = Union[cset];
size = Length[cset]; ct = 0;
Do[If[PrimeQ[cset[[j]]], ct++], {j, 1, size}]; ct, {n, 1, 66}]
CROSSREFS
Sequence in context: A219734 A077125 A233831 * A160050 A055566 A255247
KEYWORD
nonn
AUTHOR
Lei Zhou, Nov 20 2013
EXTENSIONS
Edited by Jon E. Schoenfield, Mar 28 2015
STATUS
approved