A112456 Least triangular number divisible by n-th prime.
6, 3, 10, 21, 55, 78, 136, 171, 253, 406, 465, 666, 820, 903, 1081, 1378, 1711, 1830, 2211, 2485, 2628, 3081, 3403, 3916, 4656, 5050, 5253, 5671, 5886, 6328, 8001, 8515, 9316, 9591, 11026, 11325, 12246, 13203, 13861, 14878, 15931, 16290, 18145, 18528, 19306
Offset: 1
Keywords
Programs
-
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 *)
-
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
Formula
a(n) = p*(p-1)/2, for p = prime(n) and n >= 2. - Michael S. Branicky, Jun 03 2021
Comments