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.

A096226 a(n) is the least exponent k > 1 such that m^k is congruent to m modulo n for all natural numbers m, or a(n) = 1 if no such k exists.

Original entry on oeis.org

2, 2, 3, 1, 5, 3, 7, 1, 1, 5, 11, 1, 13, 7, 5, 1, 17, 1, 19, 1, 7, 11, 23, 1, 1, 13, 1, 1, 29, 5, 31, 1, 11, 17, 13, 1, 37, 19, 13, 1, 41, 7, 43, 1, 1, 23, 47, 1, 1, 1, 17, 1, 53, 1, 21, 1, 19, 29, 59, 1, 61, 31, 1, 1, 13, 11, 67, 1, 23, 13, 71, 1, 73, 37, 1, 1, 31, 13, 79, 1, 1, 41, 83, 1
Offset: 1

Views

Author

Franz Vrabec, Aug 09 2004

Keywords

Comments

If n is squarefree, a(n) = 1+A002322(n) = 1+A011773(n). Otherwise a(n) = 1. a(n) = n iff n is prime.

Examples

			a(35) = 13 because 35 divides 1^13-1, 2^13-2, 3^13-3, etc.; but 35 does not divide 2^2-2, 2^3-3, 2^4-2, ..., 2^11-2 or 2^12-2.
		

Crossrefs

Formula

For squarefree n = p1*p2*...*pj, a(n) = 1+lcm(p1-1, p2-1, ..., pj-1).

Extensions

Edited and extended by David Wasserman, Oct 30 2007