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.

A061008 a(n) = Sum_{j=1..n} (-(n-1)! mod n).

This page as a plain text file.
%I A061008 #15 Feb 19 2024 10:30:21
%S A061008 0,1,2,4,5,5,6,6,6,6,7,7,8,8,8,8,9,9,10,10,10,10,11,11,11,11,11,11,12,
%T A061008 12,13,13,13,13,13,13,14,14,14,14,15,15,16,16,16,16,17,17,17,17,17,17,
%U A061008 18,18,18,18,18,18,19,19,20,20,20,20,20,20,21,21,21,21,22,22,23,23,23
%N A061008 a(n) = Sum_{j=1..n} (-(n-1)! mod n).
%H A061008 Vincenzo Librandi, <a href="/A061008/b061008.txt">Table of n, a(n) for n = 1..5000</a>
%F A061008 a(n) = a(n-1) + A061007(n) = A061009(n) + 2. For n > 3, a(n) = pi(n) + 2 where pi(n) = A000720(n) is the number of primes less than or equal to n.
%e A061008 a(6) = 5 since (-1 mod 1) + (-1 mod 2) + (-2 mod 3) + (-6 mod 4) + (-24 mod 5) + (-120 mod 6) = 0 + 1 + 1 + 2 + 1 + 0 = 5.
%t A061008 Join[{0, 1, 2}, a[n_]:= 2 + PrimePi[n]; Table[a[n], {n, 4, 100}]] (* _Vincenzo Librandi_, Aug 11 2017 *)
%o A061008 (Magma) [0,1,2] cat [ 2+#PrimesUpTo(n): n in [4..200] ]; // _Vincenzo Librandi_, Aug 11 2017
%Y A061008 Cf. A000040, A000142, A061006, A061007, A061009.
%K A061008 nonn
%O A061008 1,3
%A A061008 _Henry Bottomley_, Apr 12 2001