OFFSET
1,2
COMMENTS
Number of terms of A278494 in range [n^2, (n+1)^2], where A278494 are primes p for which there does not exist any such integer k that k - A002828(k) = p.
In other words, number of primes p in range [n^2, (n+1)^2] for which (A002828(1+p) <> 1) and (A002828(2+p) <> 2) and (A002828(3+p) <> 3) and (A002828(4+p) <> 4).
Conjecture: a(n) > 0 for all n >= 1.
Similar guesses are easy to make but hard to prove. I also conjecture that A277487(n) > 0 for all n > 80, and that both A277486(n) > 0 and A277488(n) > 0 for all n > 7. If any of these claims were proved true, it would imply the proof of Legendre's conjecture as well. See also comments in A014085 and sequences A277888 & A278487.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
FORMULA
For all n >= 1, a(n) <= A014085(n).
PROG
(PARI)
istwo(n:int)=my(f); if(n<3, return(n>=0); ); f=factor(n>>valuation(n, 2)); for(i=1, #f[, 1], if(bitand(f[i, 2], 1)==1&&bitand(f[i, 1], 3)==3, return(0))); 1
isthree(n:int)=my(tmp=valuation(n, 2)); bitand(tmp, 1)||bitand(n>>tmp, 7)!=7
A002828(n)=if(issquare(n), !!n, if(istwo(n), 2, 4-isthree(n))) \\ From _Charles R Greathouse_ IV, Jul 19 2011
A278495(n) = { my(s = 0); for(k=(n^2), (n+1)^2, if((isprime(k) && (A002828(1+k) <> 1) && (A002828(2+k) <> 2) && (A002828(3+k) <> 3) && (A002828(4+k) <> 4)), s = s+1) ); s; };
for(n=1, 10000, write("b278495.txt", n, " ", A278495(n)));
(Scheme)
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 25 2016
STATUS
approved