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

This page as a plain text file.
%I A343931 #38 Jun 18 2022 21:12:10
%S A343931 1,3,4,11,131,188,324,445,3548,8284,201403,253731,564084,1812500,
%T A343931 4599115
%N A343931 Numbers k such that Sum_{j=1..k} (-j)^j == 0 (mod k).
%C A343931 Also numbers k such that k divides A001099(k).
%t A343931 q[n_] := Divisible[Sum[PowerMod[-k, k, n], {k, 1, n}], n]; Select[Range[8500], q] (* _Amiram Eldar_, May 04 2021 *)
%o A343931 (PARI) isok(n) = sum(k=1, n, Mod(-k, n)^k)==0;
%o A343931 (Python)
%o A343931 from itertools import accumulate, count, islice
%o A343931 def A343931_gen(): # generator of terms
%o A343931     yield 1
%o A343931     for i, j in enumerate(accumulate((-k)**k for k in count(1)),start=2):
%o A343931         if j % i == 0:
%o A343931             yield i
%o A343931 A343931_list = list(islice(A343931_gen(),10)) # _Chai Wah Wu_, Jun 18 2022
%Y A343931 Cf. A001099, A128981, A341437, A343930, A343933.
%K A343931 nonn,more
%O A343931 1,2
%A A343931 _Seiichi Manyama_, May 04 2021
%E A343931 a(11)-a(13) from _Chai Wah Wu_, May 04 2021
%E A343931 a(14) from _Martin Ehrenstein_, May 05 2021
%E A343931 a(15) from _Martin Ehrenstein_, May 08 2021