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.

A343931 Numbers k such that Sum_{j=1..k} (-j)^j == 0 (mod k).

Original entry on oeis.org

1, 3, 4, 11, 131, 188, 324, 445, 3548, 8284, 201403, 253731, 564084, 1812500, 4599115
Offset: 1

Views

Author

Seiichi Manyama, May 04 2021

Keywords

Comments

Also numbers k such that k divides A001099(k).

Crossrefs

Programs

  • Mathematica
    q[n_] := Divisible[Sum[PowerMod[-k, k, n], {k, 1, n}], n]; Select[Range[8500], q] (* Amiram Eldar, May 04 2021 *)
  • PARI
    isok(n) = sum(k=1, n, Mod(-k, n)^k)==0;
    
  • Python
    from itertools import accumulate, count, islice
    def A343931_gen(): # generator of terms
        yield 1
        for i, j in enumerate(accumulate((-k)**k for k in count(1)),start=2):
            if j % i == 0:
                yield i
    A343931_list = list(islice(A343931_gen(),10)) # Chai Wah Wu, Jun 18 2022

Extensions

a(11)-a(13) from Chai Wah Wu, May 04 2021
a(14) from Martin Ehrenstein, May 05 2021
a(15) from Martin Ehrenstein, May 08 2021