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.

A356074 a(n) is the first prime that starts a sequence of exactly n consecutive primes prime(k+1), ..., prime(k+n) where prime(k+i)+2^i is prime for i = 1...n but not for i = n+1.

This page as a plain text file.
%I A356074 #9 Aug 13 2022 15:52:43
%S A356074 3,11,17,5,37307,17387,87020177,1309757957
%N A356074 a(n) is the first prime that starts a sequence of exactly n consecutive primes prime(k+1), ..., prime(k+n) where prime(k+i)+2^i is prime for i = 1...n but not for i = n+1.
%e A356074 a(3) = 17 is a term because 17, 19, 23 and 29 are consecutive primes and 17 + 2^1 = 19, 19 + 2^2 = 23, and 23 + 2^3 = 31 are prime but 29 + 2^4 = 45 is not prime.
%p A356074 f:= proc(n) local P,T,i;
%p A356074   P:= [seq(ithprime(i),i=1..n+1)]:
%p A356074   T:= [seq(2^i,i=1..n+1)]:
%p A356074   do
%p A356074     if andmap(t -> isprime(P[t]+T[t]) = evalb(t <> n+1), [$1..n+1]) then return P[1] fi;
%p A356074     P:= [seq(P[i],i=2..n+1),nextprime(P[n+1])];
%p A356074   od;
%p A356074 end proc:
%p A356074 map(f, [$1..7]);
%K A356074 nonn,more
%O A356074 1,1
%A A356074 _J. M. Bergot_ and _Robert Israel_, Jul 31 2022