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-3 of 3 results.

A076942 Smallest k > 0 such that n*k+1 is a square.

Original entry on oeis.org

3, 4, 1, 2, 3, 4, 5, 1, 7, 8, 9, 2, 11, 12, 1, 3, 15, 16, 17, 4, 3, 20, 21, 1, 23, 24, 25, 6, 27, 4, 29, 7, 3, 32, 1, 8, 35, 36, 5, 2, 39, 4, 41, 10, 8, 44, 45, 1, 47, 48, 5, 12, 51, 52, 8, 3, 7, 56, 57, 2, 59, 60, 1, 15, 3, 8, 65, 16, 7, 12, 69, 4, 71, 72, 9, 18, 15, 8, 77, 1, 79, 80, 81
Offset: 1

Views

Author

Amarnath Murthy, Oct 19 2002

Keywords

Comments

a(n) <= n-2 for n > 2; a(p) = p-2 if p is a prime > 2. [Comment corrected by Floris P. van Doorn, Jan 31 2009]
a(n) = n - 2 precisely when n > 2 has a primitive root; that is, for 4, and p^k and 2*p^k for p an odd prime and k > 0. - Franklin T. Adams-Watters, Apr 13 2009

Crossrefs

Programs

  • Mathematica
    Do[k = 1; While[ !IntegerQ[Sqrt[n*k + 1]], k++ ]; Print[k], {n, 1, 85}]
  • PARI
    a(n) = {my(m = n + 1, k = 1); while(!issquare(m), m += n; k++); k;} \\ Amiram Eldar, Mar 16 2025

Formula

a(n) = ((A215653(n))^2-1)/n.

Extensions

Edited and extended by Robert G. Wilson v, Oct 21 2002

A061369 a(n) = smallest square in the arithmetic progression {n*k+1 : k > 0}.

Original entry on oeis.org

4, 9, 4, 9, 16, 25, 36, 9, 64, 81, 100, 25, 144, 169, 16, 49, 256, 289, 324, 81, 64, 441, 484, 25, 576, 625, 676, 169, 784, 121, 900, 225, 100, 1089, 36, 289, 1296, 1369, 196, 81, 1600, 169, 1764, 441, 361, 2025, 2116, 49, 2304, 2401, 256, 625, 2704, 2809, 441
Offset: 1

Views

Author

Labos Elemer, Jun 08 2001

Keywords

Comments

Each square q appears in several progressions, i.e., in A000005(q-1) cases. Not necessarily as a first square. E.g., q = 81 is minimal in {10*k+1}, {20*k+1}, {40*k+1}, {80*k+1}, while not minimal in {3*k+1} and 5 other progressions. In {16*k+1} 49 comes before 81.

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{m = n + 1}, While[!IntegerQ[Sqrt[m]], m += n]; m]; Array[a, 55] (* Amiram Eldar, Mar 16 2025 *)
  • PARI
    a(n) = {my(m = n + 1); while(!issquare(m), m += n); m;} \\ Amiram Eldar, Mar 16 2025

Formula

a(n) = Min{x^2 : x^2 = n*k+1}.
a(n) = A215653(n)^2. - Amiram Eldar, Mar 16 2025

A215696 a(n)=smallest positive k>n+2 such that k*n+1 is a square.

Original entry on oeis.org

8, 12, 8, 12, 16, 20, 24, 15, 32, 36, 40, 24, 48, 52, 24, 33, 64, 68, 72, 42, 40, 84, 88, 35, 96, 100, 104, 60, 112, 56, 120, 69, 56, 132, 48, 78, 144, 148, 72, 60, 160, 72, 168, 96, 91, 180, 184, 63, 192, 196, 88, 114, 208, 212, 105, 85, 104, 228, 232, 84
Offset: 1

Views

Author

Zak Seidov, Aug 21 2012

Keywords

Comments

For any n and k=n+2, 1+k*n=(n+1)^2, so here we consider the case k>n+2. Cases kA076942, A215653.

Crossrefs

Programs

  • PARI
    for(n=1,100,k=n+3;while(!issquare(1+k*n),k++);print1(k","))
Showing 1-3 of 3 results.