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.

A245723 a(n) = position of the first occurrence of n in A245714.

This page as a plain text file.
%I A245723 #17 Jul 31 2014 00:47:21
%S A245723 1,3,7,19,109,509,241,317,181,1471,2503,2491,7151,11779,3361,2927,
%T A245723 1733,5881,15893,16943,11639,31897,25939,12011,17123,6283,10369,63949,
%U A245723 8471,125261,64579,117541,21859,58879,44711,216829,64081,67159,73273,181931,139709
%N A245723 a(n) = position of the first occurrence of n in A245714.
%C A245723 Least m > 0 such that m+n! is the smallest prime of form m+k!. - _Jens Kruse Andersen_, Jul 30 2014
%H A245723 Vaclav Kotesovec and Jens Kruse Andersen, <a href="/A245723/b245723.txt">Table of n, a(n) for n = 1..200</a> (first 92 terms from Vaclav Kotesovec)
%e A245723 a(2) = 3 since 3+2! is the smallest prime of the form 3+k!, and 3 is the least such number. While 1+2! is also prime, there is a smaller prime 1+1! in that case so a(2) is not 1. - _Jens Kruse Andersen_, Jul 30 2014
%t A245723 nmax=2000; Table[nn=1; k=0; While[k!=n && nn<nmax,k=1; While[Not[PrimeQ[nn+k!]] && k<=nn,k++]; If[k>nn,k=0]; nn++]; If[nn==nmax,0,nn-1],{n,1,10}]
%o A245723 (PARI)
%o A245723 a(n)=for(k=1,n,if(ispseudoprime(n+k!),return(k)))
%o A245723 b(n)=for(k=1,10^6,if(a(k)==n,return(k)))
%o A245723 n=1;while(n<150,print1(b(n),", ");n++) \\ _Derek Orr_, Jul 30 2014
%Y A245723 Cf. A245714.
%K A245723 nonn
%O A245723 1,2
%A A245723 _Vaclav Kotesovec_, Jul 30 2014