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.

A188776 Numbers n such that Sum_{k=1..n} k^k == 1 (mod n).

Original entry on oeis.org

1, 2, 9, 30, 6871, 185779, 208541, 813162, 864355, 2573155
Offset: 1

Views

Author

Keywords

Comments

Numbers n such that A001923(n) == 1 (mod n).
a(11) > 10^7. - Hiroaki Yamanouchi, Aug 25 2015

Crossrefs

Cf. A001923, A128981 (sum == 0 mod n), A188775 (sum == -1 mod n).

Programs

  • Mathematica
    Union@Table[If[Mod[Sum[PowerMod[i,i,n],{i,1,n}],n]==1,Print[n];n],{n,1,20000}]
  • PARI
    f(n)=lift(sum(k=1, n, Mod(k, n)^k));
    for(n=1, 10^6, if(f(n)==1, print1(n, ", "))) /* Joerg Arndt, Apr 10 2011 */
    
  • Python
    from itertools import accumulate, count, islice
    def A188776_gen(): # generator of terms
        yield 1
        for i, j in enumerate(accumulate(k**k for k in count(2)),start=2):
            if not j % i:
                yield i
    A188776_list = list(islice(A188776_gen(),5)) # Chai Wah Wu, Jun 18 2022

Extensions

a(6)-a(9) from Lars Blomberg, May 10 2011
a(1) inserted and a(10) added by Hiroaki Yamanouchi, Aug 25 2015