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.

Showing 1-4 of 4 results.

A130280 a(n) = smallest integer k>1 such that n(k^2-1)+1 is a perfect square, or 0 if no such number exists.

Original entry on oeis.org

2, 5, 3, 0, 2, 3, 5, 2, 0, 3, 7, 5, 4, 11, 3, 2, 4, 13, 9, 7, 2, 5, 19, 4, 0, 5, 21, 3, 11, 9, 11, 14, 2, 29, 5, 3, 6, 31, 21, 2, 13, 11, 13, 169, 3, 7, 41, 6, 0, 7, 5, 11, 22, 419, 3, 2, 5, 23, 461, 27, 8, 55, 7, 4, 2, 3, 49, 29
Offset: 1

Views

Author

M. F. Hasler, May 20 2007, May 25 2007

Keywords

Comments

A084702(n) = a(n)^2-1, resp. a(n) = sqrt(A084702(n)+1). See A130283 for values where A130280(n)=0.

Examples

			a( (2k)^2 ) <= k since (2k)^2(k^2-1)+1 = (2k^2-1)^2 (but k=1 is excluded since with k^2-1=0 this would be a trivial solution for any n).
		

Crossrefs

Programs

  • Maple
    A130280:=proc(n) local x,y,z; if n=1 then return 2 fi; isolve(n*(x^2-1)+1=y^2,z); select(has,`union`(%),x); map(rhs,%); simplify(eval(%,z=1) union eval(%,z=0)) minus {-1,1}; if %={} then 0 else (min@op@map)(abs,%) fi end;
  • Mathematica
    $MaxExtraPrecision = 100;
    r[n_, c_] := Reduce[k > 1 && j > 1 && n*(k^2 - 1) + 1 == j^2, {j, k}, Integers] /. C[1] -> c // Simplify;
    a[n_] := If[rn = r[n,0] || r[n,1] || r[n,2]; rn === False, 0, k /. {ToRules[rn]} // Min];
    Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 1, 800}] (* Jean-François Alcover, May 12 2017 *)
  • PARI
    {A130280(n,L=10^15)=if(issquare(n),L=2+sqrtint(n>>2)); for( k=2, L, if( issquare(n*(k^2-1)+1),return(k)))}

Formula

If n=(2k)^2, then A130280(n) <= k, since (2k)^2(k^2-1)+1 = (2k^2-1)^2. See A130281 for the cases where equality does not hold. If n=k^2-1, then A130280(n) <= k-1 since (k^2-1)((k-1)^2-1)+1 = (k^2-k-1)^2. See A130282 for the cases where equality does not hold.

A130283 Integers n > 0 for which A130280(n) = 0, i.e., such that there is no integer m > 1 for which n(m^2 - 1) + 1 is a square.

Original entry on oeis.org

4, 9, 25, 49, 81, 121, 169, 289, 361, 441, 529, 625, 729, 841, 961, 1089, 1369, 1521, 1681, 1849, 2025, 2209, 2401, 2601, 2809, 3025, 3249, 3481, 3721, 4225, 4489, 4761, 5041, 5329, 5625, 5929, 6241, 6561, 6889, 7225, 7569, 7921, 8281, 8649, 9025, 9409
Offset: 1

Views

Author

M. F. Hasler, May 24 2007

Keywords

Comments

No term > 4 in this sequence is an even square (see formula in A130280).
A001248(k) is a term for any k. - Jinyuan Wang, Apr 14 2019

Examples

			a(1)=4 since 1(2^2-1)+1=2^2, 2(5^2-1)+1=7^2, 3(3^2-1)+1=5^2 but 4(m^2-1)+1 = 4m^2-3 can't be a square because the largest square < 4m^2 is (2m-1)^2 = 4m^2-4m+1 < 4m^2-3 for m>1.
a(2)=9 since for n=5,6,7,8 one has m=2,3,5,2, but 9(m^2-1)+1 = 9m^2-8 > 9m^2-11 >= 9m^2-6m+1 = (3m-1)^2 and therefore can't be a square.
		

Crossrefs

Programs

  • Mathematica
    $MaxExtraPrecision = 200;
    r[n_, c_] := Reduce[k > 1 && j > 1 && n*(k^2 - 1) + 1 == j^2, {j, k}, Integers] /. C[1] -> c // Simplify;
    A130280[n_] := If[rn = r[n, 0] || r[n, 1] || r[n, 2]; rn === False, 0, k /. {ToRules[rn]} // Min];
    Reap[For[n=1, n <= 2000, n++, If[A130280[n]==0, Print[n]; Sow[n]]]][[2,1]] (* Jean-François Alcover, May 12 2017 *)
  • PARI
    f(n) = for(k=2, n+1, if( issquare(n*(k^2-1)+1), return(k)))
    is(n) = issquare(n) && f(n) == 0; \\ Jinyuan Wang, Apr 14 2019

Extensions

More terms from Jean-François Alcover, May 12 2017
More terms from Jinyuan Wang, Apr 14 2019

A130288 Record indices of A130280: integers n>0 for which min{ m>1 | (2n+1)^2(m^2-1)+1 is a square} < oo but bigger than for all preceding n.

Original entry on oeis.org

1, 2, 11, 14, 18, 23, 27, 34, 38, 44, 54, 59, 74, 158, 179, 284, 524
Offset: 1

Views

Author

M. F. Hasler, May 24 2007

Keywords

Comments

Most elements of this sequence seem to be 1,2 or 4 times a prime.
Corresponding values of A130280 are given in A130289. - M. F. Hasler, May 24 2007

Crossrefs

Programs

  • PARI
    A130288(L=999,S=1)={local(R,T);for(n=S,L, if(issquare(n) || R>=T=A130280(n),next); print1(n", ");R=T)}

A130289 Record values in A130280: minima of { m>1 | (2n+1)^2(m^2-1)+1 is a square} bigger than for all preceding n.

Original entry on oeis.org

3, 5, 7, 11, 13, 19, 21, 29, 31, 169, 419, 461, 3269, 7127, 3877019, 22783559, 215308729
Offset: 1

Views

Author

M. F. Hasler, May 24 2007

Keywords

Comments

Most elements of this sequence seem to be 1,2 or 4 times a prime.

Crossrefs

Programs

  • PARI
    A130289( L=999, S=1 )={ local( R, T ); for( n=S, L, if( issquare(n) || R >= T = A130280(n), next ); print1( T ", " ); R=T )}
Showing 1-4 of 4 results.