[go: up one dir, main page]

login
Search: a122377 -id:a122377
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) = ((n mod d(n)) +1)th divisor of n, where d(n) is number of positive divisors of n.
+10
3
1, 1, 3, 2, 5, 3, 7, 1, 1, 5, 11, 1, 13, 7, 15, 2, 17, 1, 19, 4, 3, 11, 23, 1, 5, 13, 27, 14, 29, 15, 31, 4, 3, 17, 35, 1, 37, 19, 39, 1, 41, 3, 43, 4, 9, 23, 47, 24, 7, 5, 51, 26, 53, 27, 55, 1, 3, 29, 59, 1, 61, 31, 9, 2, 5, 3, 67, 4, 3, 35, 71, 1, 73, 37, 15, 38, 7, 39, 79, 1, 3, 41, 83, 1
OFFSET
1,3
LINKS
MATHEMATICA
f[n_] := Block[{d = Divisors[n]}, d[[Mod[n, Length[d]] + 1]]]; Table[f[n], {n, 90}] (* Ray Chandler, Oct 26 2006 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet and Ray Chandler, Oct 26 2006
STATUS
approved
a(n) = m-th positive integer which is coprime to n, where phi(n) is number of positive integers which are <= n and are coprime to n and m = phi(n) if phi(n)|n, else m = n mod phi(n)..
+10
2
1, 1, 1, 3, 1, 5, 1, 7, 4, 3, 1, 11, 1, 3, 13, 15, 1, 17, 1, 9, 16, 3, 1, 23, 6, 3, 13, 9, 1, 19, 1, 31, 20, 3, 16, 35, 1, 3, 23, 19, 1, 19, 1, 7, 38, 3, 1, 47, 8, 23, 29, 7, 1, 53, 19, 17, 32, 3, 1, 43, 1, 3, 46, 63, 22, 19, 1, 7, 38, 61, 1, 71, 1, 3, 64, 7, 20, 19, 1, 39, 40, 3, 1, 41, 27, 3
OFFSET
1,4
MATHEMATICA
f[n_] := Block[{k = 0, m = Mod[n, EulerPhi[n], 1]}, While[m > 0, k++; While[GCD[n, k] > 1, k++ ]; m--; ]; k]; Table[f[n], {n, 90}] (* Ray Chandler, Oct 26 2006 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Oct 19 2006
EXTENSIONS
Edited and extended by Ray Chandler, Oct 26 2006
STATUS
approved
a(n) = n-th term in periodic sequence repeating the divisors of n in decreasing order.
+10
2
1, 1, 3, 4, 5, 3, 7, 1, 1, 5, 11, 1, 13, 7, 3, 16, 17, 1, 19, 10, 21, 11, 23, 1, 25, 13, 3, 4, 29, 3, 31, 16, 33, 17, 5, 1, 37, 19, 3, 1, 41, 21, 43, 22, 9, 23, 47, 3, 49, 25, 3, 4, 53, 3, 5, 1, 57, 29, 59, 1, 61, 31, 9, 64, 65, 33, 67, 34, 69, 5, 71, 1, 73, 37, 15, 4, 77, 3, 79, 1, 81, 41, 83, 1, 85, 43, 3, 1, 89, 10, 7, 46, 93, 47
OFFSET
1,3
LINKS
EXAMPLE
The divisors of 6 are 1, 2, 3, 6, which reversed is 6,3,2,1; repeating that produces the sequence 6, 3, 2, 1, 6, 3, 2, 1, 6, 3, 2, 1, ...; the 6th term in that sequence is 3, so a(6) = 3.
MAPLE
with(numtheory):
a:= n-> n/(l-> l[1+irem(n-1, nops(l))])(sort([divisors(n)[]])):
seq(a(n), n=1..100); # Alois P. Heinz, Jan 29 2018
MATHEMATICA
Table[PadRight[{}, n, Reverse[Divisors[n]]][[-1]], {n, 100}] (* Harvey P. Dale, Jul 21 2024 *)
PROG
(PARI) a(n) = my(d=Vecrev(divisors(n))); if (n % #d, d[n % #d], 1); \\ Michel Marcus, Jan 26 2018
CROSSREFS
Cf. A122377 (n/a(n)), A033950 (indices of 1's).
KEYWORD
nonn
AUTHOR
STATUS
approved

Search completed in 0.067 seconds