login
Integers of the form k^2 + 1, where k >= 1, that are the product of two other integers of the form k^2 + 1, where k >= 1.
1

%I #36 May 10 2024 04:09:02

%S 10,50,170,290,325,442,962,1850,2210,3250,5330,8282,9802,12322,15130,

%T 17425,17690,24650,33490,44522,58082,58565,64010,65026,74530,94250,

%U 103685,117650,145162,177242,191845,214370,237170,257050,305810,332930,361202

%N Integers of the form k^2 + 1, where k >= 1, that are the product of two other integers of the form k^2 + 1, where k >= 1.

%C This sequence is the sequence of possible c^2 + 1 values of all triples of positive integers (a,b,c) such that (a^2 + 1)*(b^2 + 1) = c^2 + 1.

%C A001541(n)^2 + 1 is always a term of this sequence for all n > 0. This is because A001541 consists of the x-values of the solutions to the Pell equation x^2 - 2y^2 = 1 which is equivalent to x^2 + 1 = 2*(y^2 + 1) = (1^2 + 1)*(y^2 + 1).

%C A002061(n)^2 + 1 is always a term of this sequence for all n > 1. This is because A002061 consists of the integers of the form k^2 + k + 1 and (k^2 + k + 1)^2 + 1 = (k^2 + 1)*((k+1)^2 + 1).

%H Ely Golden, <a href="/A372496/b372496.txt">Table of n, a(n) for n = 1..10667</a> (terms <= 10^16)

%e 50 is a term since 50 = 7^2 + 1 = 10 * 5 = (3^2 + 1)*(2^2 + 1).

%t formQ[k_] := k >= 1 && IntegerQ@Sqrt[k - 1];

%t prodQ[k_] := AnyTrue[Divisors[k][[2 ;; -2]], formQ[#] && formQ[k/#]&];

%t okQ[k_] := formQ[k] && prodQ[k];

%t Select[Range[2, 10^6], okQ] (* _Jean-François Alcover_, May 10 2024 *)

%o (Python)

%o from math import isqrt

%o def is_perfect_square(n): return isqrt(abs(n))**2 == n

%o limit = 10**16

%o sequence_entries = set()

%o for a in range(1, isqrt(isqrt(limit))+1):

%o u = a**2 + 1

%o for b in range(a+1, isqrt(limit//u)+1):

%o v = b**2 + 1

%o if(is_perfect_square(u*v - 1)): sequence_entries.add(u*v)

%o sequence_entries = sorted(sequence_entries)

%o for i, j in enumerate(sequence_entries, 1):

%o print(i, j)

%o (PARI) isok1(k) = issquare(k-1) && (k>1);

%o isok2(k) = fordiv(k, d, if (isok1(d) && isok1(k/d), return(1)));

%o isok(k) = isok1(k) && isok2(k); \\ _Michel Marcus_, May 04 2024

%Y Intersection of A002522 and A135280.

%Y Cf. A001541, A002061.

%K nonn

%O 1,1

%A _Ely Golden_, May 03 2024