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.

A332811 a(n) = A243071(A332808(n)).

This page as a plain text file.
%I A332811 #10 Mar 10 2020 00:28:55
%S A332811 0,1,3,2,7,6,15,4,5,14,63,12,31,30,13,8,127,10,255,28,29,126,1023,24,
%T A332811 11,62,9,60,511,26,4095,16,125,254,27,20,2047,510,61,56,8191,58,16383,
%U A332811 252,25,2046,65535,48,23,22,253,124,32767,18,123,120,509,1022,262143,52,131071,8190,57,32,59,250,1048575,508,2045,54,4194303,40,524287,4094,21
%N A332811 a(n) = A243071(A332808(n)).
%H A332811 Antti Karttunen, <a href="/A332811/b332811.txt">Table of n, a(n) for n = 1..16384</a>
%H A332811 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A332811 a(n) = A243071(A332808(n)).
%F A332811 For n > 1, a(n) = A054429(A332816(n)).
%F A332811 a(n) = A332895(n) + A332896(n).
%F A332811 a(n) = A332895(n) OR A332896(n) = A332895(n) XOR A332896(n).
%F A332811 A000120(a(n)) = A332899(n).
%o A332811 (PARI)
%o A332811 up_to = 26927;
%o A332811 A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
%o A332811 A243071(n) = if(n<=2, n-1, if(!(n%2), 2*A243071(n/2), 1+(2*A243071(A064989(n)))));
%o A332811 A332806list(up_to) = { my(v=vector(2), xs=Map(), lista=List([]), p,q,u); v[2] = 3; v[1] = 5; mapput(xs,1,1); mapput(xs,2,2); mapput(xs,3,3);  for(n=4,up_to, p = v[2-(n%2)]; q = nextprime(1+p); while(q%4 != p%4, q=nextprime(1+q)); v[2-(n%2)] = q; mapput(xs,primepi(q),n)); for(i=1, oo, if(!mapisdefined(xs, i, &u), return(Vec(lista)), listput(lista, prime(u)))); };
%o A332811 v332806 = A332806list(up_to);
%o A332811 A332806(n) = v332806[n];
%o A332811 A332808(n) = { my(f=factor(n)); f[,1] = apply(A332806,apply(primepi,f[,1])); factorback(f); };
%o A332811 A332811(n) = A243071(A332808(n));
%Y A332811 Cf. A332817 (inverse permutation).
%Y A332811 Cf. A054429, A243071, A332808, A332816, A332895, A332896, A332899.
%Y A332811 Cf. also A332215.
%K A332811 nonn
%O A332811 1,3
%A A332811 _Antti Karttunen_, Mar 05 2020