cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A270102 Numbers k such that 3^k - k*2^k is prime.

Original entry on oeis.org

3, 4, 5, 7, 8, 10, 11, 23, 34, 62, 95, 128, 173, 251, 260, 464, 628, 1267, 1895, 2057, 2743, 5102, 7790, 49163
Offset: 1

Views

Author

Vardan Semerjyan, Mar 11 2016

Keywords

Comments

a(25) > 10^5. - Michael S. Branicky, Oct 13 2024

Examples

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

Crossrefs

Programs

  • MATLAB
    if isprime(3^n - n*2^n)
    disp(n)
    end
    
  • 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 *)
  • PARI
    is(n)=ispseudoprime(3^n-n*2^n) \\ Charles R Greathouse IV, Jun 06 2017
  • 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
    

Extensions

a(24) from Giovanni Resta, May 05 2016