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!)
A232179 Least k >= 0 such that n^2 + triangular(k) is a triangular number. 4
0, 0, 3, 1, 15, 2, 0, 3, 63, 4, 8, 5, 11, 6, 20, 3, 255, 8, 1, 9, 3, 10, 38, 11, 59, 12, 45, 13, 8, 14, 2, 15, 1023, 16, 59, 0, 24, 18, 66, 19, 51, 20, 3, 21, 44, 10, 80, 23, 251, 24, 42, 25, 68, 26, 4, 27, 39, 28, 101, 29, 10, 30, 108, 8, 4095, 32, 5, 33, 128 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Triangular(k) = k*(k+1)/2.

LINKS

Chai Wah Wu, Table of n, a(n) for n = 0..10000

FORMULA

a(A001109(n)) = 0.

MATHEMATICA

TriangularQ[n_] := IntegerQ[Sqrt[1 + 8*n]]; Table[k = 0; While[! TriangularQ[n^2 + k*(k + 1)/2], k++]; k, {n, 0, 68}] (* T. D. Noe, Nov 21 2013 *)

PROG

(Python)

from __future__ import division

from sympy import divisors

def A232179(n):

    if n == 0:

        return 0

    t = 2*n**2

    ds = divisors(t)

    for i in range(len(ds)//2-1, -1, -1):

        x = ds[i]

        y = t//x

        a, b = divmod(y-x, 2)

        if b:

            return a

    return -1 # Chai Wah Wu, Sep 12 2017

(PARI) a(n) = {my(k = 0); while (! ispolygonal(n^2 + k*(k+1)/2, 3), k++); k; } \\ Michel Marcus, Sep 15 2017

CROSSREFS

Cf. A000217, A000290, A001109.

Cf. A082183 (least k>0 such that triangular(n) + triangular(k) is a triangular number).

Cf. A232177 (least k>0 such that triangular(n) + triangular(k) is a square).

Cf. A232176 (least k>0 such that n^2 + triangular(k) is a square).

Cf. A101157 (least k>0 such that triangular(n) + k^2 is a triangular number).

Cf. A232178 (least k>=0 such that triangular(n) + k^2 is a square).

Sequence in context: A318142 A176727 A080924 * A128042 A108083 A163239

Adjacent sequences:  A232176 A232177 A232178 * A232180 A232181 A232182

KEYWORD

nonn

AUTHOR

Alex Ratushnyak, Nov 20 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 April 15 08:58 EDT 2021. Contains 342977 sequences. (Running on oeis4.)