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.

A151971 Numbers n such that n^2 - n is divisible by 21.

Original entry on oeis.org

0, 1, 7, 15, 21, 22, 28, 36, 42, 43, 49, 57, 63, 64, 70, 78, 84, 85, 91, 99, 105, 106, 112, 120, 126, 127, 133, 141, 147, 148, 154, 162, 168, 169, 175, 183, 189, 190, 196, 204, 210, 211, 217, 225, 231, 232, 238, 246, 252, 253, 259, 267, 273, 274, 280, 288, 294, 295, 301, 309
Offset: 1

Views

Author

N. J. A. Sloane, Aug 23 2009

Keywords

Comments

Equivalently, numbers that are congruent to {0, 1, 7, 15} mod 21. - Bruno Berselli, Aug 06 2012

Crossrefs

For m^2 == m (mod n), see: n=2: A001477; n=3: A032766; n=4: A042948; n=5: A008851; n=6: A032766; n=7: A047274; n=8: A047393; n=9: A090570; n=10: A008851; n=11: A112651; n=12: A112652; n=13:A112653; n=14: A047274; n=15: A151972; n=16: A151977; n=17: A151978; n=18: A090570; n=19: A151979; n=20: A151980; n=21: A151971; n=22: A112651; n=24: A151973; n=26: A112653; n=30: A151972; n=32: A151983; n=34: A151978; n=38: A151979; n=42: A151971; n=48: A151981; n=64: A151984.
Cf. A215202.

Programs

  • Magma
    [n: n in [0..309] | IsZero((n^2-n) mod 21)]; // Bruno Berselli, Aug 06 2012
    
  • Maple
    A151971:=n->(42*n+14*I^((n-1)*n)-3*I^(2*n)-3)/8-7: seq(A151971(n), n=1..100); # Wesley Ivan Hurt, Jun 07 2016
  • Mathematica
    Select[Range[0,400], Divisible[#^2-#,21]&] (* Harvey P. Dale, Jun 04 2012 *)
  • Maxima
    makelist((42*n+14*%i^((n-1)*n)-3*(-1)^n-3)/8-7, n, 1, 60); /* Bruno Berselli, Aug 06 2012 */

Formula

From Bruno Berselli, Aug 06 2012: (Start)
G.f.: x^2*(1+6*x+8*x^2+6*x^3)/((1+x)*(1-x)^2*(1+x^2)).
a(n) = (42*n +14*i^((n-1)*n) -3*(-1)^n -3)/8 -7, where i=sqrt(-1). (End)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5. - Wesley Ivan Hurt, Jun 07 2016
E.g.f.: (24 + (21*x - 31)*cosh(x) + 7*(sin(x) + cos(x) + (3*x - 4)*sinh(x)))/4. - Ilya Gutkovskiy, Jun 07 2016