This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A366275 #28 Oct 08 2023 04:42:56 %S A366275 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 A366275 125,50,35,20,49,14,11,64,243,162,135,108,225,90,63,72,375,150,105,60, %U A366275 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 A366275 The Cat's tongue permutation: a(n) = A163511(A057889(n)). %C A366275 "Cat's tongue" refers to the look of the scatter plot of this sequence. %H A366275 Antti Karttunen, <a href="/A366275/b366275.txt">Table of n, a(n) for n = 0..16383</a> %H A366275 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %H A366275 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A366275 For n >= 0, A001222(a(n)) = A290251(n). %F A366275 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 A366275 For n >= 1, a(2*n) = 2*a(n). %F A366275 For n >= 1, a(A000225(n)) = A000040(n). %o A366275 (PARI) %o A366275 A030101(n) = if(n<1,0,subst(Polrev(binary(n)),x,2)); %o A366275 A057889(n) = if(!n,n,A030101(n/(2^valuation(n,2))) * (2^valuation(n, 2))); %o A366275 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 A366275(n) = A163511(A057889(n)); %o A366275 (Python) %o A366275 from sympy import prime %o A366275 def A366275(n): %o A366275 if n: %o A366275 k, c, m = int(bin(n>>(r:=(~n & n-1).bit_length()))[:1:-1],2)<<r, 0, 1 %o A366275 while k: %o A366275 c += 1 %o A366275 m *= prime(c)**(s:=(~k&k-1).bit_length()) %o A366275 k >>= s+1 %o A366275 return m*prime(c) %o A366275 return 1 # _Chai Wah Wu_, Oct 08 2023 %Y A366275 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 A366275 Cf. also A163511, A253563, A366263 (compare the scatter plots). %K A366275 nonn,look %O A366275 0,2 %A A366275 _Antti Karttunen_, Oct 06 2023