login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A174824 a(n) = period of the sequence {m^m, m >= 1} modulo n. 17
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*(n-1). - 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. Oller-Marcén, On the last digit and the last non-zero 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) = (p-1)*p^k for p prime and k > 0.

a(n) = n*A268336(n). - M. F. Hasler, Nov 13 2019

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, lcm(znstar(n)[2])); \\ Michel Marcus, Mar 18 2016; corrected by Michel Marcus, Nov 13 2019

(PARI) apply( {A174824(n)=lcm(lcm([p-1|p<-factor(n)[, 1]]), n)}, [1..99]) \\ [...] = znstar(n)[2], but 3x faster. - M. F. Hasler, Nov 13 2019

CROSSREFS

Cf. A000312, A009262, A127699.

Cf. A002322, A124240, A268336.

Sequence in context: A100695 A100140 A275121 * A009262 A127699 A220769

Adjacent sequences:  A174821 A174822 A174823 * A174825 A174826 A174827

KEYWORD

nonn

AUTHOR

Franklin T. Adams-Watters, Mar 30 2010

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 26 09:05 EST 2020. Contains 332277 sequences. (Running on oeis4.)