

A174824


a(n) = period of the sequence {m^m, m >= 1} modulo n.


14



1, 2, 6, 4, 20, 6, 42, 8, 18, 20, 110, 12, 156, 42, 60, 16, 272, 18, 342, 20, 42, 110, 506, 24, 100, 156, 54, 84, 812, 60, 930, 32, 330, 272, 420, 36, 1332, 342, 156, 40, 1640, 42, 1806, 220, 180, 506, 2162, 48, 294, 100, 816, 156, 2756, 54, 220, 168, 342
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

This is a divisibility sequence: if n divides m, a(n) divides a(m).
We have the equality n = a(n) for numbers n in A124240, which is related to Carmichael's function (A002322). The largest values of a(n) occur when n is prime, in which case a(n) = n*(n1).  T. D. Noe, Feb 21 2014


LINKS

T. D. Noe, Table of n, a(n) for n = 1..1000
José María Grau and Antonio M. OllerMarcén, On the last digit and the last nonzero digit of n^n in base b, arXiv:1203.4066 [math.NT], 2012. (See page 3)
Index to divisibility sequences


FORMULA

a(n) = lcm(n, A173614(n)) = lcm(n, A002322(n)) = lcm(n, A011773(n)).
If n and m are relatively prime, a(n*m) = lcm(a(n), a(m)); a(p^k) = (p1)*p^k for p prime and k > 0.


EXAMPLE

For n=3, 1^1 == 1 (mod 3), 2^2 == 1 (mod 3), 3^3 == 0 (mod 3), etc. The sequence of residues 1, 1, 0, 1, 2, 0, 1, 1, 0, ... has period 6, so a(3) = 6.  Michael B. Porter, Mar 13 2018


MATHEMATICA

Table[LCM[n, CarmichaelLambda[n]], {n, 100}] (* T. D. Noe, Feb 20 2014 *)


PROG

(PARI) a(n)=local(ps); ps=factor(n)[, 1]~; for(k=1, #ps, n=lcm(n, ps[k]1)); n
(PARI) a(n) = lcm(n, znstar(n)[2]); \\ Michel Marcus, Mar 18 2016


CROSSREFS

Cf. A000312, A009262, A127699.
Cf. A002322, A124240.
Sequence in context: A100695 A100140 A275121 * A009262 A127699 A220769
Adjacent sequences: A174821 A174822 A174823 * A174825 A174826 A174827


KEYWORD

nonn


AUTHOR

Franklin T. AdamsWatters, Mar 30 2010


STATUS

approved



