OFFSET
1,1
COMMENTS
Also smallest positive k such that the k-th triangular number is divisible by the n-th prime. - Reinhard Zumkeller, Apr 19 2002
LINKS
T. D. Noe, Table of n, a(n) for n=1..1000
FORMULA
a(n) = p+(-1)^p. - Juri-Stepan Gerasimov, May 26 2009
EXAMPLE
a(1)=3 because 3(2-1)-1=2 is divisible by 2.
MATHEMATICA
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 *)
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Edited and extended by Ray Chandler, Jun 06 2008
STATUS
approved