%I #37 Sep 17 2023 01:36:11
%S 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,
%T 7,14,28,56,15,21,42,84,112,30,63,126,168,224,60,81,108,144,192,80,
%U 162,216,288,256,50,49,98,196,392,45,147,294,252,336,90,189,378,504
%N 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.
%C This is sequence D(p), p = 5, where the Doudna sequence A005940 = D(2).
%H Michael De Vlieger, <a href="/A364611/b364611.txt">Table of n, a(n) for n = 1..15625</a>
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%t p = 5; nn = 125; c[_] = False;
%t Do[Set[{m, k}, {1, n - p^Floor[Log[p, n]]}];
%t If[k == 0,
%t Set[{a[n], c[n]}, {n, True}],
%t While[Set[t, Prime[m] a[k]]; Or[m == i, c[t]], m++];
%t Set[{a[n], c[t]}, {t, True}]], {n, nn}];
%t Array[a, nn]
%Y Cf. A005940 (D(2)), A356867 (D(3)), A364628 (D(7)).
%K nonn
%O 1,2
%A _Michael De Vlieger_, Sep 16 2023
|