login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A242902
a(n) = 1 if either of A014574(n) + A014574(n+2) +- 1 is prime or 0 otherwise.
2
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0
OFFSET
1
COMMENTS
From the first 10000 evaluations (each evaluating the primality of 2 values, though at least 2200 are obvious as multiples of 5), one encounters ~5200 primes. The longest "gap" without prime encounter is 13 evaluations. By design, the procedure encounters primes loosely on the order of twice as large as those used in each evaluation.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
A014574(2)=6 and A014574(4)=18. (18+6) +-1 yields 23, 25. 23 is prime, so a(2)=1.
A014574(12)=150 and A014574(14)=192, which yields 341, 343. Neither is prime, so a(12)=0.
PROG
(PARI) v=[0, 4, 6]; p=11; forprime(q=13, , if(q-p==2, v=[v[2], v[3], p+1]; print1(isprime(v[1]+v[3]+1)||isprime(v[1]+v[3]-1), ", ")); p=q) \\ Charles R Greathouse IV, May 25 2014
CROSSREFS
Cf. A014574.
Sequence in context: A123927 A089829 A294935 * A196368 A178788 A131217
KEYWORD
nonn
AUTHOR
Bill McEachen, May 25 2014
STATUS
approved