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.

Showing 1-4 of 4 results.

A285929 Numbers m such that 2^m + (-1)^m is prime.

Original entry on oeis.org

0, 2, 3, 4, 5, 7, 8, 13, 16, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281, 3217, 4253, 4423, 9689, 9941, 11213, 19937, 21701, 23209, 44497, 86243, 110503, 132049, 216091, 756839, 859433, 1257787, 1398269, 2976221, 3021377, 6972593, 13466917, 20996011, 24036583, 25964951, 30402457, 32582657, 37156667
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 28 2017

Keywords

Comments

With 1, exponents of A141453 (see comment by Wolfdieter Lang, Mar 28 2012).
Numbers m such that (1 + k)^m + (-k)^m is prime:
0 (k = 0);
this sequence (k = 1);
A283653 (k = 2);
0, 3, 4, 7, 16, 17, ... (k = 3);
0, 2, 3, 4, 43, 59, 191, 223, ... (k = 4);
0, 2, 5, 8, 11, 13, 16, 23, 61, 83, ... (k = 5);
0, 3, 4, 7, 16, 29, 41, 67, ... (k = 6);
0, 2, 7, 11, 16, 17, 29, 31, 79, 43, 131, 139, ... (k = 7);
0, 4, 7, 29, 31, 32, 67, ... (k = 8);
0, 2, 3, 4, 7, 11, 19, 29, ... (k = 9);
0, 3, 5, 19, 32, ... (k = 10);
0, 3, 7, 89, 101, ... (k = 11);
0, 2, 4, 17, 31, 32, 41, 47, 109, 163, ... (k = 12);
0, 3, 4, 11, 83, ... (k = 13);
0, 2, 3, 4, 16, 43, 173, 193, ... (k = 14);
0, 43, ... (k = 15);
0, 4, 5, 7, 79, ... (k = 16);
0, 2, 3, 8, 13, 71, ... (k = 17);
0, 1607, ... (k = 18);
...
Numbers m such that (1 + k)^m + (-k)^m is not an odd prime for k <= m: 0, 1, 15, 18, 53, 59, 106, 114, 124, 132, 133, 143, 177, 214, 232, 234, 240, 256, ...
Conjecture: if (1 + y)^x + (-y)^x is a prime number then x is zero, or an even power of two, or an odd prime number.
The above conjecture can be proved by considering algebraic factorizations of the polynomials involved. - Jeppe Stig Nielsen, Feb 19 2023
Appears to be essentially the same as A174269. - R. J. Mathar, May 21 2017

Examples

			4 is in this sequence because 2^4 + (-1)^4 = 17 is prime.
5 is in this sequence because 2^5 + (-1)^5 = 31 is prime.
		

Crossrefs

