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.

A303772 Inverse of A303771.

This page as a plain text file.
%I A303772 #5 May 04 2018 22:38:01
%S A303772 0,1,3,5,9,2,17,6,33,10,65,4,129,18,12,257,513,34,1025,14,20,66,2049,
%T A303772 7,4097,130,36,22,8193,11,16385,258,68,514,26,38,32769,1026,132,15,
%U A303772 65537,19,131073,70,42,2050,262145,260
%N A303772 Inverse of A303771.
%H A303772 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A303772 a(n) = A303768(A052331(n)).
%o A303772 (PARI)
%o A303772 default(parisizemax,2^31);
%o A303772 up_to_e = 18;
%o A303772 up_to = (2 + 2^up_to_e);
%o A303772 v050376 = vector(2+up_to_e);
%o A303772 A050376(n) = v050376[n];
%o A303772 ispow2(n) = (n && !bitand(n,n-1));
%o A303772 i = 0; for(n=1,oo,if(ispow2(isprimepower(n)), i++; v050376[i] = n); if(i == 2+up_to_e,break));
%o A303772 A052330(n) = { my(p=1,i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); };
%o A303772 A053669(n) = forprime(p=2, , if (n % p, return(p))); \\ From A053669
%o A303772 v303760 = vector(up_to);
%o A303772 m_inverses = Map();
%o A303772 prev=1; for(n=1,up_to,fordiv(prev,d,if(!mapisdefined(m_inverses,d),v303760[n] = d;mapput(m_inverses,d,n);break)); if(!v303760[n], apu = prev; while(mapisdefined(m_inverses,try = prev*A053669(apu)), apu *= A053669(apu)); v303760[n] = try; mapput(m_inverses,try,n)); prev = v303760[n]);
%o A303772 A303760(n) = v303760[n+1];
%o A303772 A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; };
%o A303772 A303771(n) = A052330(A048675(A303760(n)));
%o A303772 m303772 = Map();
%o A303772 for(n=0,up_to-1,mapput(m303772,A303771(n),n));
%o A303772 A303772(n) = mapget(m303772,n);
%Y A303772 Cf. A052331, A303768.
%K A303772 nonn,more
%O A303772 1,3
%A A303772 _Antti Karttunen_, May 02 2018