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.

A177463 The smallest k such that Catalan(n)+k and Catalan(n)-k are both prime.

This page as a plain text file.
%I A177463 #8 Jan 12 2019 20:05:51
%S A177463 0,3,1,5,10,3,69,33,45,45,9,47,86,97,97,41,19,49,191,11,101,283,1,69,
%T A177463 597,549,1341,243,552,121,157,115,1341,1905,165,597,27,87,31,731,1093,
%U A177463 449,127,37,37,157,1145,587,317,659,1523,487,865,4879,463,1351,4471
%N A177463 The smallest k such that Catalan(n)+k and Catalan(n)-k are both prime.
%F A177463 a(n) =  A047160(A000108(n)). - _R. J. Mathar_, Jan 23 2011
%e A177463 5 +- 0 -> primes, 14 +- 3 -> primes, 42 +- 1 -> primes, 132 +- 5 -> primes, ...
%p A177463 A000108 := proc(n) binomial(2*n,n)/(n+1) ; end proc:
%p A177463 A047160 := proc(n) for k from 0 to n-1 do if isprime(n-k) and isprime(n+k) then return k; end if; end do: return -1 ; end proc:
%p A177463 A177463 := proc(n) A047160(A000108(n)) ; end proc:
%p A177463 seq(A177463(n),n=3..40) ; # _R. J. Mathar_, Jan 23 2011
%t A177463 g[n_]:=(2n)!/n!/(n+1)!; f[n_]:=Block[{k},If[OddQ[n],k=0,k=1];While[ !PrimeQ[n-k]||!PrimeQ[n+k],k+=2];k]; Table[f[g[n]],{n,3,4*4!}]
%Y A177463 Cf. A000108, A078611.
%K A177463 nonn
%O A177463 3,2
%A A177463 _Vladimir Joseph Stephan Orlovsky_, May 09 2010