A111010 Primes of the form (3^k - (-1)^k)/4.
2, 7, 61, 547, 398581, 23535794707, 82064241848634269407
Offset: 1
Keywords
References
- John Derbyshire, Prime Obsession, Joseph Henry Press, April 2004, p. 16.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..14 (terms 1..11 from Alexander Adamchuk, Nov 19 2006)
Programs
-
Mathematica
Do[f=(3^n - (-1)^n)/4; If[PrimeQ[f],Print[{n,f}]],{n,1,577}] (* Alexander Adamchuk, Nov 19 2006 *)
-
PARI
primenum(n,k,typ) = /* k=mult,typ=1 num,2 denom. ouyput prime num or denom. */ { local(a,b,x,tmp,v); a=1;b=1; for(x=1,n, tmp=b; b=a+b; a=k*tmp+a; if(typ==1,v=a,v=b); if(isprime(v),print1(v","); ) ); print(); print(a/b+.); }
Formula
Given a(0)=1, b(0)=1, then for i=1, 2, ..., a(i)/b(i) = (a(i-1) + 2*b(i-1)) /(a(i-1) + b(i-1)).
Extensions
Edited by Alexander Adamchuk, Nov 19 2006
Comments