login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A320602 Irregular table read by rows: T(n,k) = (k+s)^(k+s) mod n, s = lcm(n, A002322(n)) = A174824(n), 0 <= k <= s - 1. 1
0, 0, 1, 0, 1, 1, 0, 1, 2, 0, 1, 0, 3, 0, 1, 4, 2, 1, 0, 1, 3, 1, 4, 0, 1, 1, 3, 1, 0, 1, 2, 4, 4, 0, 1, 4, 3, 4, 5, 0, 1, 4, 6, 4, 3, 1, 0, 1, 1, 4, 2, 1, 6, 0, 1, 2, 5, 1, 5, 1, 0, 1, 4, 1, 4, 4, 6, 0, 1, 1, 3, 2, 6, 1, 0, 1, 2, 2, 1, 2, 6, 0, 1, 0, 3, 0, 5, 0, 7 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,9

COMMENTS

A174824(n) is the period of the sequence {k^k mod n}.

If n > 1 is factored as Product_{i=1..m} (p_i)^(e_i), then {k^k mod n : k > e} is purely periodic, e = max_{i=1..m} (p_i)*floor((e_i - 1)/(p_i)). For n > 1, {k^k mod n : k > 0} is purely periodic iff e_i <= p_i, 1 <= i <= m.

LINKS

Table of n, a(n) for n=1..89.

FORMULA

T(n,k) = k^k mod n iff: let p be any prime factor of k, then n is not divisible by p^(k+1).

EXAMPLE

Table starts

n = 1: 0,

n = 2: 0, 1,

n = 3: 0, 1, 1, 0, 1, 2,

n = 4: 0, 1, 0, 3,

n = 5: 0, 1, 4, 2, 1, 0, 1, 3, 1, 4, 0, 1, 1, 3, 1, 0, 1, 2, 4, 4,

n = 6: 0, 1, 4, 3, 4, 5,

n = 7: 0, 1, 4, 6, 4, 3, 1, 0, 1, 1, 4, 2, 1, 6, 0, 1, 2, 5, 1, 5, 1, 0, 1, 4, 1, 4, 4, 6, 0, 1, 1, 3, 2, 6, 1, 0, 1, 2, 2, 1, 2, 6,

n = 8: 0, 1, 0, 3, 0, 5, 0, 7,

n = 9: 0, 1, 4, 0, 4, 2, 0, 7, 1, 0, 1, 5, 0, 4, 7, 0, 7, 8,

n = 10: 0, 1, 4, 7, 6, 5, 6, 3, 6, 9, 0, 1, 6, 3, 6, 5, 6, 7, 4, 9,

PROG

(PARI) T(n, k) = my(s=lcm(n, lcm(znstar(n)[2]))); lift(Mod(k+s, n)^(k+s))

tabf(nn) = for(n=1, nn, for(k=0, lcm(n, lcm(znstar(n)[2])))-1, print1(T(n, k), ", ")); print);

CROSSREFS

Cf. A000312, A002322, A174824.

Sequence in context: A127368 A112552 A048154 * A134511 A112554 A120616

Adjacent sequences:  A320599 A320600 A320601 * A320603 A320604 A320605

KEYWORD

nonn,tabf

AUTHOR

Jianing Song, Oct 17 2018

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 June 19 00:55 EDT 2019. Contains 324217 sequences. (Running on oeis4.)