login
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
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, 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, 9, 1, 37, 5, 1, 25, 21, 37, 1, 21, 13, 1, 2, 1, 13, 5, 13, 1
OFFSET
1,1
LINKS
EXAMPLE
a(0)=2 because 2*0*(0+1)/2+2*(2+1)/2=2 is prime,
a(1)=0 because 2*1*(1+1)/2+0*(0+1)/2=2 is prime,
a(2)=1 because 2*2*(2+1)/2+1*(1+1)/2=7 is prime,
a(3)=1 because 2*3*(3+1)/2+1*(1+1)/2=13 is prime,
a(4)=2 because 2*4*(4+1)/2+2*(2+1)/2=23 is prime.
MATHEMATICA
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 *)
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 *)
CROSSREFS
Sequence in context: A117468 A340453 A116374 * A025911 A060184 A055639
KEYWORD
nonn
AUTHOR
Gerasimov Sergey, Apr 03 2012
STATUS
approved