A071871 Duplicate of A055030.
1, 2, 71, 9596, 1355849266, 1032458258547, 1653031004194447737
Offset: 1
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.
Sum(m^3, m = 1 .. 3) = 1^3 + 2^3 + 3^3 = 36 == 0 (mod 4), so a(4) = 0.
Table[Mod[Sum[i^(n - 1), {i, n - 1}], n], {n, 75}] (* Alonso del Arte, May 10 2013 *)
a(n) = lift(sum(i=1, n, Mod(i, n)^(n-1))); \\ Michel Marcus, Feb 23 2020
def a(n): return sum(pow(m, n-1, n) for m in range(1, n))%n print([a(n) for n in range(1, 73)]) # Michael S. Branicky, Jan 02 2022
Table[n/Denominator[(Sum[m^(n - 1), {m, n - 1}] + 1)/n], {n, 10}] (* Indranil Ghosh, May 17 2017 *)
a(n) = n/denominator((sum(m=1, n - 1, m^(n - 1)) + 1)/n); \\ Indranil Ghosh, May 17 2017
from sympy import Integer def a(n): return Integer(n)/((sum(m**(n - 1) for m in range(1, n)) + 1)/Integer(n)).denominator # Indranil Ghosh, May 17 2017
a:= proc(n) local S,m; S:= 1; for m from 1 to n-1 do S:= S + m &^(n-1) mod n; od: denom(S/n); end proc; seq(a(n),n=1..1000); # Robert Israel, May 30 2014
Table[Denominator[(Sum[m^(n - 1), {m, 1, n - 1}] + 1)/n], {n, 1, 10}] (* G. C. Greubel, Jun 06 2016 *)
a(n) = denominator((sum(m=1, n - 1, m^(n - 1)) + 1)/n); \\ Indranil Ghosh, May 17 2017
from sympy import Integer def a(n): return ((sum(m**(n - 1) for m in range(1, n)) + 1)/Integer(n)).denominator # Indranil Ghosh, May 17 2017
Table[Numerator[(Sum[m^(n - 1), {m, n - 1}] + 1)/n], {n, 50}] (* Indranil Ghosh, May 17 2017 *)
a(n) = numerator((sum(m=1, n - 1, m^(n - 1)) + 1)/n); \\ Indranil Ghosh, May 17 2017
from sympy import Integer def a(n): return ((sum(m**(n - 1) for m in range(1, n)) + 1)/Integer(n)).numerator # Indranil Ghosh, May 17 2017
Sum(m^3, m=1..3) + 1 = 1^3 + 2^3 + 3^3 + 1 = 37 == 1 (mod 4), so a(4) = 1.
Table[Mod[Plus @@ PowerMod[Range[n - 1], n - 1, n] + 1, n], {n, 77}] (* Ivan Neretin, Sep 23 2016 *)
a(1) = (1^3 + 2^3)/3^2 = (1 + 8)/9 = 1.
Table[ p = Prime[n]; Sum[ m^p, {m, 1, p - 1}] / p^2, {n, 2, 12}]
a(1) = (1^3 + 2^3)/3 = (1 + 8)/3 = 3.
Array[Sum[m^#, {m, # - 1}]/# &@ Prime@ # &, 11, 2] (* Michael De Vlieger, Nov 04 2017 *)
a(2) = 5 because, since 3 is the second prime, we have 1^2 + 2^2 = 1 + 4 = 5. a(3) = 354 because, since 5 is the third prime, we have 1^4 + 2^4 + 3^4 + 4^4 = 1 + 4 + 81 + 256 = 354.
Table[Sum[i^(Prime[n] - 1), {i, Prime[n] - 1}], {n, 15}]
a[n_] := Module[{p = Prime[n + 1]}, (1 + 2 * Sum[k^(p - 1), {k, 2, p - 1, 2}])/p]; Array[a, 11] (* Amiram Eldar, Oct 29 2020 *)
a(n) = my(p=prime(n+1)); (1 + sum(k=1, (p-1)\2, 2*(2*k)^(p-1)))/p; \\ Michel Marcus, Oct 29 2020
Comments