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.

A098855 Numbers k such that 4^k + 2^k - 1 is prime.

This page as a plain text file.
%I A098855 #34 Aug 09 2025 20:26:35
%S A098855 1,2,3,4,6,10,16,24,26,35,52,55,95,144,379,484,939,1284,1300,2651,
%T A098855 3644,3979,7179,8304,14840,32040,38906,47759,51371,52484,54016,57279
%N A098855 Numbers k such that 4^k + 2^k - 1 is prime.
%C A098855 Or, numbers k such that (2^k+1)*2^k - 1 is prime.
%H A098855 F. Firoozbakht and 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 A098855 A110082(n) = 2^(a(n)-1)*(4^a(n)+2^a(n)-1).
%e A098855 1300 is in the sequence because 4^1300+2^1300-1 is prime.
%e A098855 4^1+2^1-1 = 5 prime so a(1)=1.
%e A098855 4^2+2^2-1 = 19 prime so a(2)=2.
%e A098855 4^3+2^3-1 = 71 prime so a(3)=3.
%e A098855 4^4+2^4-1 = 271 prime so a(4)=4.
%t A098855 Do[If[PrimeQ[4^m+2^m-1], Print[m]], {m, 8000}] (* _Farideh Firoozbakht_, Aug 03 2005 *)
%o A098855 PFGW64 from primeform group and SCRIPTIFY
%o A098855 Command : PFGW64 -f in.txt
%o A098855 in.txt file :
%o A098855 SCRIPT
%o A098855 DIM nn,0
%o A098855 DIMS tt
%o A098855 OPENFILEOUT myfile,a(n).txt
%o A098855 LABEL loopn
%o A098855 SET nn,nn+1
%o A098855 SETS tt,%d\,;nn
%o A098855 PRP 4^nn+2^nn-1,tt
%o A098855 IF ISPRP THEN GOTO a
%o A098855 IF ISPRIME THEN GOTO a
%o A098855 GOTO loopn
%o A098855 LABEL a
%o A098855 WRITE myfile,tt
%o A098855 GOTO loopn -- Pierre CAMI, May 10 2012
%o A098855 (PARI) is(n)=ispseudoprime(4^n+2^n-1) \\ _Charles R Greathouse IV_, Jun 13 2017
%Y A098855 Cf. A110079, A110082, A210733.
%K A098855 nonn,more,hard
%O A098855 1,2
%A A098855 _Pierre CAMI_, Oct 11 2004
%E A098855 Corrected by Torin Huzil (thuzil(AT)gmail.com), Sep 15 2005
%E A098855 More terms from _Pierre CAMI_, May 10 2012
%E A098855 a(27), a(29)-a(31) inserted by _Michael S. Branicky_, Jan 02 2025