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.

A242796 Least number k such that (k^k-n)/(k-n) is prime, or 0 if no such k exists.

This page as a plain text file.
%I A242796 #14 Oct 21 2014 10:02:43
%S A242796 2,4,6,5,0,13,9,11,0,12,22,13,37,28,36,0,0,171,73,85,0,0,0,29,0,0,0,0,
%T A242796 517,35,40,49,44,49,0,41,46,40,0,0,51,0,52,0,0,0,0,0,0,0,0,0,2841,0,0,
%U A242796 0,0,0,0,67,0,64,0,199,125,221,0,0,153,113,239,0,97,0,0,0
%N A242796 Least number k such that (k^k-n)/(k-n) is prime, or 0 if no such k exists.
%C A242796 a(n)=0 is confirmed for k <= 5000.
%e A242796 (1^1-2)/(1-2) = 1 is not prime. (3^3-2)/(3-2) = 25 is not prime. (4^4-2)/(4-2) = 254/2 = 127 is prime. Thus a(2) = 4.
%o A242796 (PARI) a(n)=for(k=1,5000,if(k!=n,s=(k^k-n)/(k-n);if(floor(s)==s,if(ispseudoprime(s),return(k)))));
%o A242796 n=1;while(n<100,print(a(n));n+=1)
%Y A242796 Cf. A242787, A242788.
%K A242796 nonn,more,hard
%O A242796 1,1
%A A242796 _Derek Orr_, May 22 2014
%E A242796 We don't normally allow conjectural terms, except in special circumstances. This is one of those exceptions, for if we included only terms that are known for certain, not much of this sequence would remain. - _N. J. A. Sloane_, May 31 2014