%I #26 Jun 13 2017 16:37:05
%S 1,2,3,4,6,10,16,24,26,35,52,55,95,144,379,484,939,1284,1300,2651,
%T 3644,3979,7179,8304,14840,32040,47759,57279
%N Numbers n such that 4^n + 2^n - 1 is prime.
%C Or, numbers n such that (2^n+1)*2^n-1 is prime.
%H F. Firoozbakht, M. F. Hasler, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL13/Hasler/hasler2.html">Variations on Euclid's formula for Perfect Numbers</a>, JIS 13 (2010) #10.3.1
%F A110082(n)=2^(a(n)-1)*(4^a(n)+2^a(n)-1).
%e 1300 is in the sequence because 4^1300+2^1300-1 is prime.
%e 4^1+2^1-1 = 5 prime so a(1)=1.
%e 4^2+2^2-1 = 19 prime so a(2)=2.
%e 4^3+2^3-1 = 71 prime so a(3)=3.
%e 4^4+2^4-1 = 271 prime so a(4)=4.
%t Do[If[PrimeQ[4^m+2^m-1], Print[m]], {m, 8000}] - _Farideh Firoozbakht_, Aug 03 2005
%o PFGW64 from primeform group and SCRIPTIFY
%o Command : PFGW64 -f in.txt
%o in.txt file :
%o SCRIPT
%o DIM nn,0
%o DIMS tt
%o OPENFILEOUT myfile,a(n).txt
%o LABEL loopn
%o SET nn,nn+1
%o SETS tt,%d\,;nn
%o PRP 4^nn+2^nn-1,tt
%o IF ISPRP THEN GOTO a
%o IF ISPRIME THEN GOTO a
%o GOTO loopn
%o LABEL a
%o WRITE myfile,tt
%o GOTO loopn -- Pierre CAMI, May 10 2012
%o (PARI) is(n)=ispseudoprime(4^n+2^n-1) \\ _Charles R Greathouse IV_, Jun 13 2017
%Y Cf. A110079, A110082, A210733.
%K nonn
%O 1,2
%A _Pierre CAMI_, Oct 11 2004
%E Corrected by Torin Huzil (thuzil(AT)gmail.com), Sep 15 2005
%E More terms from Pierre CAMI, May 10 2012