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.

Showing 1-10 of 10 results.

A071871 Duplicate of A055030.

Original entry on oeis.org

1, 2, 71, 9596, 1355849266, 1032458258547, 1653031004194447737
Offset: 1

Views

Author

Keywords

A204187 a(n) = Sum_{m=1..n-1} m^(n-1) modulo n.

Original entry on oeis.org

0, 1, 2, 0, 4, 3, 6, 0, 6, 5, 10, 0, 12, 7, 10, 0, 16, 9, 18, 0, 14, 11, 22, 0, 20, 13, 18, 0, 28, 15, 30, 0, 22, 17, 0, 0, 36, 19, 26, 0, 40, 21, 42, 0, 21, 23, 46, 0, 42, 25, 34, 0, 52, 27, 0, 0, 38, 29, 58, 0, 60, 31, 42, 0, 52, 33, 66, 0, 46, 35, 70, 0
Offset: 1

Views

Author

Jonathan Sondow, Jan 12 2012

Keywords

Comments

a(n) = n - 1 if n is 1 or a prime, by Fermat's little theorem. It is conjectured that the converse is also true; see A055032 and A201560 and note that a(n) = n-1 <==> A055032(n) = 1 <==> A201560(n) = 0.
As of 1991, Giuga and Bedocchi had verified no composite n < 10^1700 satisfies a(n) = n - 1 (Ribemboim, 1991). - Alonso del Arte, May 10 2013

Examples

			Sum(m^3, m = 1 .. 3) = 1^3 + 2^3 + 3^3 = 36 == 0 (mod 4), so a(4) = 0.
		

References

  • Steve Dinh, The Hard Mathematical Olympiad Problems And Their Solutions, AuthorHouse, 2011, Problem 6 of Hong Kong Mathematical Olympiad 2007 (find a(7)), page 134.
  • Richard K. Guy, Unsolved Problems in Number Theory, A17.
  • Paulo Ribemboim, The Little Book of Big Primes. New York: Springer-Verlag (1991): 17.

Crossrefs

Programs

  • Mathematica
    Table[Mod[Sum[i^(n - 1), {i, n - 1}], n], {n, 75}] (* Alonso del Arte, May 10 2013 *)
  • PARI
    a(n) = lift(sum(i=1, n, Mod(i, n)^(n-1))); \\ Michel Marcus, Feb 23 2020
    
  • Python
    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

Formula

a(p) = p - 1 if p is prime, and a(4n) = 0.
a(n) + 1 == A201560(n) (mod n).
a(n) = n/2 iff n is of the form 4k+2 (conjectured). - Ivan Neretin, Sep 23 2016
a(4*k+2) = 2*k+1; for a proof see corresponding link. - Bernard Schott, Dec 29 2021

A055023 a(n) = n/A055032(n).

Original entry on oeis.org

1, 2, 3, 1, 5, 2, 7, 1, 1, 2, 11, 1, 13, 2, 1, 1, 17, 2, 19, 1, 3, 2, 23, 1, 1, 2, 1, 1, 29, 2, 31, 1, 1, 2, 1, 1, 37, 2, 3, 1, 41, 2, 43, 1, 1, 2, 47, 1, 1, 2, 1, 1, 53, 2, 1, 1, 3, 2, 59, 1, 61, 2, 1, 1, 1, 2, 67, 1, 1, 2, 71, 1, 73, 2, 3, 1, 1, 2, 79, 1, 1, 2, 83, 1, 1
Offset: 1

Views

Author

N. J. A. Sloane, Jun 11 2000

Keywords

Comments

It is conjectured that this is n iff n is 1 or a prime.

References

  • R. K. Guy, Unsolved Problems Number Theory, A17.

Crossrefs

Programs

  • Mathematica
    Table[n/Denominator[(Sum[m^(n - 1), {m, n - 1}] + 1)/n], {n, 10}] (* Indranil Ghosh, May 17 2017 *)
  • PARI
    a(n) = n/denominator((sum(m=1, n - 1, m^(n - 1)) + 1)/n); \\ Indranil Ghosh, May 17 2017
    
  • Python
    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

