login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A128549 Difference between triangular number and next perfect square. 2
3, 1, 3, 6, 1, 4, 8, 13, 4, 9, 15, 3, 9, 16, 1, 8, 16, 25, 6, 15, 25, 3, 13, 24, 36, 10, 22, 35, 6, 19, 33, 1, 15, 30, 46, 10, 26, 43, 4, 21, 39, 58, 15, 34, 54, 8, 28, 49, 71, 21, 43, 66, 13, 36, 60, 4, 28, 53, 79, 19, 45, 72, 9, 36, 64, 93, 26, 55, 85, 15, 45, 76, 3, 34, 66, 99, 22 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

If a(n)=1 then such n gives the sequence A006451 (triangular numbers whose distance to the nearest bigger perfect square is 1). [From Ctibor O. Zizka, Oct 07 2009]

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

FORMULA

a(n) = (floor(sqrt(n(n+1)/2))+1)^2-n(n+1)/2.

EXAMPLE

a(1)=2^2-1(1+1)/2=3, a(2)=2^2-2(2+1)/2=1, a(3)=3^2-3(3+1)/2=3, a(3)=4^2-4(4+1)/2=6.

MAPLE

f:= n -> (floor(sqrt(n*(n+1)/2))+1)^2-n*(n+1)/2:

map(f, [$1..100]); # Robert Israel, Jan 21 2020

MATHEMATICA

Table[(Floor[Sqrt[n(n+1)/2]]+1)^2-n(n+1)/2, {n, 100}]

(Floor[Sqrt[#]]+1)^2-#&/@Accumulate[Range[100]] (* Harvey P. Dale, Oct 15 2014 *)

CROSSREFS

Cf. A000217, A000290, A006451.

Sequence in context: A181843 A131111 A336574 * A055885 A181425 A174505

Adjacent sequences:  A128546 A128547 A128548 * A128550 A128551 A128552

KEYWORD

nonn

AUTHOR

Zak Seidov, May 08 2007

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 October 22 01:48 EDT 2021. Contains 348160 sequences. (Running on oeis4.)