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 A292267 #8 Oct 02 2017 18:58:53 %S A292267 1,2,3,4,5,6,7,8,9,10,5,11,12,10,13,14,15,16,17,18,12,19,7,20,21,22, %T A292267 23,24,25,26,27,28,7,29,30,31,32,33,34,35,36,37,9,38,39,16,15,40,41, %U A292267 42,43,44,7,45,17,46,13,47,7,48,49,33,43,50,51,52,25,53,54,55,56,57,13,58,59,60,61,33,23,62,63,64,12,65,66,10,67,57,68,69,70,71,17,72,25 %N A292267 Restricted growth sequence transform of A292268; filter combining multiplicative order of 2 mod 2n+1 and the number of trailing 1's in binary expansion of 2n+1. %H A292267 Antti Karttunen, <a href="/A292267/b292267.txt">Table of n, a(n) for n = 0..32768</a> %o A292267 (PARI) %o A292267 allocatemem(2^30); %o A292267 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 A292267 write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); } %o A292267 A002326(n) = if(n<0, 0, znorder(Mod(2, 2*n+1))); \\ This function from _Michael Somos_, Mar 31 2005 %o A292267 A007814(n) = valuation(n,2); %o A292267 A292268(n) = (1/2)*(2 + ((A002326(n)+A007814(2*(1+n)))^2) - A002326(n) - 3*A007814(2*(1+n))); %o A292267 write_to_bfile(0,rgs_transform(vector(32769,n,A292268(n-1))),"b292267_upto32768.txt"); %Y A292267 Cf. A002326, A007814, A292268. %Y A292267 Cf. A291766, A291769 for related filters. %K A292267 nonn %O A292267 0,2 %A A292267 _Antti Karttunen_, Oct 02 2017