cp's OEIS Frontend

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.

A265354 Permutation of nonnegative integers: a(n) = A263273(A264985(n)).

This page as a plain text file.
%I A265354 #9 May 22 2017 20:08:03
%S A265354 0,1,3,2,4,9,6,10,12,7,5,19,8,13,27,18,28,36,21,11,57,24,37,30,15,31,
%T A265354 39,22,16,64,23,14,55,20,46,58,25,17,73,26,40,81,54,82,108,63,29,171,
%U A265354 72,109,90,45,85,117,66,34,192,69,38,165,60,100,174,75,35,219,78,118,84,33,91,93,48,32,138,51,112,111,42,94,120,67
%N A265354 Permutation of nonnegative integers: a(n) = A263273(A264985(n)).
%C A265354 Composition of A263273 with the permutation obtained from its odd bisection.
%H A265354 Antti Karttunen, <a href="/A265354/b265354.txt">Table of n, a(n) for n = 0..9841</a>
%H A265354 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A265354 a(n) = A263273(A264985(n)).
%o A265354 (Scheme) (define (A265354 n) (A263273 (A264985 n)))
%o A265354 (Python)
%o A265354 from sympy import factorint
%o A265354 from sympy.ntheory.factor_ import digits
%o A265354 from operator import mul
%o A265354 def a030102(n): return 0 if n==0 else int(''.join(map(str, digits(n, 3)[1:][::-1])), 3)
%o A265354 def a038502(n):
%o A265354     f=factorint(n)
%o A265354     return 1 if n==1 else reduce(mul, [1 if i==3 else i**f[i] for i in f])
%o A265354 def a038500(n): return n/a038502(n)
%o A265354 def a263273(n): return 0 if n==0 else a030102(a038502(n))*a038500(n)
%o A265354 def a264985(n): return (a263273(2*n + 1) - 1)/2
%o A265354 def a(n): return a263273(a264985(n)) # _Indranil Ghosh_, May 22 2017
%Y A265354 Inverse: A265353.
%Y A265354 Cf. A263273, A264985.
%Y A265354 Cf. also A265352, A265355, A265356.
%K A265354 nonn,base
%O A265354 0,3
%A A265354 _Antti Karttunen_, Dec 07 2015