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.

A231563 a(n) = f(1)^n + ... + f(n)^n (mod n) where f(i)=i if gcd(i,n)=1 and f(i)=0 otherwise.

Original entry on oeis.org

0, 1, 0, 2, 0, 2, 0, 4, 0, 0, 0, 4, 0, 0, 0, 8, 0, 6, 0, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 20, 0, 16, 0, 0, 0, 12, 0, 0, 0, 16, 0, 12, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 16, 0, 0, 0, 32, 0, 44, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    S[n_] :=  Mod[Sum[If[GCD[i, n] == 1, PowerMod[i, n, n], 0], {i, 1, n}], n]; Array[S,100]
  • PARI
    f(i, n) = if (gcd(i, n) == 1, i, 0);
    a(n) = lift(sum(k=1, n, Mod(f(k, n), n)^n)); \\ Michel Marcus, Jul 16 2017

Formula

a(n) = A308481(n) mod n. - Seiichi Manyama, Feb 11 2021

A057792 Sum[k^k], where sum is over positive integers, k, where k <= n and gcd(k,n) = 1.

Original entry on oeis.org

1, 1, 5, 28, 288, 3126, 50069, 826696, 17604145, 388244060, 10405071317, 285312497280, 9211817190184, 303160805686506, 11415167261421900, 438197051187369424, 18896062057839751444, 827240565046755853710
Offset: 1

Views

Author

Leroy Quet, Nov 04 2000

Keywords

Examples

			a(4) = 1^1 + 3^3 = 28, since 1 and 3 are the positive integers <= 4 and relatively prime to 4.
		

Crossrefs

Programs

  • PARI
    a(n) = sum(k=1, n, if (gcd(k, n)==1, k^k)); \\ Michel Marcus, Jun 19 2021
Showing 1-2 of 2 results.