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.

A259542 a(1) = 1, for n > 1 a(n) = smallest number not already in the sequence such that the arithmetic mean of two neighboring terms is a triangular number.

This page as a plain text file.
%I A259542 #7 Jun 30 2015 17:11:49
%S A259542 1,5,7,13,17,3,9,11,19,23,33,39,51,21,35,37,53,57,15,27,29,43,47,25,
%T A259542 31,41,49,61,71,85,97,59,73,83,99,111,45,65,67,89,93,63,69,87,95,115,
%U A259542 125,147,159,81,75,107,103,79,77,55,101,109,131,141,165,177
%N A259542 a(1) = 1, for n > 1 a(n) = smallest number not already in the sequence such that the arithmetic mean of two neighboring terms is a triangular number.
%C A259542  A259604(n) = (a(n) + a(n+1)) / 2;
%C A259542 conjecture: sequence is a permutation of the odd numbers, see also A259260, A259429;
%C A259542 a(A259543(n)) = 2*n-1.
%H A259542 Reinhard Zumkeller, <a href="/A259542/b259542.txt">Table of n, a(n) for n = 1..10000</a>
%o A259542 (Haskell)
%o A259542 import Data.List (delete)
%o A259542 a259542 n = a259542_list !! (n-1)
%o A259542 a259542_list = 1 : f 1 [3, 5 ..] where
%o A259542    f x zs = g zs where
%o A259542      g (y:ys) = if a010054 ((x + y) `div` 2) == 1
%o A259542                    then y : f y (delete y zs) else g ys
%Y A259542 Cf. A259260, A259429, A010054, A005408, A259604.
%K A259542 nonn
%O A259542 1,2
%A A259542 _Reinhard Zumkeller_, Jun 30 2015