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 A264098 #28 Feb 18 2016 03:51:40 %S A264098 3,3,9,15,3,3,9,3,15,15,9,3,33,9,81,21,9,3,27,27,33,27,45,45,33,27,15, %T A264098 33,45,3,39,81,9,75,81,3,15,15,81,27,3,9,9,15,189,27,27,15,105,27,75, %U A264098 93,51,177,57,27,75,99,27,45,105,105,9,27,9,3,9,237 %N A264098 Smallest odd number k divisible by 3 such that k*2^n + 1 is prime. %C A264098 As N increases, (Sum_{n=1..N} a(n))/(Sum_{n=1..N} n) appears to approach 2*log(2), as can be seen by plotting the first 31000 terms. %C A264098 This observation is consistent with the prime number theorem as the probability that k*2^n+1 is prime is 1/(n*log(2)+log(k))/2 for k multiple of 3 so ~ 1/(2*n*log(2)) as n increases, if k ~ 2*n*log(2) then k/(2*n*log(2)) ~ 1. %H A264098 Pierre CAMI, <a href="/A264098/b264098.txt">Table of n, a(n) for n = 1..31000</a> %e A264098 3*2^1 + 1 = 7 is prime so a(1) = 3. %e A264098 3*2^2 + 1 = 13 is prime so a(2) = 3. %e A264098 3*2^3 + 1 = 25 is composite; 9*2^3 + 1 = 73 is prime so a(3) = 9. %p A264098 for n from 1 to 100 do %p A264098 for k from 3 by 6 do %p A264098 if isprime(k*2^n+1) then %p A264098 A[n]:= k; break %p A264098 fi %p A264098 od %p A264098 od: %p A264098 seq(A[n],n=1..100); # _Robert Israel_, Jan 22 2016 %t A264098 Table[k = 3; While[! PrimeQ[k 2^n + 1], k += 6]; k, {n, 68}] (* _Michael De Vlieger_, Nov 03 2015 *) %o A264098 (PFGW & SCRIPT) %o A264098 Command: pfgw64 -f -e500000 in.txt %o A264098 in.txt SCRIPT FILE: %o A264098 SCRIPT %o A264098 DIM k %o A264098 DIM n, 0 %o A264098 DIMS t %o A264098 OPENFILEOUT myf, a(n).txt %o A264098 LABEL loop1 %o A264098 SET n, n+1 %o A264098 SET k, -3 %o A264098 LABEL loop2 %o A264098 SET k, k+6 %o A264098 SETS t, %d, %d\,; n; k %o A264098 PRP k*2^n+1, t %o A264098 IF ISPRP THEN WRITE myf, t %o A264098 IF ISPRP THEN GOTO loop1 %o A264098 GOTO loop2 %o A264098 (PARI) a(n) = {k = 3; while (!isprime(k*2^n+1), k += 6); k;} \\ _Michel Marcus_, Nov 03 2015 %Y A264098 Cf. A035050, A057778, A264097. %K A264098 nonn %O A264098 1,1 %A A264098 _Pierre CAMI_, Nov 03 2015