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.

A243147 Least number k such that n^k + k^n is prime or 0 if no such k exists.

This page as a plain text file.
%I A243147 #34 Aug 13 2014 15:50:30
%S A243147 1,1,2,1,24,1,54,69,2,1,3100,1
%N A243147 Least number k such that n^k + k^n is prime or 0 if no such k exists.
%C A243147 More terms given in links.
%C A243147 a(n) = 1 if and only if n + 1 is prime. Thus there are infinitely many nonzero entries.
%C A243147 For n in A016767, a(n) = 0 since n^k + k^n is factorable and will never be prime. Thus there are infinitely many zero entries.
%C A243147 If a(i) = j then a(j) <= i for all i and j not equal to 0.
%C A243147 a(n) and n must have opposite parity. If n is odd/even, a(n) must be even/odd, respectively.
%C A243147 Further, gcd(n, a(n)) = 1 for all n.
%H A243147 H. Lifchitz and R. Lifchitz, <a href="http://primenumbers.net/prptop/searchform.php?form=x%5Ey%2By%5Ex&amp;action=Search">PRP Top Records. Search for x^y+y^x</a>
%H A243147 Derek Orr, <a href="/A243147/a243147.txt">Table for n, a(n) for n = 1..100 (unknown k-values are marked "unknown")</a>
%e A243147 3^1 + 1^3 = 4 is not prime. 3^2 + 2^3 = 17 is prime. So a(3) = 2.
%o A243147 (PARI) a(n)=if(ispower(n)&&ispower(n)%3==0&&n%3==0,return(0));k=1;while(!ispseudoprime(n^k+k^n),k++);return(k)
%o A243147 vector(12, n, a(n))
%Y A243147 Cf. A016767.
%K A243147 nonn,hard,more
%O A243147 1,3
%A A243147 _Derek Orr_, May 30 2014