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.

A205321 Smallest k>=0 such that (2^n+k)*2^n-1 and (2^n+k)*2^n+1 are a twin prime pair.

This page as a plain text file.
%I A205321 #10 Jul 20 2012 13:23:25
%S A205321 0,11,1,11,4,11,13,116,34,14,241,44,97,458,337,59,604,206,67,167,424,
%T A205321 179,97,326,259,284,1177,77,328,356,508,74,1798,749,2197,1289,643,839,
%U A205321 1171,1427,814,2564,31,4244,379,5099,3706,4871,2719,3194,7057,122,5329,2636,301,2852,3793
%N A205321 Smallest k>=0 such that (2^n+k)*2^n-1 and (2^n+k)*2^n+1 are a twin prime pair.
%C A205321 Conjecture : there is at least one k for each n.
%H A205321 Pierre CAMI, <a href="/A205321/b205321.txt">Table of n, a(n) for n = 1..825</a>
%F A205321 a(n) = A082466(2^n), n>1. - _R. J. Mathar_, Jul 20 2012
%p A205321 A205321 := proc(n)
%p A205321     local a,p ;
%p A205321     for a from 0 do
%p A205321          p := (2^n+a)*2^n-1 ;
%p A205321         if isprime(p) and isprime(p+2) then
%p A205321             return a;
%p A205321         end if;
%p A205321     end do:
%p A205321 end proc: # _R. J. Mathar_, Jul 18 2012
%o A205321 (PFGW64 and SCRIPTIFY)
%o A205321 SCRIPT
%o A205321 DIM nn,0
%o A205321 DIM kk
%o A205321 DIMS tt
%o A205321 OPENFILEOUT myfile,a(n).txt
%o A205321 LABEL loopn
%o A205321 SET nn,nn+1
%o A205321 IF nn>825 THEN END
%o A205321 SET kk,-1
%o A205321 LABEL loopk
%o A205321 SET kk,kk+1
%o A205321 SETS tt,%d,%d\,;nn;kk
%o A205321 PRP (2^nn+kk)*2^nn-1,tt
%o A205321 IF ISPRP THEN GOTO a
%o A205321 IF ISPRIME THEN GOTO a
%o A205321 GOTO loopk
%o A205321 LABEL a
%o A205321 PRP (2^nn+kk)*2^nn+1,tt
%o A205321 IF ISPRP THEN GOTO d
%o A205321 IF ISPRIME THEN GOTO d
%o A205321 GOTO loopk
%o A205321 LABEL d
%o A205321 WRITE myfile,tt
%o A205321 GOTO loopn
%o A205321 Results in a(n).txt file
%o A205321 all kk values such that (2^nn+kk)*2^nn-1 is prime in pfgw-primes.log and pfgw.log files
%Y A205321 Cf. A191617, A191618, A205322
%K A205321 nonn
%O A205321 1,2
%A A205321 _Pierre CAMI_, Jul 14 2012