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.

A115883 The n-th prime minus n gives a triangular number.

This page as a plain text file.
%I A115883 #12 Dec 20 2019 20:00:17
%S A115883 1,2,4,5,7,13,34,37,46,62,104,111,210,259,274,296,306,439,488,502,513,
%T A115883 751,763,817,969,998,1132,1231,1405,1586,1849,1982,2107,2488,2578,
%U A115883 2695,2732,2752,2989,3008,3079,3322,3958,4201,4628,5035,5594,5722,5929
%N A115883 The n-th prime minus n gives a triangular number.
%H A115883 Harvey P. Dale and T. D. Noe, <a href="/A115883/b115883.txt">Table of n, a(n) for n = 1..1000</a> (first 500 terms from Harvey P. Dale)
%e A115883 prime(13)-13 = 41-13 = 28 = T(7).
%t A115883 Flatten[Position[Table[Prime[n]-n,{n,6000}],_?(IntegerQ[(Sqrt[ 8#+1]- 1)/2]&)]] (* _Harvey P. Dale_, Oct 08 2012 *)
%t A115883 pntQ[{a_,b_}]:=OddQ[Sqrt[8(a-b)+1]]; Module[{nn=6000},Select[Thread[ {Prime[ Range[nn]],Range[nn]}],pntQ]][[All,2]] (* _Harvey P. Dale_, Dec 20 2019 *)
%o A115883 (PARI) isok(n) = ispolygonal(prime(n) - n, 3); \\ _Michel Marcus_, Jan 25 2014
%Y A115883 Cf. A064370, A115882, A115887.
%K A115883 nonn
%O A115883 1,2
%A A115883 _Giovanni Resta_, Feb 06 2006