

A245974


Tower of 7's mod n.


8



0, 1, 1, 3, 3, 1, 0, 7, 7, 3, 2, 7, 6, 7, 13, 7, 12, 7, 7, 3, 7, 13, 20, 7, 18, 19, 16, 7, 1, 13, 19, 23, 13, 29, 28, 7, 34, 7, 19, 23, 26, 7, 7, 35, 43, 43, 37, 7, 0, 43, 46, 19, 11, 43, 13, 7, 7, 1, 7, 43, 6, 19, 7, 55, 58, 13, 63, 63, 43, 63, 66, 7, 30
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,4


COMMENTS

a(n) = (7^(7^(7^(7^(7^ ... ))))) mod n, provided sufficient 7's are in the tower such that adding more doesn't affect the value of a(n).


LINKS

Wayne VanWeerthuizen, Table of n, a(n) for n = 1..10000


FORMULA

a(n) = 7^a(A000010(n)) mod n. For n <= 10, a(n) = (7^7) mod n.


EXAMPLE

a(2) = 1, as 7^X is odd for any whole number X.
a(11) = 2, as 7^(7^7) == 7^(7^(7^7)) == 7^(7^(7^(7^7))) == 2 (mod 11).


MAPLE

A:= proc(n) option remember; 7 &^ A(numtheory:phi(n)) mod n end proc:
A(2):= 1;
seq(A(n), n=2..100);


PROG

(Sage)
def a(n):
if ( n <= 10 ):
return 823543%n
else:
return power_mod(7, a(euler_phi(n)), n)


CROSSREFS

Cf. A240162, A245970, A245971, A245972, A245973.
Sequence in context: A261634 A295848 A226785 * A316989 A135009 A092747
Adjacent sequences: A245971 A245972 A245973 * A245975 A245976 A245977


KEYWORD

nonn,easy


AUTHOR

Wayne VanWeerthuizen, Aug 08 2014


STATUS

approved



