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.
%I A151971 #37 Sep 08 2022 08:45:38 %S A151971 0,1,7,15,21,22,28,36,42,43,49,57,63,64,70,78,84,85,91,99,105,106,112, %T A151971 120,126,127,133,141,147,148,154,162,168,169,175,183,189,190,196,204, %U A151971 210,211,217,225,231,232,238,246,252,253,259,267,273,274,280,288,294,295,301,309 %N A151971 Numbers n such that n^2 - n is divisible by 21. %C A151971 Equivalently, numbers that are congruent to {0, 1, 7, 15} mod 21. - _Bruno Berselli_, Aug 06 2012 %H A151971 Vincenzo Librandi, <a href="/A151971/b151971.txt">Table of n, a(n) for n = 1..1000</a> %H A151971 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1). %F A151971 From _Bruno Berselli_, Aug 06 2012: (Start) %F A151971 G.f.: x^2*(1+6*x+8*x^2+6*x^3)/((1+x)*(1-x)^2*(1+x^2)). %F A151971 a(n) = (42*n +14*i^((n-1)*n) -3*(-1)^n -3)/8 -7, where i=sqrt(-1). (End) %F A151971 a(n) = a(n-1) + a(n-4) - a(n-5) for n>5. - _Wesley Ivan Hurt_, Jun 07 2016 %F A151971 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 %p A151971 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 %t A151971 Select[Range[0,400], Divisible[#^2-#,21]&] (* _Harvey P. Dale_, Jun 04 2012 *) %o A151971 (Magma) [n: n in [0..309] | IsZero((n^2-n) mod 21)]; // _Bruno Berselli_, Aug 06 2012 %o A151971 (Maxima) makelist((42*n+14*%i^((n-1)*n)-3*(-1)^n-3)/8-7, n, 1, 60); /* _Bruno Berselli_, Aug 06 2012 */ %Y A151971 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. %Y A151971 Cf. A215202. %K A151971 nonn,easy %O A151971 1,3 %A A151971 _N. J. A. Sloane_, Aug 23 2009