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.

A239944 Smallest b > 0 making b^(2k) + b^k - 1 prime for k=1 through n.

This page as a plain text file.
%I A239944 #38 May 10 2014 10:02:12
%S A239944 2,2,2,2,460724,610357585,37748311920
%N A239944 Smallest b > 0 making b^(2k) + b^k - 1 prime for k=1 through n.
%C A239944 This sequence is a natural companion to A172994, which holds numbers b 'outperforming' 10 in this polynomial (relative to the sequence A096594). a(8) is known to exceed 4*10^12.
%C A239944 Note that a(n) exists for all n under Schinzel's hypothesis H. - _Charles R Greathouse IV_, Apr 24 2014
%e A239944 a(5)=460724 means that for no integer k from 2 through 460723 does it hold that k^2n + k^n - 1 is prime for all n from 1 through 5, but for k=460724 this prime simultaneity occurs.
%o A239944 (PARI) ok(b,n)=my(bk=1);for(k=1,n,bk*=b;if(!ispseudoprime(bk^2+bk-1),return(0)));b>0
%o A239944 a(n)=my(b=2); while(!is(b,n), b++); b \\ _Charles R Greathouse IV_, Apr 24 2014
%o A239944 (PARI) \\ Reasonably efficient code, using precomputed modulus tables to speed the searches.
%o A239944 diff(v)=vector(#v-1,i,v[i+1]-v[i])
%o A239944 ok(b,n)=my(bk=1);for(k=1,n,bk*=b;if(!ispseudoprime(bk^2+bk-1),return(0)));b>0
%o A239944 okMod(b,p,n)=for(k=1,n,my(m=Mod(b,p)^k);if(m^2+m==1,return(0)));1
%o A239944 lst(p,n)=select(b->okMod(b,p,n),[0..p-1])
%o A239944 makeU(lim,n)=my(v=[0],m=1,t);forprime(p=5,lim,t=lst(p);if(#t<p,my(V=vector(#v*#t),idx);for(i=1,#v,my(vim=Mod(v[i],m));for(j=1,#t,V[idx++]=lift(chinese(vim,Mod(t[j],p)))));v=V;m*=p));v=Set(v);diff(concat(v,m+v[1]))
%o A239944 a(n)=forstep(b=0,9e99,makeU(31,n),if(ok(b),return(b)))
%o A239944 \\ _Charles R Greathouse IV_, Apr 24 2014
%Y A239944 Cf. A096594, A172994.
%K A239944 nonn
%O A239944 1,1
%A A239944 _James G. Merickel_, Mar 31 2014