OFFSET
1,1
COMMENTS
Essentially the same as A008837; only the first terms differ.
FORMULA
a(n) = p*(p-1)/2, for p = prime(n) and n >= 2. - Michael S. Branicky, Jun 03 2021
MATHEMATICA
With[{tr=Accumulate[Range[300]]}, Table[SelectFirst[tr, Divisible[#, Prime[n]]&], {n, 50}]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 06 2018 *)
PROG
(PARI)
T(n) = n*(n+1)/2
for(n=1, 100, p=prime(n); tr=1; while(T(tr)%p<>0, tr++); print1(T(tr), ", "))
(Python)
from sympy import prime
def a(n):
if n == 1: return 6
p = prime(n)
return p*(p-1)//2
print([a(n) for n in range(1, 46)]) # Michael S. Branicky, Jun 03 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Rick L. Shepherd, Sep 06 2005
STATUS
approved