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.

A097794 Least k such that the absolute value of k^n-n is prime or zero if no such k exists.

This page as a plain text file.
%I A097794 #3 Mar 30 2012 17:22:33
%S A097794 3,2,1,1,4,1,60,1,2,21,28,1,2,1,28,0,234,1,2,1,2,159,10,1,68,145,0,69,
%T A097794 186,1,32,1,26,261,4,0,8,1,62,3,22,1,6,1,8,945,76,1,116,129,382,93,
%U A097794 330,1,2,555,224,1359,78,1,62,1,110,0,1032,37,462,1,100,9,88,1,1416,1,218
%N A097794 Least k such that the absolute value of k^n-n is prime or zero if no such k exists.
%C A097794 Because the polynomial x^n - n is reducible for n in A097764, a(n) is 0 for n=16, 27, 36, 64, 100,.... Although x^4-4 is reducible, the factor x^2-2 is -1 for x=1.
%t A097794 Table[If[MemberQ[{16, 27, 36, 64, 100}, n], 0, k=1; While[ !PrimeQ[k^n-n], k++ ]; k], {n, 100}]
%Y A097794 Cf. A097764 (n such that x^n-n is reducible), A072883 (least k such that k^n+n is prime).
%K A097794 nonn
%O A097794 1,1
%A A097794 _T. D. Noe_, Aug 24 2004