login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A231354 Least k such that n - triangular(k) is a square, or -1 if no such k exists. 1
0, 0, 1, 2, 0, 1, 3, 2, -1, 0, 1, 4, 2, -1, 4, 3, 0, 1, -1, 2, -1, 6, 3, -1, 5, 0, 1, -1, 2, 7, 6, 3, 7, -1, -1, 4, 0, 1, -1, 2, 5, -1, 3, -1, 7, 8, 4, -1, -1, 0, 1, 5, 2, 7, 9, 3, 10, 6, -1, 4, -1, 8, -1, -1, 0, 1, 11, 2, -1, -1, 3, 10, 8, -1, 4, 11, -1, 7, 12, 5, 10, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
Indices of -1's: A014134.
Indices of 0's: A000290.
Indices of 1's: A002522.
LINKS
PROG
(Python)
import math
for n in range(333):
for k in range(1000000):
t = n - k*(k+1)/2
if t<0:
print '-1, ',
break
r = int(math.sqrt(t))
if r*r==t:
print str(k)+', ',
break
CROSSREFS
Sequence in context: A354006 A307226 A263390 * A197119 A124377 A144190
KEYWORD
sign
AUTHOR
Alex Ratushnyak, Nov 08 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 19:49 EDT 2024. Contains 371963 sequences. (Running on oeis4.)