login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A039915
Smallest k such that k(p-1)-1 is positive and divisible by p where p = n-th prime.
5
3, 2, 4, 6, 10, 12, 16, 18, 22, 28, 30, 36, 40, 42, 46, 52, 58, 60, 66, 70, 72, 78, 82, 88, 96, 100, 102, 106, 108, 112, 126, 130, 136, 138, 148, 150, 156, 162, 166, 172, 178, 180, 190, 192, 196, 198, 210, 222, 226, 228, 232, 238, 240, 250, 256, 262, 268, 270
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
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
Essentially the same as A006093.
Sequence in context: A352915 A361401 A361379 * A085346 A121861 A338213
KEYWORD
nonn
AUTHOR
EXTENSIONS
Edited and extended by Ray Chandler, Jun 06 2008
STATUS
approved