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.

A075715 Numbers n such that n^16 + n + 1 is prime.

Original entry on oeis.org

1, 2, 21, 26, 47, 65, 99, 102, 206, 215, 216, 257, 294, 342, 437, 441, 537, 540, 702, 747, 837, 860, 909, 912, 921, 926, 942, 1020, 1071, 1101, 1112, 1125, 1181, 1254, 1266, 1322, 1344, 1364, 1370, 1406, 1422, 1665, 1814, 1821, 1829, 1905, 2024
Offset: 1

Views

Author

Zak Seidov, Oct 03 2002

Keywords

Comments

For s = 5, 8, 11, 14, 17, 20, ..., n_s = 1 + n + n^s is always composite for any n > 1. Also at n = 1, n_s = 3 is a prime for any s. So it is interesting to consider only the cases of s =/= 5, 8, 11, 14, 17, 20, ... and n > 1. Here we consider the case s = 16 and find several first n's making n_s a prime (or a probable prime).

Examples

			2 is in the sequence because 1 + 2 + 2^16 = 65539 is prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..3000]| IsPrime(n^16+n+1)]; // Vincenzo Librandi, Dec 17 2013
  • Maple
    A075715:=n->if type(1+n+n^16, prime) then n; fi; seq(A075715(n), n=1..3000); # Wesley Ivan Hurt, Dec 17 2013
  • Mathematica
    Select[Range[3000], PrimeQ[#^16 + # + 1] &] (* Vincenzo Librandi, Dec 17 2013 *)
  • PARI
    for(n=1,3000,if(isprime(1+n+n^16),print1(n",")))
    

Extensions

More terms from Ralf Stephan, Mar 19 2003

A075717 1+n+n^13 is a prime.

Original entry on oeis.org

1, 5, 15, 39, 50, 56, 105, 116, 128, 153, 168, 170, 243, 245, 264, 308, 314, 369, 401, 429, 480, 489, 531, 551, 599, 608, 680, 690, 699, 701, 785, 804, 939, 978, 1050, 1056, 1065, 1073, 1110, 1169, 1224, 1226, 1271, 1283, 1308, 1310, 1391, 1401
Offset: 1

Views

Author

Zak Seidov, Oct 03 2002

Keywords

Comments

For s = 5,8,11,14,17,20,..., n_s=1+n+n^s is always composite for any n>1. Also at n=1, n_s=3 is a prime for any s. So it is interesting to consider only the cases of s =/= 5,8,11,14,17,20,... and n>1. Here I consider the case s=13 and find several first n's making n_s a prime (or a probable prime).

Examples

			5 is OK because at s=13, n=2, n_s=1+n+n^s=1220703131 is a prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..2000] | IsPrime(s) where s is 1+n+n^13]; // Vincenzo Librandi, Jul 28 2014
  • Mathematica
    Select[Range[1500], PrimeQ[1 + # + #^13] &] (* Harvey P. Dale, Apr 20 2013 *)
  • PARI
    n=0; for(k=1, 60, n=n+1; while(!isprime(1+n+n^13), n=n+1); print1(n","))
    

Extensions

More terms from Ralf Stephan, Mar 20 2003

A245476 Least number k > 1 such that k^n + k + 1 is prime, or 0 if no such number exists.

Original entry on oeis.org

2, 2, 2, 2, 0, 2, 2, 0, 3, 3, 0, 2, 5, 0, 2, 2, 0, 2, 8, 0, 6, 3, 0, 6, 15, 0, 6, 2, 0, 2, 23, 0, 23, 56, 0, 15, 114, 0, 14, 11, 0, 3, 14, 0, 29, 110, 0, 21, 9, 0, 53, 59, 0, 6, 2, 0, 3, 29, 0, 71, 21, 0, 146, 17, 0, 35, 2, 0, 9, 6, 0, 77, 41, 0, 27, 176, 0, 153, 21, 0, 39, 32, 0, 2, 314, 0, 3, 5, 0, 66, 44, 0, 234
Offset: 1

Views

Author

Derek Orr, Jul 23 2014

Keywords

Comments

Except for a(2), a(n) = 0 if n == 2 mod 3 (A016789).
It appears that this is an "if and only if".
a(n) = 2 if and only if n is in A057732.
Many terms in the linked table correspond to probable primes. If n == 2 mod 3 then k^2+k+1 divides k^n+k+1. This is why a(n) = 0 if n > 2 and n == 2 mod 3. - Jens Kruse Andersen, Jul 28 2014

Examples

			2^9 + 2 + 1 = 515 is not prime. 3^9 + 3 + 1 = 19687 is prime. Thus a(9) = 3.
		

Crossrefs

Cf. Numbers n such that n^s + n + 1 is prime: A005097 (s = 1), A002384 (s = 2), A049407 (s = 3), A049408 (s = 4), A075723 (s = 6), A075722 (s = 7), A075720 (s = 9), A075719 (s = 10), A075718 (s = 12), A075717 (s = 13), A075716 (s = 15), A075715 (s = 16), A075714 (s = 18), A075713 (s = 19).

Programs

  • Maple
    f:= proc(n) local k;
       if n mod 3 = 2 and n > 2 then return 0 fi;
       for k from 2 to 10^6 do
          if isprime(k^n+k+1) then return k fi
       od:
      error("no solution found for n = %1",n);
    end proc:
    seq(f(n),n=1..100); # Robert Israel, Jul 27 2014
  • PARI
    a(n) = if(n>2&&n==Mod(2, 3), return(0)); k=2; while(!ispseudoprime(k^n+k+1), k++); k
    vector(150, n, a(n)) \\ Derek Orr with corrections and improvements from Colin Barker, Jul 23 2014
Showing 1-3 of 3 results.