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

%I #12 May 19 2022 17:43:31

%S 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,

%T 39,24,19,13,3,10,6,122,71,58,24,13,3,2,41,10,6,32,58,17,4,79,26,55,

%U 36,48,31,28,9,2,76,24,32,28,63,20,37,9,2,7,39,10,91,47

%N Least number k such that k 4^n + (4^n-1)/3 is prime.

%H Michael S. Branicky, <a href="/A127597/b127597.txt">Table of n, a(n) for n = 0..2391</a>

%t a = {}; Do[k = 0; While[ !PrimeQ[k 4^n + (4^n - 1)/3], k++ ]; AppendTo[a, k], {n, 0, 50}]; a (*Artur Jasinski*)

%t 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 *)

%o (Python)

%o from sympy import isprime

%o def a(n):

%o k, fourn = 0, 4**n

%o while not isprime(k*fourn + (fourn-1)//3): k += 1

%o return k

%o print([a(n) for n in range(72)]) # _Michael S. Branicky_, May 18 2022

%Y Cf. A035050, A007522, A127575, A127576, A127577, A127578, A127580, A127581, A087522, A127586, A127587, A127589, A127590, A127591, A127592, A127593, A127594, A127598.

%K nonn

%O 0,1

%A _Artur Jasinski_, Jan 19 2007

%E Offset corrected and a(51) and beyond from _Michael S. Branicky_, May 18 2022

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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)