A055032 Denominator of (Sum(m^(n-1),m=1..n-1)+1)/n.

Original entry on oeis.org

1, 1, 1, 4, 1, 3, 1, 8, 9, 5, 1, 12, 1, 7, 15, 16, 1, 9, 1, 20, 7, 11, 1, 24, 25, 13, 27, 28, 1, 15, 1, 32, 33, 17, 35, 36, 1, 19, 13, 40, 1, 21, 1, 44, 45, 23, 1, 48, 49, 25, 51, 52, 1, 27, 55, 56, 19, 29, 1, 60, 1, 31, 63, 64, 65, 33, 1, 68, 69, 35, 1, 72, 1
Offset: 1

Views

Author

N. J. A. Sloane, Jun 11 2000

Keywords

Comments

It is conjectured that this is 1 iff n is 1 or a prime.

References

  • R. K. Guy, Unsolved Problems in Number Theory, A17.

Crossrefs

Programs

  • Maple
    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
  • Mathematica
    Table[Denominator[(Sum[m^(n - 1), {m, 1, n - 1}] + 1)/n], {n, 1, 10}] (* G. C. Greubel, Jun 06 2016 *)
  • PARI
    a(n) = denominator((sum(m=1, n - 1, m^(n - 1)) + 1)/n); \\ Indranil Ghosh, May 17 2017
    
  • Python
    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

A055031 Numerator of (Sum(m^(n-1),m=1..n-1)+1)/n.

Original entry on oeis.org

1, 1, 2, 37, 71, 2213, 9596, 1200305, 24684613, 287152493, 1355849266, 427675990237, 1032458258547, 228796942438201, 16841089312342856, 665478473553144001, 1653031004194447737, 631449646252135295657, 3167496749732497119310
Offset: 1

Views

Author

N. J. A. Sloane, Jun 11 2000

Keywords

References

  • R. K. Guy, Unsolved Problems Number Theory, A17.

Crossrefs

Programs

  • Mathematica
    Table[Numerator[(Sum[m^(n - 1), {m, n - 1}] + 1)/n], {n, 50}] (* Indranil Ghosh, May 17 2017 *)
  • PARI
    a(n) = numerator((sum(m=1, n - 1, m^(n - 1)) + 1)/n); \\ Indranil Ghosh, May 17 2017
    
  • Python
    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

A201560 a(n) = (Sum(m^(n-1), m=1..n-1) + 1) modulo n.

Original entry on oeis.org

0, 0, 0, 1, 0, 4, 0, 1, 7, 6, 0, 1, 0, 8, 11, 1, 0, 10, 0, 1, 15, 12, 0, 1, 21, 14, 19, 1, 0, 16, 0, 1, 23, 18, 1, 1, 0, 20, 27, 1, 0, 22, 0, 1, 22, 24, 0, 1, 43, 26, 35, 1, 0, 28, 1, 1, 39, 30, 0, 1, 0, 32, 43, 1, 53, 34, 0, 1, 47, 36, 0, 1, 0, 38, 51, 1, 1
Offset: 1

Views

Author

Jonathan Sondow, Jan 11 2012

Keywords

Comments

Equals 0 if n is 1 or a prime, by Fermat's little theorem. It is conjectured that the converse is also true; see A055030, A055032, A204187 and note that a(n) = 0 <==> A055032(n) = 1 <==> A204187(n) = n-1.

Examples

			Sum(m^3, m=1..3) + 1 = 1^3 + 2^3 + 3^3 + 1 = 37 == 1 (mod 4), so a(4) = 1.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, A17.

Crossrefs

Programs

  • Mathematica
    Table[Mod[Plus @@ PowerMod[Range[n - 1], n - 1, n] + 1, n], {n, 77}] (* Ivan Neretin, Sep 23 2016 *)

Formula

a(prime) = 0 and a(4n) = 1.
a(n) == A204187(n) + 1 (mod n).

