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.

A259260 With a(1) = 1, a(n) is the smallest number not already in the sequence such that the arithmetic mean of two neighboring terms is a square.

This page as a plain text file.
%I A259260 #23 Jul 31 2015 04:11:44
%S A259260 1,7,11,21,29,3,5,13,19,31,41,9,23,27,45,53,75,87,113,15,17,33,39,59,
%T A259260 69,93,35,37,61,67,95,105,57,71,91,109,133,155,183,209,79,49,151,137,
%U A259260 25,47,51,77,85,43,55,73,89,111,131,157,181,107,135,65,63,99,101,141,147,191,97,103,139,149,189,203,247,145
%N A259260 With a(1) = 1, a(n) is the smallest number not already in the sequence such that the arithmetic mean of two neighboring terms is a square.
%C A259260 Conjectured to be a permutation of the odd numbers.
%C A259260 A259602(n) = (a(n) + a(n+1)) / 2; a(A259526(n)) = 2*n-1. - _Reinhard Zumkeller_, Jun 29 2015
%H A259260 Reinhard Zumkeller, <a href="/A259260/b259260.txt">Table of n, a(n) for n = 1..10000</a>
%t A259260 s={1}; Do[n = Last@ s; a=2; While[(b = 2*a^2 - n) <= 0 || MemberQ[s, b], a++]; AppendTo[s, b], {100}]; s (* _Giovanni Resta_, Jun 23 2015 *)
%o A259260 (PARI) v=[1];n=1;while(#v<100,s=(n+v[#v])/2;if(type(s)=="t_INT",if(issquare(s)&&!vecsearch(vecsort(v),n),v=concat(v,n);n=0));n++);v
%o A259260 (Haskell)
%o A259260 import Data.List (delete)
%o A259260 a259260 n = a259260_list !! (n-1)
%o A259260 a259260_list = 1 : f 1 [3, 5 ..] where
%o A259260    f x zs = g zs where
%o A259260      g (y:ys) = if a010052 ((x + y) `div` 2) == 1
%o A259260                    then y : f y (delete y zs) else g ys
%o A259260 -- _Reinhard Zumkeller_, Jun 29 2015
%Y A259260 Cf. A034175, A086517.
%Y A259260 Cf. A010052, A005408.
%Y A259260 Cf. A259602, A259565, A259429, A259542.
%K A259260 nonn
%O A259260 1,2
%A A259260 _Derek Orr_, Jun 22 2015