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

A343933 a(n) = (Sum_{k=1..n} (-k)^k) mod n.

Original entry on oeis.org

0, 1, 0, 0, 2, 5, 6, 4, 8, 7, 0, 4, 10, 3, 10, 4, 12, 15, 3, 4, 3, 19, 2, 20, 11, 3, 23, 16, 15, 1, 11, 4, 1, 9, 24, 12, 1, 11, 36, 28, 26, 41, 5, 12, 20, 45, 26, 4, 5, 35, 16, 32, 48, 45, 23, 44, 51, 23, 3, 32, 29, 25, 44, 4, 24, 19, 64, 56, 28, 29, 44, 60, 54, 71, 12, 24, 51, 65, 55, 36, 68, 21, 1, 40, 38
Offset: 1

Views

Author

Seiichi Manyama, May 04 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Mod[Sum[PowerMod[-k, k, n], {k, 1, n}], n]; Array[a, 100] (* Amiram Eldar, May 04 2021 *)
  • PARI
    a(n) = sum(k=1, n, (-k)^k)%n;

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
Showing 1-2 of 2 results.