cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A248983 Sequence of distinct least positive numbers such that the average of the first n terms is a triangular number.

Original entry on oeis.org

1, 5, 3, 15, 6, 30, 10, 50, 69, 21, 98, 28, 132, 36, 171, 45, 215, 55, 264, 66, 318, 78, 377, 91, 441, 105, 510, 120, 584, 136, 663, 153, 747, 817, 190, 910, 210, 1008, 231, 1111, 253, 1219, 276, 1332, 300, 1450, 325, 1573, 351, 1701, 378, 1834, 406, 1972, 435, 2115, 465, 2263, 496
Offset: 1

Views

Author

Derek Orr, Oct 18 2014

Keywords

Examples

			1/1 = 1 is a triangular number. So a(1) = 1.
(1+2)/2 is not a triangular number. (1+3)/2 is not a triangular number. (1+4)/2 is not a triangular number. (1+5)/2 = 3 is a triangular number. So a(2) = 5.
		

Crossrefs

Cf. A000217.

Programs

  • PARI
    v=[]; n=1; while(n<5000, num=(vecsum(v)+n); if(num%(#v+1)==0&&vecsearch(vecsort(v), n)==0, for(i=1, n, if(i*(i+1)/2>(num/(#v+1)), break); if(i*(i+1)/2==(num/(#v+1)), print1(n, ", "); v=concat(v, n); n=1; break))); n++)