public long GetFirstWithNumbersOfDivisors(long above) { foreach (var nextTriangularNumber in TriangleNumber.Iterastor()) { var allUniqueDivisors = Divisors.GetAllUniqueDivisorsIn(nextTriangularNumber); if (allUniqueDivisors.Count > above) { return(nextTriangularNumber); } } return(-1); }
public E042Codedtrianglenumbers(int wordMaxLength) { triangleNumbers = TriangleNumber.Iterastor(max: 26 * wordMaxLength).ToArray(); }
public void TestTriangleNumber(int n, int tn) { var tabell = TriangleNumber.Iterastor(50755).ToArray(); Assert.Equal(tn, tabell[n - 1]); }