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.

A214502 The size of the set of numbers k>=0 such that all (3^n+k)*2^n-1 are prime but only the last (largest) (3^n+k)*2^n+1 is also an associated twin prime.

This page as a plain text file.
%I A214502 #10 Jul 23 2012 19:44:21
%S A214502 1,3,2,5,16,2,2,18,2,8,8,10,14,9,5,43,15,1,56,13,5,151,7,20,107,3,30,
%T A214502 8,16,31,8,21,3,103,57,38,28,37,99,5,15,50,87,31,67,107,1,113,69,12,
%U A214502 41,19,23,43,150,100,49,76,3,159,48,86,49,81,62,48,118,66
%N A214502 The size of the set of numbers k>=0 such that all (3^n+k)*2^n-1 are prime but only the last (largest) (3^n+k)*2^n+1 is also an associated twin prime.
%C A214502 Starting at a count of zero, we consider for increasing k>=0 the pairs (3^n+k)*2^n+-1. If the smaller of these two numbers is prime, we increase the counter. If the larger of these two numbers is also prime, we admit the counter to the sequence. It is basically a measure of how many unsuccessful primality tests on the larger of the two numbers are done before it becomes a compatible twin prime.
%H A214502 Pierre CAMI, <a href="/A214502/b214502.txt">Table of n, a(n) for n = 1..500</a>
%o A214502 PFGW64 and SCRIPTIFY
%o A214502 SCRIPT
%o A214502 DIM nn, 0
%o A214502 DIM kk
%o A214502 DIM jj
%o A214502 DIMS tt
%o A214502 OPENFILEOUT myfile, b(n).txt
%o A214502 OPENFILEOUT myf, a(n).txt
%o A214502 LABEL loopn
%o A214502 SET nn, nn+1
%o A214502 SET jj, 0
%o A214502 IF nn>500 THEN END
%o A214502 SET kk, 0
%o A214502 LABEL loopk
%o A214502 SET kk, kk+1
%o A214502 SETS tt, %d, %d\,; nn; kk
%o A214502 PRP (3^nn+kk)*2^nn-1, tt
%o A214502 IF ISPRP THEN GOTO a
%o A214502 IF ISPRIME THEN GOTO a
%o A214502 GOTO loopk
%o A214502 LABEL a
%o A214502 SET jj, jj+1
%o A214502 PRP (3^nn+kk)*2^nn+1, tt
%o A214502 IF ISPRP THEN GOTO d
%o A214502 IF ISPRIME THEN GOTO d
%o A214502 GOTO loopk
%o A214502 LABEL d
%o A214502 WRITE myfile, tt
%o A214502 SETS tt, %d, %d\,; nn; jj
%o A214502 WRITE myf, tt
%o A214502 GOTO loopn
%Y A214502 Cf. A212037, A214497, A214498, A214501.
%K A214502 nonn
%O A214502 1,2
%A A214502 _Pierre CAMI_, Jul 20 2012