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.
%I A365892 #16 Oct 06 2023 05:00:16 %S A365892 1,4,9,11,20,22,35,37,54,56,77,79,104,106,135,137,170,172,209,211,252, %T A365892 254,299,301,350,352,405,407,464,466,527,529,594,596,665,667,740,742, %U A365892 819,821,902,904,989,991,1080,1082,1175,1177,1274,1276,1377,1379,1484,1486 %N A365892 a(n) is the index of the n-th term of A365876 that includes at least one equation with at least one integer solution. %C A365892 Observation (checked up to a(52)): a(n) = A266257(n) for n >= 2. %C A365892 Conjectures in formula section hold for 2<=n<=300. - _Chai Wah Wu_, Oct 05 2023 %F A365892 Conjectures (see also A266257): (Start) %F A365892 a(1) = 1, a(n) = ((n + 1)^2 - (-1)^n*(n - 1))/2 for n >= 2. %F A365892 a(1) = 1, a(2) = 4, a(3) = 9, a(4) = 11, a(5) = 20, a(6) = 22, a(n) = a(n - 1) + 2*a(n - 2) - 2*a(n - 3) - a(n - 4) + a(n - 5) for n >= 7. %F A365892 G.f.: (1 + x + 3*x^3 - x^4)/((1 - x)^3*(1 + x)^2). (End) %e A365892 a(1) = 1 since the equation x^2 = 0 belonging to A365876(1) has the integer solution 0. 1 is the 1st term that includes at least one equation with at least one integer solution. %e A365892 a(2) = 4 since the equation 2*x^2 + x - 1 = 0 belonging to A365876(4) has the integer solution -1. 4 is the 2nd term that includes at least one equation with at least one integer solution. %e A365892 a(3) = 9 since the equation -x^2 + 4*x - 1 = 0 belonging to A365876(9) has the integer solution 2. 9 is the 3rd term that includes at least one equation with at least one integer solution. %e A365892 a(4) = 11 since the equation 3*x^2 + 4*x - 4 = 0 belonging to A365876(11) has the integer solution -2. 11 is the 4th term that includes at least one equation with at least one integer solution. %p A365892 A365892 := proc(n_A365876) local u, v, a, min, x_1, x_2; u := n_A365876; v := 0; a := false; min := true; while min = true do if u <> 0 and gcd(u, v) = 1 then x_1 := 1/2*(-v + sqrt(v^2 + 4*v*u))/u; x_2 := 1/2*(-v - sqrt(v^2 + 4*v*u))/u; if x_1 = floor(x_1) or x_2 = floor(x_2) then a := true; end if; end if; u := u - 2; v := 1/2*n_A365876 - 1/2*abs(u); if u < -1/9*n_A365876 then min := false; end if; end do; if a = true then return n_A365876; end if; end proc; seq(A365892(n_A365876), n_A365876 = 1 .. 1486); %o A365892 (Python) %o A365892 from math import gcd %o A365892 from itertools import count, islice %o A365892 from sympy import integer_nthroot %o A365892 def A365892_gen(startvalue=1): # generator of terms >= startvalue %o A365892 for n in count(max(startvalue,1)): %o A365892 if n == 1: %o A365892 yield 1 %o A365892 else: %o A365892 for v in range(1,n+1>>1): %o A365892 u = n-(v<<1) %o A365892 if gcd(u,v)==1: %o A365892 v2, u2, a = v*v, v*(u<<2), u<<1 %o A365892 if v2+u2 >= 0: %o A365892 d,r = integer_nthroot(v2+u2,2) %o A365892 if r and not ((d+v)%a and (d-v)%a): %o A365892 yield n %o A365892 break %o A365892 if v2-u2 >= 0: %o A365892 d,r = integer_nthroot(v2-u2,2) %o A365892 if r and not ((d+v)%a and (d-v)%a): %o A365892 yield n %o A365892 break %o A365892 A365892_list = list(islice(A365892_gen(),20)) # _Chai Wah Wu_, Oct 04 2023 %Y A365892 Cf. A364384, A364385, A365876, A365877. %K A365892 nonn %O A365892 1,2 %A A365892 _Felix Huber_, Sep 22 2023