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.

A345700 Numbers whose square can be represented in exactly two ways as the sum of a positive square and a positive fourth power.

Original entry on oeis.org

65, 145, 260, 580, 585, 1025, 1040, 1105, 1305, 2320, 2340, 2465, 3185, 3625, 4100, 4160, 4335, 4420, 4810, 5220, 5265, 6625, 7105, 7585, 7865, 8405, 9225, 9280, 9360, 9860, 9945, 10985, 11745, 12740, 14500, 16400, 16465, 16640, 17340, 17545, 17680, 19240
Offset: 1

Views

Author

Karl-Heinz Hofmann, Jun 24 2021

Keywords

Comments

Terms are numbers z such that there are exactly two solutions to z^2 = x^2 + y^4, where x, y and z belong to the set of positive integers.
Terms cannot be a square (see the comment from Altug Alkan in A111925).
Terms must have at least one prime factor of the form p == 1 (mod 4), a Pythagorean prime (A002144).
If the terms additionally have prime factors of the form p == 3 (mod 4), which are in A002145, then they must appear in the prime divisor sets of x and y too.
The lower limit of the ratio x/y is sqrt(2).

Examples

			29679^2 = 29640^2 + 39^4, so 29679 is not a term (only one solution).
17680^2 = 15088^2 + 96^4 = 17472^2 + 52^4, so 17680 is a term.
36900^2 = 36000^2 + 90^4 = 36828^2 + 48^4, so 36900 is a term.
18785^2 = 18207^2 + 68^4 = 17340^2 + 85^4 = 13983^2 + 112^4, so 18785 is not a term (three solutions).
		

Crossrefs

Cf. A111925, A271576, A345645 (in exactly 1 way), A345968 (in exactly 3 ways), A346110 (in exactly 4 ways), A348655 (in exactly 5 ways), A349324 (in exactly 6 ways), A346115 (the least solutions).
Cf. A002144 (p == 1 (mod 4)), A002145 (p == 3 (mod 4)).

Programs

  • PARI
    inlist(list, v) = for (i=1, #list, if (list[i]==v, return(1)));
    isok(m) = {my(list = List()); for (k=1, sqrtnint(m^2, 4), if (issquare(j=m^2-k^4) && !inlist(vecsort([k^4,j^2])), listput(list, vecsort([k^4,j^2])));); #list == 2;} \\ Michel Marcus, Jun 26 2021
    
  • PARI
    is(n)=my(n2=n^2,s); for(y=sqrtnint(2*n-2,4)+1,sqrtint(n-1), if(issquare(n2-y^4) && s++>2, return(0))); s==2; \\ Charles R Greathouse IV, Jul 02 2021
  • Python
    # see link above.