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 A319705 #11 Sep 26 2018 16:24:28 %S A319705 1,2,3,4,5,6,7,8,9,10,11,12,11,13,14,15,5,16,11,17,18,19,20,21,22,23, %T A319705 24,25,20,26,27,28,29,30,31,32,33,34,35,36,33,37,38,39,40,41,42,43,44, %U A319705 45,46,47,38,48,49,50,51,52,53,54,42,55,56,57,58,59,11,60,61,62,20,63,33,64,65,66,67,68,42,69,70,71,38,72,73,74,75,76,38,77,78,79,80,81,82,83,11,84,85,86,38 %N A319705 Filter sequence which for primes p records a distinct value for each distinct multiset formed from the lengths of 1-runs in its binary representation [A286622(p)], and for all other numbers assigns a unique number. %C A319705 Restricted growth sequence transform of function f defined as f(n) = A278222(n) when n is a prime, otherwise -n. %C A319705 After its initial term 3, Fermat primes (A019434) gives the positions of 5 in this sequence, while the Mersenne primes (A000668) are each assigned to their own singleton equivalence class. %C A319705 For all i, j: %C A319705 a(i) = a(j) => A305900(i) = A305900(j), %C A319705 a(i) = a(j) => A286622(i) = A286622(j), %C A319705 a(i) = a(j) => A305795(i) = A305795(j). %H A319705 Antti Karttunen, <a href="/A319705/b319705.txt">Table of n, a(n) for n = 1..100000</a> %o A319705 (PARI) %o A319705 up_to = 100000; %o A319705 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 A319705 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; %o A319705 A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523 %o A319705 A278222(n) = A046523(A005940(1+n)); %o A319705 A319705aux(n) = if(isprime(n),A278222(n),-n); %o A319705 v319705 = rgs_transform(vector(up_to,n,A319705aux(n))); %o A319705 A319705(n) = v319705[n]; %Y A319705 Cf. A000668, A019434, A278222, A286163, A286622, A305795, A305900. %Y A319705 Cf. also A319704, A319706. %K A319705 nonn %O A319705 1,2 %A A319705 _Antti Karttunen_, Sep 26 2018