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;

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

Original entry on oeis.org

1, 2, 30, 33, 37, 83, 149, 262, 4030, 31969, 140225, 182730, 724754, 2337094, 3985753, 4195221, 4541725
Offset: 1

Views

Author

Seiichi Manyama, May 04 2021

Keywords

Crossrefs

Programs

  • Mathematica
    q[n_] := n == 1 || Mod[Sum[PowerMod[-k, k, n], {k, 1, n}], n] == 1; Select[Range[5000], q] (* Amiram Eldar, May 04 2021 *)
  • PARI
    isok(n) = sum(k=1, n, Mod(-k, n)^k)==1;

Extensions

a(11)-a(13) from Chai Wah Wu, May 04 2021
a(14) from Martin Ehrenstein, May 05 2021
a(15)-a(17) from Martin Ehrenstein, May 08 2021
Showing 1-2 of 2 results.