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!)
A127597 Least number k such that k 4^n + (4^n-1)/3 is prime. 2
2, 1, 0, 2, 3, 2, 4, 4, 3, 10, 3, 3, 2, 7, 2, 25, 6, 17, 4, 13, 3, 20, 36, 20, 11, 27, 66, 23, 39, 24, 19, 13, 3, 10, 6, 122, 71, 58, 24, 13, 3, 2, 41, 10, 6, 32, 58, 17, 4, 79, 26, 55, 36, 48, 31, 28, 9, 2, 76, 24, 32, 28, 63, 20, 37, 9, 2, 7, 39, 10, 91, 47 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
MATHEMATICA
a = {}; Do[k = 0; While[ !PrimeQ[k 4^n + (4^n - 1)/3], k++ ]; AppendTo[a, k], {n, 0, 50}]; a (*Artur Jasinski*)
lnk[n_]:=Module[{k=0, n4=4^n}, While[!PrimeQ[k*n4+(n4-1)/3], k++]; k]; Array[ lnk, 60, 0] (* Harvey P. Dale, May 28 2018 *)
PROG
(Python)
from sympy import isprime
def a(n):
k, fourn = 0, 4**n
while not isprime(k*fourn + (fourn-1)//3): k += 1
return k
print([a(n) for n in range(72)]) # Michael S. Branicky, May 18 2022
CROSSREFS
Sequence in context: A328699 A030399 A128763 * A167749 A104770 A296529
KEYWORD
nonn
AUTHOR
Artur Jasinski, Jan 19 2007
EXTENSIONS
Offset corrected and a(51) and beyond from Michael S. Branicky, May 18 2022
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 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)