



1, 2, 8, 16, 27, 32, 54, 64, 100, 128, 200, 243, 256, 400, 486, 500, 512, 800, 972, 1000, 1024, 1600, 1944, 2000, 2048, 3200, 3888, 4000, 4096, 4624, 6400, 7776, 8000, 8192, 9248, 12100, 12500, 12800, 15552, 16000, 16384, 18496, 24200, 25000, 25600, 31104, 32000, 32768, 36992, 48400, 50000
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Consider the function f(n) = the number of positive integers k < n such that k^n (mod n) == 1. This sequence lists the values of n at which f(n) reaches a new maximum.
All powers of two are present except its square. f(2^n) (with exception noted) = 2^(n1) = 2^n/2.
All powers of two multiplied by 100, 1000 and 100000, but not 10000, are also present.
Terms other than the above are 27, 54, 243, 486, 500, 972, 1944, 3888, 4624, 7776, 9248, 12100, 12500, 15552, 18496, 24200, 25000, 31104, 36992, 48400, 50000, ..., .
Conjecture: f(x)/x > 5/12.


LINKS

Robert G. Wilson v, Table of n, a(n) for n = 1..94


MATHEMATICA

f[n_] := (d = If[ OddQ@ n, 1, 2]; d*Length@ Select[ Range[ n/d], PowerMod[#, n, n] == 1 &]); f[1] = 1; k = 1; mx = 0; lst = {}; While[k < 10000001, a = f@ k; If[a > mx, mx = a; AppendTo[lst, k]; Print[{a, k}]]; k++]; lst


CROSSREFS

Cf. A072994.
Sequence in context: A225289 A322945 A157512 * A137882 A194643 A327329
Adjacent sequences: A252591 A252592 A252593 * A252595 A252596 A252597


KEYWORD

nonn


AUTHOR

Robert G. Wilson v, Dec 18 2014


STATUS

approved



