[go: up one dir, main page]

login
A366275
The Cat's tongue permutation: a(n) = A163511(A057889(n)).
18
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, 125, 50, 35, 20, 49, 14, 11, 64, 243, 162, 135, 108, 225, 90, 63, 72, 375, 150, 105, 60, 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
OFFSET
0,2
COMMENTS
"Cat's tongue" refers to the look of the scatter plot of this sequence.
FORMULA
For n >= 0, A001222(a(n)) = A290251(n).
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.]
For n >= 1, a(2*n) = 2*a(n).
For n >= 1, a(A000225(n)) = A000040(n).
PROG
(PARI)
A030101(n) = if(n<1, 0, subst(Polrev(binary(n)), x, 2));
A057889(n) = if(!n, n, A030101(n/(2^valuation(n, 2))) * (2^valuation(n, 2)));
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));
(Python)
from sympy import prime
def A366275(n):
if n:
k, c, m = int(bin(n>>(r:=(~n & n-1).bit_length()))[:1:-1], 2)<<r, 0, 1
while k:
c += 1
m *= prime(c)**(s:=(~k&k-1).bit_length())
k >>= s+1
return m*prime(c)
return 1 # Chai Wah Wu, Oct 08 2023
CROSSREFS
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))].
Cf. also A163511, A253563, A366263 (compare the scatter plots).
Sequence in context: A182944 A269385 A252755 * A163511 A332817 A332214
KEYWORD
nonn,look
AUTHOR
Antti Karttunen, Oct 06 2023
STATUS
approved