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.

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

This page as a plain text file.
%I A248079 #14 Oct 24 2021 12:28:48
%S A248079 2,2,3,2,0,4,6,2,4,3,0,17,36,3,3,2,0,6,9,43,27,9,0,3,154,3,34,54,0,24,
%T A248079 24,6,226,23,0,3,70,36,13,51,0,4,13,9,10,68,0,18,10,45,154,85,0,23,6,
%U A248079 10,37,8,0,30,331,9,3,40,0,11,61,8,10,35,0,61,76,54,426,9,0,84,87,13,46
%N A248079 Least number k such that k^n + k - 1 is prime, or 0 if no such k exists.
%C A248079 If n == 5 mod 6 (A016969), k^n + k - 1 is always divisible by k^2 - k + 1. Thus it will never be prime.
%t A248079 lnk[n_]:=Module[{k=2},While[CompositeQ[k^n+k-1],k++];k]; Table[If[Mod[n,6] == 5,0,lnk[n]],{n,90}] (* _Harvey P. Dale_, Oct 24 2021 *)
%o A248079 (PARI) a(n)=if(n==Mod(5,6),return(0));k=1;while(!isprime(k^n+k-1),k++);k
%o A248079 vector(100,n,a(n))
%Y A248079 Cf. A016969, A045546, A236475, A236759, A113517.
%K A248079 nonn
%O A248079 1,1
%A A248079 _Derek Orr_, Sep 30 2014