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.

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