login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 5
1, 4, 9, 11, 20, 22, 35, 37, 54, 56, 77, 79, 104, 106, 135, 137, 170, 172, 209, 211, 252, 254, 299, 301, 350, 352, 405, 407, 464, 466, 527, 529, 594, 596, 665, 667, 740, 742, 819, 821, 902, 904, 989, 991, 1080, 1082, 1175, 1177, 1274, 1276, 1377, 1379, 1484, 1486 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Observation (checked up to a(52)): a(n) = A266257(n) for n >= 2.
Conjectures in formula section hold for 2<=n<=300. - Chai Wah Wu, Oct 05 2023
LINKS
FORMULA
Conjectures (see also A266257): (Start)
a(1) = 1, a(n) = ((n + 1)^2 - (-1)^n*(n - 1))/2 for n >= 2.
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.
G.f.: (1 + x + 3*x^3 - x^4)/((1 - x)^3*(1 + x)^2). (End)
EXAMPLE
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.
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.
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.
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.
MAPLE
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);
PROG
(Python)
from math import gcd
from itertools import count, islice
from sympy import integer_nthroot
def A365892_gen(startvalue=1): # generator of terms >= startvalue
for n in count(max(startvalue, 1)):
if n == 1:
yield 1
else:
for v in range(1, n+1>>1):
u = n-(v<<1)
if gcd(u, v)==1:
v2, u2, a = v*v, v*(u<<2), u<<1
if v2+u2 >= 0:
d, r = integer_nthroot(v2+u2, 2)
if r and not ((d+v)%a and (d-v)%a):
yield n
break
if v2-u2 >= 0:
d, r = integer_nthroot(v2-u2, 2)
if r and not ((d+v)%a and (d-v)%a):
yield n
break
A365892_list = list(islice(A365892_gen(), 20)) # Chai Wah Wu, Oct 04 2023
CROSSREFS
Sequence in context: A312844 A181448 A329897 * A312845 A312846 A182244
KEYWORD
nonn
AUTHOR
Felix Huber, Sep 22 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 17 05:28 EDT 2024. Contains 375985 sequences. (Running on oeis4.)