|
|
A132948
|
|
a(n) = smallest k not occurring earlier such that k divides prime(n)-1.
|
|
5
|
|
|
1, 2, 4, 3, 5, 6, 8, 9, 11, 7, 10, 12, 20, 14, 23, 13, 29, 15, 22, 35, 18, 26, 41, 44, 16, 25, 17, 53, 27, 28, 21, 65, 34, 46, 37, 30, 39, 54, 83, 43, 89, 36, 19, 24, 49, 33, 42, 74, 113, 38, 58, 119, 40, 50, 32, 131, 67, 45, 69, 56, 47, 73, 51, 31, 52, 79, 55, 48, 173, 87, 88
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Sequence is a permutation of the positive integers.
Cycles (including fixed points) with elements <= 260000 are (1), (2), (3,4), (5), (6), (7,8,9,11,10), (12), (14), (17,29,27), (24,44), (33,34,46), (38,54,50), (56,131,82,60), (181), (201,307,1013,2686,1608,1236,839,462,545,982,860,556,335,225,713,901,700,377,259,409,467,474,280,362,305), (1542,1619,1956), (6459), (6466), (10297,18037,25086), (15525,28383,82429,43930,59038,122233,43666), (18181,25301), (58503,90771), (100362), (251732).
|
|
LINKS
|
|
|
EXAMPLE
|
n = 9, prime(9)-1 = 22, numbers not occurring up to a(8) are 7, 9, 10, 11, 12, ... . The smallest one that divides 22 is 11, hence a(9) = 11.
|
|
PROG
|
(PARI) {m=71; w=vectorsmall(3*m); for(n=1, m, k=1; while(w[k]||(prime(n)-1)%k>0, k++); print1(k, ", "); w[k]=1)}
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|