login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A177460 Smallest k such that A000217(n)+k and A000217(n)-k are both prime. 1

%I #6 Jan 20 2024 16:05:12

%S 0,1,3,2,2,9,5,2,12,5,5,12,2,7,27,4,8,9,13,2,24,5,7,12,2,5,27,4,2,75,

%T 19,38,18,11,7,30,2,7,9,2,16,63,7,4,12,25,5,12,16,35,51,2,2,9,13,16,

%U 12,17,41,60,20,13,51,8,32,9,5,22,18,35,19,12,22,7,75,34,2,93,11,2,30,25,11

%N Smallest k such that A000217(n)+k and A000217(n)-k are both prime.

%e 3+-0->primes. 6+-1->primes. 10+-3->primes. 15+-2->primes,..

%t f[n_]:=Block[{k},If[OddQ[n],k=0,k=1];While[ !PrimeQ[n-k]||!PrimeQ[n+k], k+=2];k]; Table[f[n*(n+1)/2],{n,2,5!}]

%Y Cf. A000217, A172989, A172990.

%K nonn

%O 2,3

%A _Vladimir Joseph Stephan Orlovsky_, May 09 2010

%E Definition rephrased and offset adapted by _R. J. Mathar_, Aug 15 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 17 23:23 EDT 2024. Contains 371767 sequences. (Running on oeis4.)