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
3, 4, 5, 7, 8, 10, 11, 23, 34, 62, 95, 128, 173, 251, 260, 464, 628, 1267, 1895, 2057, 2743, 5102, 7790, 49163 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
n = 4 is a term since 3^4 - 4*2^4 = 17 is prime.
MAPLE
A270102:=n->`if`(isprime(3^n-n*2^n), n, NULL): seq(A270102(n), n=1..2000); # Wesley Ivan Hurt, May 08 2016
MATHEMATICA
Select[Range[1, 1000], PrimeQ[3^# - #*2^#] &] (* Vaclav Kotesovec, Mar 11 2016 *)
PROG
(MATLAB)
if isprime(3^n - n*2^n)
disp(n)
end
(Python)
from gmpy2 import is_prime
for n in range(5000):
if(is_prime(3**n-n*2**n)):print(n, end=", ")
# Soumil Mandal, May 08 2016
(PARI) is(n)=ispseudoprime(3^n-n*2^n) \\ Charles R Greathouse IV, Jun 06 2017
CROSSREFS
Sequence in context: A287127 A174681 A267650 * A026347 A187482 A285950
KEYWORD
nonn,more
AUTHOR
Vardan Semerjyan, Mar 11 2016
EXTENSIONS
a(24) from Giovanni Resta, May 05 2016
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 19 04:35 EDT 2024. Contains 371782 sequences. (Running on oeis4.)