login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A229131 Numbers n such that the distance between the n-th triangular number and the nearest square is exactly 1. 5
1, 2, 4, 5, 15, 25, 32, 90, 148, 189, 527, 865, 1104, 3074, 5044, 6437, 17919, 29401, 37520, 104442, 171364, 218685, 608735, 998785, 1274592, 3547970, 5821348, 7428869, 20679087, 33929305, 43298624 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

The a(n)-th triangular number (A000217) is a square plus or minus one.

Union of A006451 (n-th triangular number is a square minus one) and A072221 (n-th triangular number is a square plus one).

LINKS

Table of n, a(n) for n=1..31.

FORMULA

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).

EXAMPLE

A000217(4)=10 and 10-3^2=1 so 4 is in sequence. A000217(5)=15 and 4^2-15=1 so 5 is in sequence.

PROG

(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, ", ")))

CROSSREFS

Cf. A001110, A229083, A229118.

Sequence in context: A295031 A178436 A328230 * A071316 A056401 A056406

Adjacent sequences:  A229128 A229129 A229130 * A229132 A229133 A229134

KEYWORD

nonn

AUTHOR

Ralf Stephan, Sep 15 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 18 07:22 EST 2019. Contains 329252 sequences. (Running on oeis4.)