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.

A357945 Numbers k which are not square but D = (b+c)^2 - k is square, where b = floor(sqrt(k)) and c = k - b^2.

Original entry on oeis.org

5, 13, 28, 65, 69, 76, 125, 128, 189, 205, 300, 305, 325, 352, 413, 425, 532, 533, 544, 565, 693, 725, 793, 828, 860, 1025, 1036, 1045, 1105, 1141, 1248, 1449, 1469, 1504, 1525, 1708, 1885, 1917, 1965, 2125, 2240, 2353, 2380, 2501, 2533, 2548, 2812, 2816, 2825, 2829, 2844, 2873, 2893
Offset: 1

Views

Author

DarĂ­o Clavijo, Oct 21 2022

Keywords

Comments

All composite terms are included in A177713.
Terms are the difference of two perfect squares k = (b+c)^2 - d^2, where d = sqrt(D), and so if composite are factorizable by Fermat's method k = ((b+c) + d) * ((b+c) - d).

Examples

			8525 is a term since it's not square and b = floor(sqrt(k)) = 92 and c = k - b^2 = 61 gives D = (b+c)^2 - k = 14884 which is square (122^2).
		

Crossrefs

Subsequence of A042965 and of A000037.
A211412 is a subsequence.

Programs

  • PARI
    isok(k) = if (!issquare(k), my(b=sqrtint(k), c=k-b^2); issquare((b+c)^2 - k)); \\ Michel Marcus, Oct 23 2022
  • Python
    from gmpy2 import *
    def is_A357945(n):
      if not is_square(n):
        b,c = isqrt_rem(n)
        return is_square(c*(2*b+c-1))
      else:
        return False
    

Formula

1.6*n < a(n) <= 4n^4 + 1. (Improvements welcome!) - Charles R Greathouse IV, Oct 23 2022