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!)
A074720 Least k such that floor(3^n/2^k) is prime. 1

%I #12 Jan 04 2017 19:40:43

%S 2,1,4,5,6,1,11,6,7,4,5,1,9,6,8,21,8,4,25,12,20,13,30,17,6,13,10,13,

%T 19,5,12,34,33,37,16,39,35,13,38,30,28,20,53,16,60,24,40,43,34,19,23,

%U 32,63,59,19,22,27,56,86,14,29,5,53,13,15,63,19,7,88,1,87,46,22,51,25,30

%N Least k such that floor(3^n/2^k) is prime.

%C From _Robert Israel_, Jan 04 2017: (Start)

%C a(n) <= A056576(n) - 1.

%C a(n) = 1 for n in A028491. (End)

%H Robert Israel, <a href="/A074720/b074720.txt">Table of n, a(n) for n = 2..2000</a>

%p f:= proc(n) local t, k;

%p t:= 3^n;

%p for k from 1 do t:= t/2; if isprime(floor(t)) then return k fi od:

%p end proc:

%p map(f, [$2..100]); # _Robert Israel_, Jan 04 2017

%t lk[n_]:=Module[{k=1,n3=3^n},While[!PrimeQ[Floor[n3/2^k]],k++];k]; Array[lk,80,2] (* _Harvey P. Dale_, Feb 24 2013 *)

%o (PARI) a(n)=if(n<0,0,k=1; while(isprime(floor(3^n/2^k)) == 0,k++); k)

%K easy,nonn

%O 2,1

%A _Benoit Cloitre_, Sep 04 2002

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 11:37 EDT 2024. Contains 371968 sequences. (Running on oeis4.)