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 A278219 #28 Dec 01 2021 03:53:16 %S A278219 1,2,4,2,4,8,6,2,4,12,16,8,6,12,6,2,4,12,36,12,16,32,24,8,6,30,24,12, %T A278219 6,12,6,2,4,12,36,12,36,72,60,12,16,48,64,32,24,72,24,8,6,30,60,30,24, %U A278219 48,60,12,6,30,24,12,6,12,6,2,4,12,36,12,36,72,60,12,36,180,144,72,60,180,60,12,16,48,144,48,64,128,96,32,24,120,216,72,24,72 %N A278219 Filter-sequence related to base-2 run-length encoding: a(n) = A046523(A243353(n)). %H A278219 Antti Karttunen, <a href="/A278219/b278219.txt">Table of n, a(n) for n = 0..65537</a> %F A278219 a(n) = A046523(A243353(n)). %F A278219 a(n) = A278222(A003188(n)). %F A278219 a(n) = A278220(1+A075157(n)). %t A278219 f[n_, i_, x_] := Which[n == 0, x, EvenQ@ n, f[n/2, i + 1, x], True, f[(n - 1)/2, i, x Prime@ i]]; g[n_] := If[n == 1, 1, Times @@ MapIndexed[ Prime[First@ #2]^#1 &, Sort[FactorInteger[n][[All, -1]], Greater]]]; %t A278219 Table[g@ f[BitXor[n, Floor[n/2]], 1, 1], {n, 0, 93}] (* _Michael De Vlieger_, May 09 2017 *) %o A278219 (Scheme) (define (A278219 n) (A046523 (A243353 n))) %o A278219 (Python) %o A278219 from sympy import prime, factorint %o A278219 import math %o A278219 def A(n): return n - 2**int(math.floor(math.log(n, 2))) %o A278219 def b(n): return n + 1 if n<2 else prime(1 + (len(bin(n)[2:]) - bin(n)[2:].count("1"))) * b(A(n)) %o A278219 def a005940(n): return b(n - 1) %o A278219 def P(n): %o A278219 f = factorint(n) %o A278219 return sorted([f[i] for i in f]) %o A278219 def a046523(n): %o A278219 x=1 %o A278219 while True: %o A278219 if P(n) == P(x): return x %o A278219 else: x+=1 %o A278219 def a003188(n): return n^int(n/2) %o A278219 def a243353(n): return a005940(1 + a003188(n)) %o A278219 def a(n): return a046523(a243353(n)) # _Indranil Ghosh_, May 07 2017 %Y A278219 Cf. A003188, A046523, A075157, A243353, A278220. %Y A278219 Other base-2 related filter sequences: A278217, A278222. %Y A278219 Sequences that (seem to) partition N into same or coarser equivalence classes are at least these: A005811, A136004, A033264, A037800, A069010, A087116, A090079 and many others like A105500, A106826, A166242, A246960, A277561, A037834, A225081 although these have not been fully checked yet. %K A278219 nonn %O A278219 0,2 %A A278219 _Antti Karttunen_, Nov 16 2016