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-8 of 8 results.

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

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

Original entry on oeis.org

1, 2, 71, 9596, 1355849266, 1032458258547, 1653031004194447737, 3167496749732497119310, 22841077183004879532481321652, 1768861419039838982256898243427529138091, 10293527624511391856267274608237685758691696
Offset: 1

Views

Author

N. J. A. Sloane, Jun 11 2000

Keywords

Comments

It is conjectured that (Sum(m^(n-1),m=1..n-1)+1)/n is an integer iff n is 1 or a prime.
Always an integer from little Fermat theorem. Converse is conjectured to be true: if p | (1+1^(p-1)+2^(p-1)+3^(p-1)+...+(p-1)^(p-1)) and p > 1, then p is prime. That was checked by Giuga up to p <= 10^1000. [Benoit Cloitre, Jun 09 2002]
For Sum(m^p, m=1..p-1)/p as p runs through the odd primes, see A219550. - Jonathan Sondow, Oct 31 2017

References

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

Crossrefs

Programs

  • Maple
    A055030 := proc(n)
        p := ithprime(n) ;
        add(m^(p-1),m=1..p-1) ;
        (1+%)/p ;
    end proc:
    seq(A055030(n),n=1..5) ; # R. J. Mathar, Jan 09 2017
  • Mathematica
    Array[(Sum[m^(# - 1), {m, # - 1}] + 1)/# &@ Prime@ # &, 11] (* Michael De Vlieger, Nov 04 2017 *)
  • PARI
    for(n=1,20,print1((1+sum(i=1, prime(n)-1,i^(prime(n)-1)))/prime(n), ",")) /* Benoit Cloitre, Jun 09 2002*/

Formula

a(n) = (1+A225578(n))/A000040(n). - R. J. Mathar, Jan 09 2017

Extensions

Comments corrected by Jonathan Sondow, Jan 11 2012

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

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).

A323072 a(n) = n/A323071(n) = n/gcd(n, 1+A060681(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, 11, 56, 19, 29, 1, 60, 1, 31, 63, 64, 65, 33, 1, 68, 69, 35, 1, 72, 1, 37, 25, 76, 77, 39, 1, 80, 81, 41, 1, 84, 85, 43, 87, 88, 1, 45, 91, 92, 31, 47
Offset: 1

Views

Author

Antti Karttunen, Jan 04 2019

Keywords

Comments

Differs from A055032 at n = 55, 105, 155, ..., (A323070).

Crossrefs

Programs

Formula

a(n) = n/A323071(n) = n/gcd(n, 1+A060681(n)).

A340079 a(n) = n / gcd(n, 1+A018804(n)), where A018804(n) = Sum_{k=1..n} gcd(k, 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, 4, 1, 15, 1, 32, 33, 17, 35, 36, 1, 19, 13, 40, 1, 3, 1, 44, 9, 23, 1, 48, 49, 25, 51, 52, 1, 27, 11, 56, 19, 29, 1, 60, 1, 31, 63, 64, 65, 33, 1, 68, 69, 35, 1, 72, 1, 37, 75, 76, 77, 39, 1, 80, 81, 41, 1, 84, 85, 43, 87, 88
Offset: 1

Views

Author

Antti Karttunen, Dec 30 2020

Keywords

Comments

It is conjectured that this is 1 iff n is 1 or a prime. See Thomas Ordowski's Oct 22 2014 comment in A018804.

Crossrefs

Cf. also A055032, A323072 (similar but different sequences).

Programs

Formula

a(n) = n / A340078(n) = n / gcd(n, 1+A018804(n)).

A323070 Numbers k such that A055023(k) != A323071(k), where A323071(k) = gcd(k, 1+A060681(k)).

Original entry on oeis.org

55, 105, 155, 203, 253, 355, 405, 455, 497, 595, 655, 689, 705, 737, 755, 791, 955, 979, 1005, 1027, 1055, 1081, 1221, 1255, 1305, 1355, 1379, 1555, 1605, 1655, 1673, 1703, 1711, 1751, 1855, 1905, 1955, 1967, 2065, 2155, 2189, 2205, 2255, 2261, 2329, 2455, 2505, 2555, 2755, 2805, 2849, 2855, 3055
Offset: 1

Views

Author

Antti Karttunen, Jan 04 2019

Keywords

Comments

Equivalently, numbers k for which A055032(k) != A323072(k).
Neither primes nor prime powers present?

Crossrefs

Programs

Showing 1-8 of 8 results.