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!)
A181953 Least nonnegative k such that 2*t(n) + t(k) is prime, where t(n) = n *(n+1)/2, the n-th triangular number. 1

%I #22 Aug 28 2020 11:39:26

%S 2,0,1,1,2,1,1,2,1,13,2,13,1,5,1,1,6,1,10,2,1,1,2,10,1,2,10,1,5,22,13,

%T 6,25,1,2,46,13,2,1,58,18,1,10,5,37,13,9,10,25,18,1,10,6,10,1,2,25,1,

%U 9,1,37,5,1,25,21,37,1,21,13,1,2,1,13,5,13,1

%N Least nonnegative k such that 2*t(n) + t(k) is prime, where t(n) = n *(n+1)/2, the n-th triangular number.

%H Harvey P. Dale, <a href="/A181953/b181953.txt">Table of n, a(n) for n = 1..1000</a>

%e a(0)=2 because 2*0*(0+1)/2+2*(2+1)/2=2 is prime,

%e a(1)=0 because 2*1*(1+1)/2+0*(0+1)/2=2 is prime,

%e a(2)=1 because 2*2*(2+1)/2+1*(1+1)/2=7 is prime,

%e a(3)=1 because 2*3*(3+1)/2+1*(1+1)/2=13 is prime,

%e a(4)=2 because 2*4*(4+1)/2+2*(2+1)/2=23 is prime.

%t tri[n_] := n*(n+1)/2; Table[k = 0; While[! PrimeQ[2*tri[n] + tri[k]], k++]; k, {n, 0, 83}] (* _T. D. Noe_, Apr 03 2012 *)

%t lnk[n_]:=Module[{k=0},While[!PrimeQ[2n+(k(k+1))/2],k++];k]; Join[{2},lnk/@ Accumulate[ Range[80]]] (* _Harvey P. Dale_, Aug 28 2020 *)

%Y Cf. A000217, A002378.

%K nonn

%O 1,1

%A _Gerasimov Sergey_, Apr 03 2012

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 25 11:36 EDT 2024. Contains 371968 sequences. (Running on oeis4.)