login
The Cat's tongue permutation: a(n) = A163511(A057889(n)).
18

%I #28 Oct 08 2023 04:42:56

%S 1,2,4,3,8,9,6,5,16,27,18,15,12,25,10,7,32,81,54,45,36,75,30,21,24,

%T 125,50,35,20,49,14,11,64,243,162,135,108,225,90,63,72,375,150,105,60,

%U 147,42,33,48,625,250,175,100,245,70,55,40,343,98,77,28,121,22,13,128,729,486,405,324,675,270,189,216,1125

%N The Cat's tongue permutation: a(n) = A163511(A057889(n)).

%C "Cat's tongue" refers to the look of the scatter plot of this sequence.

%H Antti Karttunen, <a href="/A366275/b366275.txt">Table of n, a(n) for n = 0..16383</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%F For n >= 0, A001222(a(n)) = A290251(n).

%F For n >= 1, A007814(a(n)) = A135523(n) = A007814(n) + A209229(n). [Like A163511, also this permutation preserves the 2-adic valuation of n, except when n is a power of two, in which cases that value is incremented by one.]

%F For n >= 1, a(2*n) = 2*a(n).

%F For n >= 1, a(A000225(n)) = A000040(n).

%o (PARI)

%o A030101(n) = if(n<1,0,subst(Polrev(binary(n)),x,2));

%o A057889(n) = if(!n,n,A030101(n/(2^valuation(n,2))) * (2^valuation(n, 2)));

%o A163511(n) = if(!n, 1, my(p=2, t=1); while(n>1, if(!(n%2), (t*=p), p=nextprime(1+p)); n >>= 1); (t*p));

%o A366275(n) = A163511(A057889(n));

%o (Python)

%o from sympy import prime

%o def A366275(n):

%o if n:

%o k, c, m = int(bin(n>>(r:=(~n & n-1).bit_length()))[:1:-1],2)<<r, 0, 1

%o while k:

%o c += 1

%o m *= prime(c)**(s:=(~k&k-1).bit_length())

%o k >>= s+1

%o return m*prime(c)

%o return 1 # _Chai Wah Wu_, Oct 08 2023

%Y Cf. A000040, A000225, A007814, A057889, A163511, A209229, A290251, A366276 (inverse map), A366277 (fixed points of map n -> a(n)), A366278, A366279, A366280, A366281 [= A052409(a(n))], A366282 [= a(n)-n], A366283 [= gcd(n,a(n))].

%Y Cf. also A163511, A253563, A366263 (compare the scatter plots).

%K nonn,look

%O 0,2

%A _Antti Karttunen_, Oct 06 2023