The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A232175 Least positive k such that n^3 + k^2 is a square, or 0 if there is no such k. 3
0, 1, 3, 6, 10, 3, 21, 8, 36, 15, 55, 6, 78, 35, 15, 48, 136, 27, 171, 10, 42, 99, 253, 10, 300, 143, 81, 42, 406, 15, 465, 64, 88, 255, 35, 63, 666, 323, 91, 3, 820, 21, 903, 55, 66, 483, 1081, 48, 1176, 125, 85, 39, 1378, 81, 165, 28, 76, 783, 1711, 15, 1830, 899, 63 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Numbers n such that a(n) = n*(n-1)/2 appear to be A000430.
n = 1 is the only number for which a(n) = 0. - T. D. Noe, Nov 21 2013
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000 (n = 1..1000 from T. D. Noe).
MATHEMATICA
Join[{0}, Table[k = 1; While[! IntegerQ[Sqrt[n^3 + k^2]], k++]; k, {n, 2, 100}]] (* T. D. Noe, Nov 21 2013 *)
PROG
(Python)
import math
for n in range(77):
n3 = n*n*n
y=1
for k in range(1, 10000001):
sum = n3 + k*k
r = int(math.sqrt(sum))
if r*r == sum:
print str(k)+', ',
y=0
break
if y: print '-, ',
(Python)
from __future__ import division
from sympy import divisors
def A232175(n):
n3 = n**3
ds = divisors(n3)
for i in range(len(ds)//2-1, -1, -1):
x = ds[i]
y = n3//x
a, b = divmod(y-x, 2)
if not b:
return a
return 0 # Chai Wah Wu, Sep 12 2017
(PARI) a(n) = {k = 1; while (!issquare(n^3+k^2), k++); k; } \\ Michel Marcus, Nov 20 2013
CROSSREFS
Sequence in context: A333611 A329153 A337771 * A065234 A333531 A082184
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Nov 19 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 May 17 17:07 EDT 2024. Contains 372603 sequences. (Running on oeis4.)