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.

A248081 Least number k such that k^n + k +/- 1 are twin primes, or 0 if no such k exists.

This page as a plain text file.
%I A248081 #4 Oct 11 2014 02:29:51
%S A248081 2,2,3,2,0,8,462,0,15,3,0,30,1500,0,30,2,0,371,11058,0,11289,1599,0,
%T A248081 4139,44994,0,36951,54,0,651,2088,0,8841,13061,0,81,83406,0,20451,
%U A248081 3291,0,1821,1128,0,122070,20534,0,57852,82875,0,15150,132,0,515,7215,0,37470,2375,0,2340
%N A248081 Least number k such that k^n + k +/- 1 are twin primes, or 0 if no such k exists.
%C A248081 For n > 2, if n == 2 (mod 3), then k^n + k + 1 is divisible by k^2 + k + 1. Thus it will never be prime.
%o A248081 (PARI)
%o A248081 a(n)=if(n>2&&n==Mod(2,3),return(0));k=1;while(!ispseudoprime(k^n+k-1)||!ispseudoprime(k^n+k+1),k++);k
%o A248081 n=1;while(n<50,print1(a(n),", ");n++)
%Y A248081 Cf. A088485, A236526, A236760.
%K A248081 nonn
%O A248081 1,1
%A A248081 _Derek Orr_, Sep 30 2014