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!)
A270102 Numbers n such that 3^n - n*2^n is prime. 2

%I #27 Dec 07 2019 12:18:28

%S 3,4,5,7,8,10,11,23,34,62,95,128,173,251,260,464,628,1267,1895,2057,

%T 2743,5102,7790,49163

%N Numbers n such that 3^n - n*2^n is prime.

%e n = 4 is a term since 3^4 - 4*2^4 = 17 is prime.

%p A270102:=n->`if`(isprime(3^n-n*2^n),n,NULL): seq(A270102(n),n=1..2000); # _Wesley Ivan Hurt_, May 08 2016

%t Select[Range[1, 1000], PrimeQ[3^# - #*2^#] &] (* _Vaclav Kotesovec_, Mar 11 2016 *)

%o (MATLAB)

%o if isprime(3^n - n*2^n)

%o disp(n)

%o end

%o (Python)

%o from gmpy2 import is_prime

%o for n in range(5000):

%o if(is_prime(3**n-n*2**n)):print(n,end=", ")

%o # _Soumil Mandal_, May 08 2016

%o (PARI) is(n)=ispseudoprime(3^n-n*2^n) \\ _Charles R Greathouse IV_, Jun 06 2017

%Y Cf. A057468, A270104.

%K nonn,more

%O 1,1

%A _Vardan Semerjyan_, Mar 11 2016

%E a(24) from _Giovanni Resta_, May 05 2016

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 March 28 14:20 EDT 2024. Contains 371254 sequences. (Running on oeis4.)