login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A098855 Numbers n such that 4^n + 2^n - 1 is prime. 3
1, 2, 3, 4, 6, 10, 16, 24, 26, 35, 52, 55, 95, 144, 379, 484, 939, 1284, 1300, 2651, 3644, 3979, 7179, 8304, 14840, 32040, 47759, 57279 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Or, numbers n such that (2^n+1)*2^n-1 is prime.
LINKS
F. Firoozbakht, M. F. Hasler, Variations on Euclid's formula for Perfect Numbers, JIS 13 (2010) #10.3.1
FORMULA
A110082(n)=2^(a(n)-1)*(4^a(n)+2^a(n)-1).
EXAMPLE
1300 is in the sequence because 4^1300+2^1300-1 is prime.
4^1+2^1-1 = 5 prime so a(1)=1.
4^2+2^2-1 = 19 prime so a(2)=2.
4^3+2^3-1 = 71 prime so a(3)=3.
4^4+2^4-1 = 271 prime so a(4)=4.
MATHEMATICA
Do[If[PrimeQ[4^m+2^m-1], Print[m]], {m, 8000}] - Farideh Firoozbakht, Aug 03 2005
PROG
PFGW64 from primeform group and SCRIPTIFY
Command : PFGW64 -f in.txt
in.txt file :
SCRIPT
DIM nn, 0
DIMS tt
OPENFILEOUT myfile, a(n).txt
LABEL loopn
SET nn, nn+1
SETS tt, %d\,; nn
PRP 4^nn+2^nn-1, tt
IF ISPRP THEN GOTO a
IF ISPRIME THEN GOTO a
GOTO loopn
LABEL a
WRITE myfile, tt
GOTO loopn -- Pierre CAMI, May 10 2012
(PARI) is(n)=ispseudoprime(4^n+2^n-1) \\ Charles R Greathouse IV, Jun 13 2017
CROSSREFS
Sequence in context: A364587 A221996 A070542 * A143283 A104767 A072944
KEYWORD
nonn
AUTHOR
Pierre CAMI, Oct 11 2004
EXTENSIONS
Corrected by Torin Huzil (thuzil(AT)gmail.com), Sep 15 2005
More terms from Pierre CAMI, May 10 2012
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 27 09:38 EDT 2024. Contains 372017 sequences. (Running on oeis4.)