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”).
%I #8 Sep 24 2023 04:28:56
%S 4,22,29,37,79,106,154,172,191,211,254,326,352,379,466,529,667,704,
%T 904,947,991,1036,1129,1177,1276,1379,1486,1541,1597,1654,1712,1771,
%U 1892,1954,2279,2347,2557,2629,2776,2927,3004,3082,3161,3404,3571,3742,3829
%N Members of A000124 which are the arithmetic mean of two other members.
%e 4 = (1+7)/2, 37 = (7 +67)/2. etc.
%o (PARI) V = vector(5000); for (i = 1, 5000, V[i] = 1 + binomial(i, 2)); count = 0; i = 1; while (count < 50, i++; found = 0; j = i - 1; k = i + 1; x = 2*V[i]; while (!found && j, if (V[j] + V[k] > x, j--, if (V[j] + V[k] < x, k++, found = 1))); if (found, count++; print1(V[i], ", "))); \\ _David Wasserman_, Nov 18 2004
%Y Cf. A000124.
%K nonn
%O 1,1
%A _Amarnath Murthy_, May 05 2003
%E Corrected and extended by _David Wasserman_, Nov 18 2004