A364611 For p = 5 and n > 0, write n = p^m + k, m >= 0, with maximal p^m <= n, with 0 <= k < p^(m+1) - p^m, then for n such that k=0, a(n)=n, and for n such that k > 0, a(n) is the smallest q*a(k), prime q != p, that is not already a term.
1, 2, 4, 8, 5, 3, 6, 12, 16, 10, 9, 18, 24, 32, 20, 27, 36, 48, 64, 40, 54, 72, 96, 128, 25, 7, 14, 28, 56, 15, 21, 42, 84, 112, 30, 63, 126, 168, 224, 60, 81, 108, 144, 192, 80, 162, 216, 288, 256, 50, 49, 98, 196, 392, 45, 147, 294, 252, 336, 90, 189, 378, 504
Offset: 1
Keywords
Links
Programs
-
Mathematica
p = 5; nn = 125; c[_] = False; Do[Set[{m, k}, {1, n - p^Floor[Log[p, n]]}]; If[k == 0, Set[{a[n], c[n]}, {n, True}], While[Set[t, Prime[m] a[k]]; Or[m == i, c[t]], m++]; Set[{a[n], c[t]}, {t, True}]], {n, nn}]; Array[a, nn]
Comments