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-3 of 3 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

A285886 Primes of the form (1 + x)^y + (-x)^y where x is a divisor of y.

Original entry on oeis.org

5, 7, 13, 17, 31, 37, 97, 127, 257, 881, 4651, 8191, 65537, 131071, 524287, 1273609, 2147483647, 2305843009213693951, 618970019642690137449562111, 3512911982806776822251393039617, 162259276829213363391578010288127, 170141183460469231731687303715884105727
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 27 2017

Keywords

Comments

If x = y then: 13, 37, 881, 4651, 1273609, ...
Primes of the form (1 + x)^y - x^y where y is divisor of x: 3, 5, 7, 31, 37, 127, 4651, 8191, 131071, 524287, ..., which is A285887.

Examples

			5 is in this sequence because (1 + 1)^2 + (-1)^2 = 5 is prime where 1 is a divisor of 2.
A complete list of (x, y, p) corresponding to the shown data is
  (1,2,5), (1,3,7), (2,2,13), (1,4,17), (1,5,31), (3,3,37), (2,4,97),(1,7,127), (1,8,257), (4,4,881), (5,5,4651), (1,13,8191), (1,16,65537),
  (1,17,131071), (1,19,524287), (7,7,1273609), (1,31,2147483647),
  (1,61,2305843009213693951), (1,89,618970019642690137449562111),
  (8,32,3512911982806776822251393039617),
  (1,107,162259276829213363391578010288127),
  (1,127,170141183460469231731687303715884105727).
  Further terms correspond to (x,y) = {(1,521), (1,607), (167,167), (1,1279), (1,2203), (1,2281), (1,3217), ...}. - _Hugo Pfoertner_, Jan 12 2020
		

Crossrefs

Cf. A000668 (Mersenne primes), A019434 (Fermat primes), A243100, A285887, A285888.

Programs

  • Mathematica
    Union@ Flatten@ Table[Select[Map[(1 + #)^n + (-#)^n &, Divisors@ n], PrimeQ], {n, 150}] (* Michael De Vlieger, Apr 29 2017 *)

Extensions

Edited by N. J. A. Sloane, Jan 11 2020

A285887 Primes of the form (1 + x)^y + (-x)^y where y is a divisor of x.

Original entry on oeis.org

13, 37, 41, 127, 271, 313, 421, 881, 1013, 1201, 1801, 1861, 2113, 2269, 2381, 2791, 3613, 4651, 5101, 5419, 6211, 7057, 7321, 9941, 10513, 10657, 12097, 13267, 13613, 14281, 16381, 19927, 20201, 21013, 21841, 24421, 24571, 26227, 30013, 33391, 34061, 35317, 41761, 45757, 47741, 49297
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 27 2017

Keywords

Comments

If x = y then: 13, 37, 881, 4651, 1273609, ...

Examples

			13 is in this sequence because (1 + 2)^2 + (-2)^2 = 13 is prime where 2 is divisor of 2.
		

Crossrefs

Programs

  • Maple
    N:= 100000: # To get terms <= N
    Res:= NULL:
    for y from 2 while 2^y -1 <= N do
    z:= y/2^padic:-ordp(y, 2);
    if z > 1 and (z <> y or not isprime(z)) then next fi;
    for x from y by y do
      v:= (1+x)^y + (-x)^y;
      if v > N then break fi;
      if isprime(v) then Res:= Res, v; fi
    od od:
    sort(convert({Res}, list)); # Robert Israel, Jan 05 2020
  • Mathematica
    Union@ Flatten@ Table[Select[Map[(1 + n)^# + (-n)^# &, Divisors@ n], PrimeQ], {n, 200}] (* Michael De Vlieger, Apr 29 2017 *)

Extensions

Edited by N. J. A. Sloane, Jan 11 2020
Showing 1-3 of 3 results.