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.
%I A039915 #21 Oct 30 2015 20:33:20 %S A039915 3,2,4,6,10,12,16,18,22,28,30,36,40,42,46,52,58,60,66,70,72,78,82,88, %T A039915 96,100,102,106,108,112,126,130,136,138,148,150,156,162,166,172,178, %U A039915 180,190,192,196,198,210,222,226,228,232,238,240,250,256,262,268,270 %N A039915 Smallest k such that k(p-1)-1 is positive and divisible by p where p = n-th prime. %C A039915 Also smallest positive k such that the k-th triangular number is divisible by the n-th prime. - _Reinhard Zumkeller_, Apr 19 2002 %H A039915 T. D. Noe, <a href="/A039915/b039915.txt">Table of n, a(n) for n=1..1000</a> %F A039915 a(n) = p+(-1)^p. - _Juri-Stepan Gerasimov_, May 26 2009 %e A039915 a(1)=3 because 3(2-1)-1=2 is divisible by 2. %t A039915 kp[n_]:=Module[{p=Prime[n],k=1},While[!Divisible[(k(k+1))/2,p],k++];k]; Array[kp,60] (* _Harvey P. Dale_, Jun 12 2012 *) %t A039915 a[n_] := Prime[n]-1; a[1]=3; Table[a[n], {n, 1, 58}] (* _Jean-François Alcover_, Dec 26 2012, after _Juri-Stepan Gerasimov_ *) %Y A039915 Cf. A000217, A039678. %Y A039915 Essentially the same as A006093. %K A039915 nonn %O A039915 1,1 %A A039915 _Felice Russo_ %E A039915 Edited and extended by _Ray Chandler_, Jun 06 2008