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.

A229131 Numbers k such that the distance between the k-th triangular number and the nearest square is exactly 1.

This page as a plain text file.
%I A229131 #13 Jul 14 2021 08:45:09
%S A229131 1,2,4,5,15,25,32,90,148,189,527,865,1104,3074,5044,6437,17919,29401,
%T A229131 37520,104442,171364,218685,608735,998785,1274592,3547970,5821348,
%U A229131 7428869,20679087,33929305,43298624
%N A229131 Numbers k such that the distance between the k-th triangular number and the nearest square is exactly 1.
%C A229131 The k-th triangular number (A000217(k)) is a square plus or minus one.
%C A229131 Union of A006451 (k-th triangular number is a square minus one) and A072221 (k-th triangular number is a square plus one).
%F A229131 G.f.: (-x^7 + 2*x^6 - 2*x^5 + 4*x^4 - 5*x^3 + 2*x^2 + x + 1)/((1-6*x^3+x^6)*(1-x)) (conjectured).
%e A229131 A000217(4)=10 and 10 - 3^2 = 1 so 4 is in the sequence.
%e A229131 A000217(5)=15 and 4^2 - 15 = 1 so 5 is in the sequence.
%o A229131 (PARI) for(n=1,10^8,for(i=-1,1,f=0;if(i&&issquare(n*(n+1)/2+i),f=1;break));if(f,print1(n,",")))
%Y A229131 Cf. A000217, A001110, A006451, A072221, A229083, A229118.
%K A229131 nonn
%O A229131 1,2
%A A229131 _Ralf Stephan_, Sep 15 2013