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.

A318311 Filter sequence combining A278222(n) and A294898(n).

This page as a plain text file.
%I A318311 #7 Aug 26 2018 12:27:31
%S A318311 1,1,2,1,3,4,5,1,6,7,8,9,10,11,12,1,13,14,15,16,17,18,19,20,21,8,22,
%T A318311 23,24,25,26,1,27,28,29,30,31,32,19,33,34,35,36,37,38,39,40,41,42,43,
%U A318311 44,45,46,47,48,49,50,51,52,53,54,55,56,1,57,58,59,60,61,62,63,64,65,66,67,10,68,69,70,71,72,73,74,75,76,77,78,62,79
%N A318311 Filter sequence combining A278222(n) and A294898(n).
%C A318311 Restricted growth sequence transform of ordered pair [A278222(n), A294898(n)].
%C A318311 For all i, j: a(i) = a(j) => A318310(i) = A318310(j) => A033879(i) = A033879(j).
%H A318311 Antti Karttunen, <a href="/A318311/b318311.txt">Table of n, a(n) for n = 1..65537</a>
%o A318311 (PARI)
%o A318311 up_to = 65537;
%o A318311 rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
%o A318311 A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
%o A318311 A294898(n) = (A005187(n)-sigma(n));
%o A318311 A318311aux(n) = [A278222(n), A294898(n)]; \\ Needs also code from A286622.
%o A318311 v318311 = rgs_transform(vector(up_to,n,A318311aux(n)));
%o A318311 A318311(n) = v318311[n];
%Y A318311 Cf. A033879, A278222, A286622, A294898, A318310.
%K A318311 nonn
%O A318311 1,3
%A A318311 _Antti Karttunen_, Aug 25 2018