A364628 For p = 7 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, 16, 32, 7, 3, 6, 12, 24, 48, 64, 14, 9, 18, 36, 72, 96, 128, 28, 27, 54, 108, 144, 192, 256, 56, 81, 162, 216, 288, 384, 512, 112, 243, 324, 432, 576, 768, 1024, 224, 486, 648, 864, 1152, 1536, 2048, 49, 5, 10, 20, 40, 80, 160, 21, 15, 30, 60, 120
Offset: 1
Keywords
Links
Programs
-
Mathematica
p = 7; nn = 343; 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