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.

A331184 Number of values of k, 1 <= k <= n, with A318310(k) = A318310(n).

This page as a plain text file.
%I A331184 #9 Jan 12 2020 23:51:13
%S A331184 1,2,1,3,1,1,1,4,1,2,1,1,1,1,1,5,1,1,1,1,2,1,1,1,1,3,1,1,1,1,1,6,1,1,
%T A331184 1,1,1,1,2,1,1,1,1,2,1,1,1,1,1,1,1,2,1,2,1,1,1,1,1,1,1,1,1,7,1,2,1,1,
%U A331184 1,1,1,1,1,1,2,2,1,3,1,1,2,1,1,1,1,1,1,2,1,1,1,1,2,1,1,1,1,1,2,1,1,4,1,1,1
%N A331184 Number of values of k, 1 <= k <= n, with A318310(k) = A318310(n).
%C A331184 Ordinal transform of A318310, or equally, of the ordered pair [A000120(n), A033879(n)], i.e., binary weight of n & deficiency of n.
%H A331184 Antti Karttunen, <a href="/A331184/b331184.txt">Table of n, a(n) for n = 1..65537</a>
%H A331184 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%H A331184 <a href="/index/Si#SIGMAN">Index entries for sequences related to sigma(n)</a>
%o A331184 (PARI) up_to = 16384;
%o A331184 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 A331184 A318310aux(n) = [hammingweight(n), (2*n) - sigma(n)];
%o A331184 v331184 = ordinal_transform(vector(up_to,n,A318310aux(n)));
%o A331184 A331184(n) = v331184[n];
%Y A331184 Cf. A000120, A033879, A318310.
%Y A331184 Cf. also A331181, A331183.
%K A331184 nonn
%O A331184 1,2
%A A331184 _Antti Karttunen_, Jan 12 2020