A387025 Start with the list of positive integers L_1 = (1, 2, ...); for n = 1, 2, ..., let m be the least integer > n such that L_n(n) divides L_n(m); L_{n+1}(k) = L_n(k) for any k <> m, L_{n+1}(m) = L_n(m)/L_n(n); a(n) = L_n(n).
1, 2, 3, 2, 5, 1, 7, 8, 9, 2, 11, 6, 13, 2, 15, 1, 17, 2, 19, 10, 21, 2, 23, 2, 25, 1, 27, 28, 29, 2, 31, 16, 33, 2, 35, 18, 37, 2, 39, 2, 41, 1, 43, 44, 45, 2, 47, 3, 49, 1, 17, 52, 53, 2, 55, 1, 57, 2, 59, 30, 61, 2, 63, 32, 65, 2, 67, 2, 69, 1, 71, 4, 73, 2
Offset: 1
Examples
The first terms are: n a(n) L_n -- ---- ------------------------------------------------------ 1 1 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ... 2 2 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ... 3 3 1, 2, 3, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ... 4 2 1, 2, 3, 2, 5, 2, 7, 8, 9, 10, 11, 12, 13, 14, 15, ... 5 5 1, 2, 3, 2, 5, 1, 7, 8, 9, 10, 11, 12, 13, 14, 15, ... 6 1 1, 2, 3, 2, 5, 1, 7, 8, 9, 2, 11, 12, 13, 14, 15, ... 7 7 1, 2, 3, 2, 5, 1, 7, 8, 9, 2, 11, 12, 13, 14, 15, ... 8 8 1, 2, 3, 2, 5, 1, 7, 8, 9, 2, 11, 12, 13, 2, 15, ... 9 9 1, 2, 3, 2, 5, 1, 7, 8, 9, 2, 11, 12, 13, 2, 15, ... 10 2 1, 2, 3, 2, 5, 1, 7, 8, 9, 2, 11, 12, 13, 2, 15, ... 11 11 1, 2, 3, 2, 5, 1, 7, 8, 9, 2, 11, 6, 13, 2, 15, ... 12 6 1, 2, 3, 2, 5, 1, 7, 8, 9, 2, 11, 6, 13, 2, 15, ... 13 13 1, 2, 3, 2, 5, 1, 7, 8, 9, 2, 11, 6, 13, 2, 15, ... 14 2 1, 2, 3, 2, 5, 1, 7, 8, 9, 2, 11, 6, 13, 2, 15, ... 15 15 1, 2, 3, 2, 5, 1, 7, 8, 9, 2, 11, 6, 13, 2, 15, ...
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
Programs
-
PARI
{ for (n = 1, #a = vector(74, n, n), print1 (a[n]", "); forstep (k = ceil((n+1)/a[n])*a[n], #a, a[n], if (a[k] % a[n]==0, a[k] /= a[n]; break;););); }
Formula
a(p) = p for any prime number p.
a(2*p) = 1 or 2 for any prime number p.
Comments