cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A253181 Numbers n such that the distance between n^3 and the nearest square is less than n.

Original entry on oeis.org

1, 2, 3, 4, 5, 9, 13, 15, 16, 17, 25, 32, 35, 36, 37, 40, 43, 46, 49, 52, 56, 63, 64, 65, 81, 99, 100, 101, 109, 121, 136, 143, 144, 145, 152, 158, 169, 175, 190, 195, 196, 197, 225, 243, 255, 256, 257, 289, 312, 317, 323, 324, 325, 331, 336, 351, 356, 361, 366, 377
Offset: 1

Views

Author

Alex Ratushnyak, Mar 23 2015

Keywords

Comments

Distance can be zero, that is, cubes that are squares are included.
Numbers n such that A002938(n) < n.

Examples

			The distance between 5^3=125 and the nearest square 11^2=121 is less than 5, so 5 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    dnsQ[n_]:=Module[{n3=n^3,sr},sr=Sqrt[n3];Min[n3-Floor[sr]^2, Ceiling[ sr]^2- n3]Harvey P. Dale, Dec 23 2015 *)
  • Python
    def isqrt(a):
        sr = 1 << (int.bit_length(int(a)) >> 1)
        while a < sr*sr:  sr>>=1
        b = sr>>1
        while b:
            s = sr + b
            if a >= s*s:  sr = s
            b>>=1
        return sr
    for n in range(1000):
        cube = n*n*n
        r = isqrt(cube)
        sqr = r**2
        if cube-sqr < n or sqr+2*r+1-cube < n:  print(str(n), end=',')

A268510 Numbers x such that x^2 = y^3 + z (0 < abs(z) < y).

Original entry on oeis.org

3, 5, 11, 47, 58, 70, 181, 207, 225, 253, 282, 312, 375, 419, 500, 524, 985, 1015, 1138, 1586, 1710, 1746, 1874, 1986, 2315, 2619, 2723, 2765, 3788, 4072, 4120, 5511, 5644, 5805, 5859, 6022, 6159, 6576, 6717, 7002, 7320, 7970, 8030, 8669, 10615, 10681, 13252, 13537, 13788, 13860, 14113, 14404, 16725, 17537, 17615
Offset: 1

Views

Author

Daniel Mondot, Feb 06 2016

Keywords

Comments

List of n such as n^2 is a near cube (see examples).
Numbers x such that x^2 = y^3 + 0 (e.g. 1000^2 = 100^3) are omitted.
Note that a delta of 17 appears often. See A029728.

Examples

			3^2 = 2^3 + 1
5^2 = 3^3 - 2
11^2 = 5^3 - 4
47^2 = 13^3 + 12
58^2 = 15^3 - 11
70^2 = 17^3 - 13
181^2 = 32^3 - 7
207^2 = 35^3 - 26
225^2 = 37^3 - 28
253^2 = 40^3 + 9
282^2 = 43^3 + 17
312^2 = 46^3 + 8
375^2 = 52^3 + 17
419^2 = 56^3 - 55
500^2 = 63^3 - 47
524^2 = 65^3 - 49
985^2 = 99^3 - 74
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 5000, Resolve@ Exists[{y, z}, And[Reduce[#^2 == (y^3 + z), {y, z}, Integers], 0 < Abs@ z < y]] &] (* Michael De Vlieger, Feb 07 2016 *)
Showing 1-2 of 2 results.