OFFSET
1,7
COMMENTS
Conjecture: a(n) > 0 for all n > 4.
In contrast, R. Crocker proved that there are infinitely many positive odd integers not of the form p + 2^k + 2^m, where p is a prime, and k and m are positive integers.
Qing-Hu Hou has checked the conjecture for n up to 10^7, and found one counterexample: n = 1897048.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
R. Crocker, On the sum of a prime and two powers of two, Pacific J. Math. 36(1971), 103-107.
Z.-W. Sun and M.-H. Le, Integers not of the form c*(2^a + 2^b) + p^{alpha}, Acta Arith. 99(2001), 183-190.
EXAMPLE
a(7) = 2 since 7 = 3 - pi(3) + 2 + 2^2 = 7 - pi(7) + 2 + 2, with 3 and 7 odd primes.
a(8) = 1 since 8 = 5 - pi(5) + 2 + 2^2 with 5 an odd prime.
MATHEMATICA
a[n_]:=Sum[If[n==Prime[k]-k+2^i+2^j, 1, 0], {k, 2, PrimePi[2n]}, {j, 1, Log[2, n]}, {i, 1, j}]
Table[a[n], {n, 1, 100}]
PROG
(PARI) a(n)=my(s, ppi=1); forprime(p=3, , if(p-ppi++>n-4, return(s)); if((n-p+ppi)%2==0 && hammingweight(n-p+ppi)<3, s++)) \\ Charles R Greathouse IV, Nov 27 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Nov 25 2013
STATUS
approved