[go: up one dir, main page]

login
A061498
Number of distinct terms in the first difference sequence of reduced residue system[=dRRS] for n.
6
0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 2, 1, 2, 2, 2, 2, 2, 1, 3, 1, 1, 3, 2, 3, 2, 1, 2, 3, 2, 1, 3, 1, 2, 3, 2, 1, 2, 2, 2, 3, 2, 1, 2, 3, 2, 3, 2, 1, 3, 1, 2, 3, 1, 3, 3, 1, 2, 3, 3, 1, 2, 1, 2, 3, 2, 3, 3, 1, 2, 2, 2, 1, 3, 3, 2, 3, 2, 1, 3, 3, 2, 3, 2, 3, 2, 1, 2, 3, 2, 1, 3, 1, 2, 5
OFFSET
1,9
LINKS
EXAMPLE
For n=24, RRS={1, 5, 7, 11, 13, 17, 19, 23}, dRRS={4, 2, 4, 2, 4, 2, 4};
for n=32, dRRS={2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2};
for n=31, dRRS={1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...};
for n=34, RRS={1, 3, 5, 7, 9, 11, 13, 15, 19, 21, 23, 25, 27, 29, 31, 33}, dRRS={2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2};
so a(24)=2, a(32)=1, a(31)=1, a(34)=2.
MATHEMATICA
Table[Length@ Union@ Differences@ Select[Range@ n, CoprimeQ[#, n] &], {n, 105}] (* Michael De Vlieger, Jul 15 2017 *)
PROG
(PARI) a(n) = {my(va = select(x->(gcd(n, x)==1), [1..n])); vd = vector(#va-1, k, va[k+1] - va[k]); #Set(vd); } \\ Michel Marcus, Jul 08 2018
CROSSREFS
Cf. A076362.
Sequence in context: A024880 A029424 A373121 * A373823 A106029 A260311
KEYWORD
nonn
AUTHOR
Labos Elemer, Jun 12 2001
STATUS
approved