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.
%I A264097 #15 Jan 11 2016 21:51:26 %S A264097 3,3,3,3,3,15,3,3,27,45,15,3,87,9,15,9,45,15,3,51,57,9,33,69,39,57,57, %T A264097 21,27,45,213,15,57,147,3,33,45,21,3,63,117,15,33,3,57,165,33,213,117, %U A264097 69,87,21,183,147,45,3,33,51,111,45,93,69,57,9,3,99,63 %N A264097 Smallest odd number k divisible by 3 such that k*2^n-1 is a prime. %C A264097 As N increases, (Sum_{n=1..N} a(n))/(Sum_{n=1..N} n) appears to tend to 2*log(2), as can be seen by plotting the first 31000 terms. %C A264097 This observation is consistent with the prime number theorem as the probability that k*2^n-1 is prime where k is a multiple of 3 is 1/(2*(n*log(2)+log(k))) ~ 1/(2*n*log(2)). %H A264097 Pierre CAMI, <a href="/A264097/b264097.txt">Table of n, a(n) for n = 0..31000</a> %e A264097 3*2^0-1=2 prime so a(0)=3. %e A264097 3*2^1-1=5 prime so a(1)=3. %e A264097 3*2^2-1=11 prime so a(2)=3. %e A264097 3*2^3-1=23 prime so a(3)=3. %t A264097 Table[k = 3; While[! PrimeQ[k 2^n - 1], k += 6]; k, {n, 0, 68}] (* _Michael De Vlieger_, Nov 03 2015 *) %o A264097 (PFGW & SCRIPT) %o A264097 Command: pfgw64 -f -e500000 in.txt %o A264097 in.txt SCRIPT FILE: %o A264097 SCRIPT %o A264097 DIM k %o A264097 DIM n,0 %o A264097 DIMS t %o A264097 OPENFILEOUT myf,a(n).txt %o A264097 LABEL loop1 %o A264097 SET n,n+1 %o A264097 SET k,-3 %o A264097 LABEL loop2 %o A264097 SET k,k+6 %o A264097 SETS t,%d,%d\,;n;k %o A264097 PRP k*2^n-1,t %o A264097 IF ISPRP THEN WRITE myf,t %o A264097 IF ISPRP THEN GOTO loop1 %o A264097 GOTO loop2 %o A264097 (PARI) a(n) = {k = 3; while (!isprime(k*2^n-1), k += 6); k;} \\ _Michel Marcus_, Nov 03 2015 %Y A264097 Cf. A256787, A085427, A126717. %K A264097 nonn %O A264097 0,1 %A A264097 _Pierre CAMI_, Nov 03 2015