cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A359735 Let f(s,n) = 2^n + s*n, with s in {-1, 1}. Let c be the number of primes out of the pair f(-1,n), f(1,n). If only f(-1,n) is prime, a(n) = -1, otherwise a(n) = c.

This page as a plain text file.
%I A359735 #43 Jan 18 2025 16:33:52
%S A359735 0,1,-1,2,0,1,0,0,0,2,0,0,0,-1,0,1,0,0,0,-1,0,-1,0,0,0,0,0,0,0,0,0,0,
%T A359735 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,
%U A359735 0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0
%N A359735 Let f(s,n) = 2^n + s*n, with s in {-1, 1}. Let c be the number of primes out of the pair f(-1,n), f(1,n). If only f(-1,n) is prime, a(n) = -1, otherwise a(n) = c.
%H A359735 Antti Karttunen, <a href="/A359735/b359735.txt">Table of n, a(n) for n = 0..10000</a>
%F A359735 a(n) can be = 2 only if n = 6*m + 3 for m >= 0 and m is not congruent to {0, 4} mod 5, not congruent to {2, 4} mod 7, not congruent to {6, 7} mod 11 and not congruent to {3, 9} mod 13. Does a(n) = 2 for n > 9 exist? - _Thomas Scheuerle_, Jan 12 2023
%e A359735 f(-1,1) = 2^1 - 1 = 1, is not prime and f(1,1) = 2^1 + 1 = 3 is prime, so a(1) = 1.
%e A359735 f(-1,2) = 2^2 - 2 = 2, is prime and f(1,2) = 2^2 + 2 = 6 = 2 * 3 is not prime, so a(2) = -1.
%e A359735 f(-1,3) = 2^3 - 3 = 5, is prime and f(1,3) = 2^3 + 3 = 11 is prime, so a(3) = 2.
%o A359735 (PARI) f(s,n)=2^n+s*n
%o A359735 a(n)=my(a=isprime(f(-1,n)),b=isprime(f(1,n)),c=a+b); if(c==1&&a==1,return(-1),return(c))
%Y A359735 Cf. A006127, A048744, A052007, A129962.
%K A359735 sign
%O A359735 0,4
%A A359735 _Jean-Marc Rebert_, Jan 12 2023