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 A250246 #24 Apr 05 2018 20:32:54 %S A250246 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,27,22,23,24,25,26, %T A250246 21,28,29,30,31,32,45,34,35,36,37,38,33,40,41,54,43,44,81,46,47,48,49, %U A250246 50,75,52,53,42,125,56,63,58,59,60,61,62,39,64,55,90,67,68,135,70,71,72,73,74,51,76,77,66,79,80,99,82,83 %N A250246 Permutation of natural numbers: a(1) = 1, a(n) = A246278(A055396(n), a(A078898(n))). %H A250246 Antti Karttunen, <a href="/A250246/b250246.txt">Table of n, a(n) for n = 1..16384</a> %H A250246 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A250246 a(1) = 1, a(n) = A246278(A055396(n), a(A078898(n))). %F A250246 a(1) = 1, a(2n) = 2*a(n), a(2n+1) = A003961(a(A250470(2n+1))). - _Antti Karttunen_, Jan 18 2015 - Instead of A250470, one may use A268674 in above formula. - _Antti Karttunen_, Apr 01 2018 %F A250246 As a composition of related permutations: %F A250246 a(n) = A163511(A252756(n)). %F A250246 Other identities. For all n >= 1: %F A250246 a(n) = a(2n)/2. [The even bisection halved gives the sequence back.] %F A250246 A020639(a(n)) = A020639(n) and A055396(a(n)) = A055396(n). [Preserves the smallest prime factor of n]. %F A250246 A001221(a(n)) = A302041(n). %F A250246 A001222(a(n)) = A253557(n). %F A250246 A008683(a(n)) = A302050(n). %F A250246 A000005(a(n)) = A302051(n) %F A250246 A010052(a(n)) = A302052(n), for n >= 1. %F A250246 A056239(a(n)) = A302039(n). %o A250246 (PARI) %o A250246 up_to = 16384; %o A250246 ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; }; %o A250246 A020639(n) = if(n>1, if(n>n=factor(n, 0)[1, 1], n, factor(n)[1, 1]), 1); \\ From A020639 %o A250246 A055396(n) = if(1==n,0,primepi(A020639(n))); %o A250246 v078898 = ordinal_transform(vector(up_to,n,A020639(n))); %o A250246 A078898(n) = v078898[n]; %o A250246 A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961 %o A250246 A250246(n) = if(1==n,n,my(k = 2*A250246(A078898(n)), r = A055396(n)); if(1==r, k, while(r>1, k = A003961(k); r--); (k))); \\ _Antti Karttunen_, Apr 01 2018 %o A250246 (Scheme, with memoizing-macro definec from _Antti Karttunen_'s IntSeq-library, three alternative definitions) %o A250246 (definec (A250246 n) (cond ((<= n 1) n) (else (A246278bi (A055396 n) (A250246 (A078898 n)))))) ;; Code for A246278bi given in A246278 %o A250246 (definec (A250246 n) (cond ((<= n 1) n) ((even? n) (* 2 (A250246 (/ n 2)))) (else (A003961 (A250246 (A250470 n)))))) %o A250246 (define (A250246 n) (A163511 (A252756 n))) %Y A250246 Inverse: A250245. %Y A250246 Other similar permutations: A250243, A250248, A250250, A163511, A252756. %Y A250246 Cf. A003961, A005843, A020639, A055396, A078898, A246278, A250470, A268674, A278524, A302042, A302046. %Y A250246 Differs from the "vanilla version" A249818 for the first time at n=42, where a(42) = 54, while A249818(42) = 42. %Y A250246 Differs from A250250 for the first time at n=73, where a(73) = 73, while A250250(73) = 103. %K A250246 nonn %O A250246 1,2 %A A250246 _Antti Karttunen_, Nov 17 2014