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.

A167622 a(n) = n^3 mod n-th prime.

Original entry on oeis.org

1, 2, 2, 1, 4, 8, 3, 18, 16, 14, 29, 26, 24, 35, 38, 15, 16, 37, 25, 48, 63, 62, 49, 29, 8, 2, 10, 17, 82, 106, 73, 18, 43, 106, 112, 148, 99, 104, 34, 163, 6, 59, 51, 71, 111, 25, 11, 207, 63, 195, 74, 76, 180, 87, 96, 195, 121, 263, 122, 192, 15, 119, 149, 282, 124, 294
Offset: 1

Views

Author

Zak Seidov, Nov 07 2009

Keywords

Crossrefs

Programs

  • Mathematica
    (*1*) Table[PowerMod[n,3,Prime[n]],{n,100}]
    (*2*) PowerMod[ #,3,Prime[ # ]]&/@Range[100]
  • PARI
    a(n) = lift(Mod(n, prime(n))^3); \\ Michel Marcus, Jan 28 2025
  • Python
    from sympy import sieve
    def A167622(n): return pow(n,3,sieve[n]) # Karl-Heinz Hofmann, Jan 28 2025