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.

A241521 Numbers k such that k^2 == -1 (mod 97).

Original entry on oeis.org

22, 75, 119, 172, 216, 269, 313, 366, 410, 463, 507, 560, 604, 657, 701, 754, 798, 851, 895, 948, 992, 1045, 1089, 1142, 1186, 1239, 1283, 1336, 1380, 1433, 1477, 1530, 1574, 1627, 1671, 1724, 1768, 1821, 1865, 1918, 1962, 2015, 2059, 2112, 2156, 2209, 2253
Offset: 1

Views

Author

Vincenzo Librandi, Apr 25 2014

Keywords

Comments

Numbers k such that k == 22 or 75 (mod 97).

Crossrefs

Cf. similar sequences listed in A155107.

Programs

  • Magma
    I:=[22,75,119]; [n le 3 select I[n] else Self(n-1)+Self(n-2)-Self(n-3): n in [1..50]];
    
  • Magma
    [-22*(-1)^n+97*Floor(n/2): n in [1..50]];
  • Mathematica
    Select[Range[1800], PowerMod[#, 2, 97] == 96 &] (* or *) CoefficientList[Series[(22 + 53 x + 22 x^2)/((1 + x) (1 - x)^2), {x, 0, 100}], x]

Formula

G.f.: x*(22 + 53*x + 22*x^2)/((1 + x)*(1 - x)^2).
a(n) = a(n-1) + a(n-2) - a(n-3) for n>2.
a(n) = a(n-2) + 97 for all n>2.
a(n) = -22*(-1)^n + 97*floor(n/2).