Programs

  • Magma
    [m: m in [0..1000]| IsPrime(2^m + (-1)^m)];
    
  • Mathematica
    Select[Range[0, 10^4], PrimeQ[2^# + (-1)^#] &] (* Michael De Vlieger, May 03 2017 *)
  • PARI
    is(m)=ispseudoprime(2^m+(-1)^m) \\ Charles R Greathouse IV, Jun 06 2017

Formula

a(n) = A174269(n) for n > 2. - Jeppe Stig Nielsen, Feb 19 2023

A174326 Exactly one of 3^n +- 2^n is prime.

Original entry on oeis.org

0, 1, 3, 4, 5, 17, 29, 31, 53, 59, 101, 277, 647, 1061, 2381, 2833, 3613, 3853, 3929, 5297, 7417, 90217, 122219, 173191, 256199, 336353, 485977, 591827, 1059503
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 15 2010

Keywords

Comments

Either (but not both) of 3^n - 2^n and 3^n + 2^n is prime. - Harvey P. Dale, Sep 16 2016
If 3^n + 2^n is prime then n must be a power of 2, and 3^n + 2^n is a generalized Fermat prime. It is conjectured that 3^n + 2^n is prime only for n=1,2,4: see A082101. - Robert Israel, Mar 15 2017, edited May 18 2017.

Examples

			a(1)=0 because 3^0 - 2^0 = 0 = nonprime and 3^0 + 2^0 = 2 = prime;
a(2)=1 because 3^1 - 2^1 = 1 = nonprime and 3^1 + 2^1 = 5 = prime;
a(3)=3 because 3^3 - 2^3 = 19 = prime and 3^3 + 2^3 = 35 = nonprime.
		

Crossrefs

Programs

  • Mathematica
    epQ[n_]:=Module[{a=3^n,b=2^n},Sort[PrimeQ[{a+b,a-b}]]=={False,True}]; Select[Range[0,4000],epQ] (* Harvey P. Dale, Sep 16 2016 *)
  • PARI
    is(n)=isprime(3^n+2^n)+isprime(3^n-2^n)==1 \\ Charles R Greathouse IV, Mar 19 2017

Extensions

9 and 11 removed by R. J. Mathar, Mar 29 2010
More terms from Harvey P. Dale, Sep 16 2016
a(20) from Robert G. Wilson v, Mar 15 2017
a(21) to a(29) (using data from A057468) from Robert Israel, May 18 2017

A286348 Numbers n such that 4^n + (-3)^n is prime.

Original entry on oeis.org

0, 3, 4, 7, 16, 17, 59, 283, 311, 383, 499, 521, 541, 599, 1193, 1993, 2671, 7547, 24019, 46301, 48121, 68597, 91283, 131497, 148663, 184463, 341233
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 07 2017

Keywords

Comments

Numbers n such that (1 + k)^n + (-k)^n is prime:
0 (k = 0);
A285929 (k = 1);
A283653 (k = 2);
this sequence (k = 3);
0, 2, 3, 4, 43, 59, 191, 223, ... (k = 4);
0, 2, 5, 8, 11, 13, 16, 23, 61, 83, ...(k = 5);
0, 3, 4, 7, 16, 29, 41, 67, ... (k = 6);
0, 2, 7, 11, 16, 17, 29, 31, 79, 43, 131, 139, ... (k = 7);
0, 4, 7, 29, 31, 32, 67, ... (k = 8);
0, 2, 3, 4, 7, 11, 19, 29, ... (k = 9);
0, 3, 5, 19, 32, ... (k = 10);
0, 3, 7, 89, 101, ... (k = 11);
0, 2, 4, 17, 31, 32, 41, 47, 109, 163, ... (k = 12);
0, 3, 4, 11, 83, ... (k = 13);
0, 2, 3, 4, 16, 43, 173, 193, ... (k = 14);
0, 43, ... (k = 15);
0, 4, 5, 7, 79, ... (k = 16);
0, 2, 3, 8, 13, 71, ... (k = 17);
0, 1607, ... (k = 18);
...
Primes of the form (1 + n)^(2^n) + n: 5, 83, 65539, 7958661109946400884391941, ...
Numbers m such that (1 + k)^m + (-k)^m is not odd prime for k =< m: 0, 1, 15, 18, 53, 59, 106, 114, 124, 132, 133, 143, 177, 214, 232, 234, 240, 256, ...
Conjecture: if (1 + y)^x + (-y)^x is a prime number then x is zero, or an even power of two, or an odd prime number.

Examples

			3 is in this sequence because 4^3 + (-3)^3 = 37 is prime.
4 is in this sequence because 4^4 + (-3)^4 = 337 is prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..250] | IsPrime(4^n+(-3)^n)];
    
  • Mathematica
    Select[Range[0, 3000], PrimeQ[4^# + (-3)^#] &] (* Michael De Vlieger, May 09 2017 *)
  • PARI
    is(n)=ispseudoprime(4^n+(-3)^n) \\ Charles R Greathouse IV, Jun 13 2017

A287614 Primes of the form (1 + x)^y + (-x)^y for some positive x, y.

Original entry on oeis.org

5, 7, 13, 17, 19, 31, 37, 41, 61, 97, 113, 127, 181, 211, 257, 271, 313, 331, 337, 397, 421, 547, 613, 631, 761, 881, 919, 1013, 1201, 1301, 1657, 1741, 1801, 1861, 1951, 2113, 2269, 2381, 2437, 2521, 2791, 3121, 3169, 3571, 3613, 3697, 4219, 4447, 4513, 4651, 5101, 5167, 5419, 6211
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 27 2017

Keywords

Comments

Conjecture: If x is a positive number and (1 + x)^y + (-x)^y is an odd prime number, then y is other odd prime number or even power of two.
Smallest Mersenne prime (A000668) has n ways to write as (1 + k)^m - k^m for positive k: 3, 7, 127, ...

Examples

			5 (x = 1, y = 2), 7 (1, 3), 13 (2, 2), 17 (1, 4), 19 (2, 3), 31 (1, 5), 37 (3, 3), 41 (4, 2), 61 (3, 4 or 2, 5), 97 (2, 4), 113 (7, 2), 127 (1, 7 or 3, 6), 181 (9, 2), 211 (2, 5), 257 (1, 8), 271 (9, 3).
		

Crossrefs

Programs

  • Mathematica
    mx = 10^4; f[x_, y_] := (1+x)^y + (-x)^y; x=0; Union@ Reap[ While[ f[++x, 2] < mx, y=1; While[(v = f[x, ++y]) < mx, If[PrimeQ@ v, Sow@v]]]][[2, 1]] (* Giovanni Resta, May 31 2017 *)
Showing 1-4 of 4 results.