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.

A015951 Numbers k such that k | 5^k + 1.

Original entry on oeis.org

1, 2, 3, 9, 21, 26, 27, 63, 81, 147, 189, 243, 338, 441, 567, 609, 729, 903, 1029, 1323, 1378, 1701, 1827, 2187, 2667, 2709, 3087, 3969, 4263, 4394, 4401, 5103, 5481, 6321, 6561, 7203, 8001, 8127, 9261, 9429, 11907, 12789, 13149, 13203
Offset: 1

Views

Author

Keywords

Crossrefs

5^k+m is divisible by k: A123062 (m=2), A123052 (m=3), A123047 (m=4).
Column k=5 of A333429.

Programs

  • Magma
    [n: n in [1..10^5] | Modexp(5, n, n)+1 eq n]; // Jinyuan Wang, Dec 29 2018
    
  • Mathematica
    Select[Range@ 14000, Divisible[5^# + 1, #] &] (* Michael De Vlieger, Oct 10 2016 *)
    Select[Range[15000],PowerMod[5,#,#]==#-1&] (* Harvey P. Dale, Aug 11 2024 *)
  • PARI
    isok(n) = Mod(5, n)^n == -1; \\ Michel Marcus, Oct 11 2016
    
  • Python
    for n in range(1,10**5):
        if pow(5,n,n)+1 == n: print(n, end=', ') # Stefano Spezia, Dec 30 2018