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 A181490 #37 Jan 21 2024 03:42:12 %S A181490 1,2,6,18 %N A181490 Numbers k such that 3*2^k-1 and 3*2^k+1 are twin primes (A001097). %C A181490 Sequences A181491 and A181492 list the corresponding primes. %C A181490 No more terms below three million. - _Charles R Greathouse IV_, Mar 14 2011 %C A181490 Intersection of A002235 and A002253. - _Jeppe Stig Nielsen_, Mar 05 2018 %F A181490 Equals { k | A007283(k) in A014574 } = { k | A153893(k) in A001359 }. %p A181490 a:=k->`if`(isprime(3*2^k-1) and isprime(3*2^k+1),k,NULL); seq(a(k),k=1..1000); # _Muniru A Asiru_, Mar 11 2018 %t A181490 fQ[n_] := PrimeQ[3*2^n - 1] && PrimeQ[3*2^n + 1]; k = 1; lst= {}; While[k < 15001, If[fQ@k, AppendTo[lst, k]; Print@k]; k++ ] (* _Robert G. Wilson v_, Nov 05 2010 *) %t A181490 Select[Range[20],AllTrue[3*2^#+{1,-1},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Sep 24 2014 *) %o A181490 (PARI) for( k=1,999, ispseudoprime(3<<k-1)||next; ispseudoprime(3<<k+1)&print(k)) %o A181490 (GAP) Filtered([1..300],k->IsPrime(3*2^k-1) and IsPrime(3*2^k+1)); # _Muniru A Asiru_, Mar 11 2018 %Y A181490 Cf. A001097, A001359, A002235, A002253, A006512, A014574, A294730. %K A181490 bref,hard,more,nonn %O A181490 1,2 %A A181490 _M. F. Hasler_, Oct 30 2010 %E A181490 Pari program repaired by _Charles R Greathouse IV_, Mar 14 2011