A294507 Sum(m^p, m=1..p-1) / p^2 as p runs through the odd primes.

Original entry on oeis.org

1, 52, 7689, 1176564625, 915495729492, 1507470694179701824, 2916521865098581522761, 21333370304597346190818638521, 1675481131512375613482932303229309861556, 9784120259254858957467327917016090730358625, 4284997268972399392421947270075253022799901265537333204
Offset: 1

Views

Author

Jonathan Sondow, Nov 01 2017

Keywords

Examples

			a(1) = (1^3 + 2^3)/3^2 = (1 + 8)/9 = 1.
		

Crossrefs

Programs

  • Mathematica
    Table[ p = Prime[n]; Sum[ m^p, {m, 1, p - 1}] / p^2, {n, 2, 12}]

Formula

a(n) = A219550(n) / prime(n+1) = A219550(n) / A065091(n).
a(n) (mod prime(n+1)) = (prime(n+1) - 1)/2 = A005097(n).

A219550 Sum(m^p, m=1..p-1)/p as p runs through the odd primes.

Original entry on oeis.org

3, 260, 53823, 12942210875, 11901444483396, 25627001801054931008, 55413915436873048932459, 490667517005738962388828685983, 48588952813858892791005036793649985985124, 303307728036900627681487165427498812641117375, 158544898951978777519612048992784361843596346824881328548
Offset: 1

Views

Author

Jonathan Sondow, Dec 04 2012

Keywords

Comments

Always an integer: for an elementary proof that Sum(m^k,m=1..p-1)/p is an integer if p is prime and p-1 does not divide k (and a discussion of other proofs), see MacMillan and Sondow 2011. Applications are in Sondow and MacMillan 2011.
For (Sum(m^(p-1), m=1..p-1)+1)/p as p runs through the primes, see A055030.
For Sum(m^p, m=1..p-1) / p^2 as p runs through the odd primes, see A294507.

Examples

			a(1) = (1^3 + 2^3)/3 = (1 + 8)/3 = 3.
		

Crossrefs

Programs

  • Mathematica
    Array[Sum[m^#, {m, # - 1}]/# &@ Prime@ # &, 11, 2] (* Michael De Vlieger, Nov 04 2017 *)

A225578 Sum of first (prime(n) - 1) (prime(n) - 1)th powers.

Original entry on oeis.org

1, 5, 354, 67171, 14914341925, 13421957361110, 28101527071305611528, 60182438244917445266889, 525344775209112229247070397995, 51296981152155330485450049059398345004638, 319099356359853147544285512855368258519442575
Offset: 1

Views

Author

Alonso del Arte, May 10 2013

Keywords

Comments

It follows from Fermat's little theorem that a(n) is congruent to -1 mod the n-th prime.

Examples

			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.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section A17.
  • Paulo Ribemboim, The Little Book of Big Primes, New York, Springer-Verlag (1991): 17.

Crossrefs

Programs

  • Mathematica
    Table[Sum[i^(Prime[n] - 1), {i, Prime[n] - 1}], {n, 15}]

Formula

a(n) = Sum_{i=1..prime(n)-1} i^(prime(n) - 1).

A338472 (1 + Sum_{k(even)=2..p-1} 2*k^(p-1))/p as p runs through the odd primes.

Original entry on oeis.org

3, 109, 14519, 2024592291, 1536463613637, 2449395996564189425, 4686662617019462175259, 33724155827962966577589860263, 2606282943971359343146382147809434583605, 15159042500551578738018590862773479717960671, 6576976543997974825092367662248938303820921894460988333
Offset: 1

Views

Author

Davide Rotondo, Oct 29 2020

Keywords

Comments

Conjecture: (1 + Sum_{k(even)=2..p-1} 2*k^(p-1))/p is an integer iff p is an odd prime.

Crossrefs

Cf. A055030.

Programs

  • Mathematica
    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 *)
  • PARI
    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
Showing 1-10 of 10 results.