A253563 Permutation of natural numbers: a(0) = 1, a(1) = 2; after which, a(2n) = A253560(a(n)), a(2n+1) = A253550(a(n)).
1, 2, 4, 3, 8, 6, 9, 5, 16, 12, 18, 10, 27, 15, 25, 7, 32, 24, 36, 20, 54, 30, 50, 14, 81, 45, 75, 21, 125, 35, 49, 11, 64, 48, 72, 40, 108, 60, 100, 28, 162, 90, 150, 42, 250, 70, 98, 22, 243, 135, 225, 63, 375, 105, 147, 33, 625, 175, 245, 55, 343, 77, 121, 13, 128, 96, 144, 80, 216, 120, 200, 56, 324, 180, 300, 84, 500, 140, 196, 44
Offset: 0
Links
Crossrefs
Programs
-
Maple
a:= proc(n) local m; m:= n; [0]; while m>0 do `if`(1= irem(m, 2, 'm'), map(x-> x+1, %), [%[], 0]) od: `if`(n=0, 1, mul(ithprime(i), i=%)) end: seq(a(n), n=0..100); # Alois P. Heinz, Aug 23 2017
-
Mathematica
p[n_] := p[n] = FactorInteger[n][[-1, 1]]; b[n_] := n p[n]; c[1] = 1; c[n_] := (n/p[n]) NextPrime[p[n]]; a[0] = 1; a[1] = 2; a[n_] := a[n] = If[EvenQ[n], b[a[n/2]], c[a[(n-1)/2]]]; a /@ Range[0, 100] (* Jean-François Alcover, Feb 15 2021 *)
Formula
As a composition of other permutations:
Other identities and observations. For all n >= 0:
For all n >= 1: a(2n) - a(2n+1) > 0. [See the comment above.]
Comments