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.

A348635 a(n) is the smallest positive number k coprime to (2n+1)!! such that (2n+1)!! + k^2 is a square.

Original entry on oeis.org

1, 1, 4, 4, 29, 17, 436, 356, 569, 1847, 27704, 72944, 1283333, 726079, 23833532, 45232276, 302068799, 616565857, 26369361188, 23157514888, 70991664061, 505527042479, 1150735735948, 13238389944712, 58668785675111, 209280259070287, 7809609503808088, 530566746979816
Offset: 1

Views

Author

Richard Peterson, Dec 13 2021

Keywords

Comments

a(n) always exists since the set of k coprime to (2n+1)!! and with (2n+1)!! + k^2 equal to a square is nonempty, because k = ((2n+1)!!-1)/2 is in the set.

Examples

			a(5)=29 since 106^2 - 29^2 = 10395 = 3*5*7*9*11 and 29 is relatively prime to 10395 and is as small as possible.
		

Crossrefs

Programs

  • PARI
    df(n) = (2*n)! / n! / 2^n; \\ A001147
    a(n) = my(d=df(n+1), k=1); while (!((gcd(d,k)==1) && issquare(d+k^2)), k++); k; \\ Michel Marcus, Jan 06 2022
    
  • PARI
    df(n) = (2*n)! / n! / 2^n; \\ A001147
    a(n) = my(d=df(n+1), m=sqrtint(d), k); while (!(issquare(m^2-d, &k) && gcd(d,k)==1), m++); k; \\ Michel Marcus, Jan 06 2022

Extensions

a(21)-a(24) and a(28) from Jon E. Schoenfield, Jan 06 2022
a(25)-a(27) from Jinyuan Wang, Jan 07 2022