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.

A215573 a(n) = n*(n+1)*(2n+1)/6 modulo n.

This page as a plain text file.
%I A215573 #55 Apr 05 2025 09:10:58
%S A215573 0,1,2,2,0,1,0,4,6,5,0,2,0,7,10,8,0,3,0,10,14,11,0,4,0,13,18,14,0,5,0,
%T A215573 16,22,17,0,6,0,19,26,20,0,7,0,22,30,23,0,8,0,25,34,26,0,9,0,28,38,29,
%U A215573 0,10,0,31,42,32,0,11,0,34,46,35,0,12,0,37,50,38
%N A215573 a(n) = n*(n+1)*(2n+1)/6 modulo n.
%C A215573 a(n) = 0 for n = 6k +- 1, that is, A007310 (numbers congruent to 1 or 5 mod 6).
%C A215573 Graph consists of 4 linear patterns.
%H A215573 Zak Seidov, <a href="/A215573/b215573.txt">Table of n, a(n) for n = 1..1000</a>
%H A215573 <a href="/index/Rec#order_12">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,2,0,0,0,0,0,-1).
%F A215573 a(n) = A000330(n) mod n.
%F A215573 From _Colin Barker_, Feb 07 2019: (Start)
%F A215573 G.f.: x^2*(1 + 2*x + 2*x^2 + x^4 + 2*x^6 + 2*x^7 + x^8) / ((1 - x)^2*(1 + x)^2*(1 - x + x^2)^2*(1 + x + x^2)^2).
%F A215573 a(n) = 2*a(n-6) - a(n-12) for n>12. (End)
%F A215573 a(6*n) = n, a(6*n+1) = 0, a(6*n+2) = 3*n+1, a(6*n+3) = 4*n+2, a(6*n+4) = 3*n+2, a(6*n+5) = 0. - _Philippe Deléham_, Mar 05 2023
%F A215573 a(n) = A048153(n) mod n. - _Alois P. Heinz_, Jun 03 2024
%F A215573 a(n) = A000330(n-1) mod n. - _Chai Wah Wu_, Jun 03 2024
%F A215573 Sum_{k=1..n} a(k) ~ (11/72) * n^2. - _Amiram Eldar_, Apr 05 2025
%p A215573 seq(modp(n*(n+1)*(2*n+1)/6,n),n=1..100); # _Muniru A Asiru_, Feb 07 2019
%t A215573 Table[Mod[(n(n+1)(2n+1))/6,n],{n,80}] (* or *) LinearRecurrence[{0,0,0,0,0,2,0,0,0,0,0,-1},{0,1,2,2,0,1,0,4,6,5,0,2},80] (* _Harvey P. Dale_, Aug 25 2023 *)
%o A215573 (PARI) a(n)=n*(n+1)*(2*n+1)/6 % n; \\ _Michel Marcus_, Oct 19 2013
%o A215573 (PARI) concat(0, Vec(x^2*(1 + 2*x + 2*x^2 + x^4 + 2*x^6 + 2*x^7 + x^8) / ((1 - x)^2*(1 + x)^2*(1 - x + x^2)^2*(1 + x + x^2)^2) + O(x^80))) \\ _Colin Barker_, Feb 07 2019
%o A215573 (Python)
%o A215573 def A215573(n): return n*(n-1)*((n<<1)-1)//6%n # _Chai Wah Wu_, Jun 03 2024
%Y A215573 Cf. A000330, A007310, A048153.
%K A215573 nonn,easy
%O A215573 1,3
%A A215573 _Zak Seidov_, Aug 16 2012