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 A289838 #27 Apr 22 2021 09:30:44 %S A289838 1,2,2,3,6,6,3,6,6,4,10,10,12,30,30,12,30,30,4,10,10,12,30,30,12,30, %T A289838 30,5,14,14,15,42,42,15,42,42,20,70,70,60,210,210,60,210,210,20,70,70, %U A289838 60,210,210,60,210,210,5,14,14,15,42,42,15,42,42,20,70,70 %N A289838 a(n) = A289815(n) * A289816(n). %C A289838 Each number k > 0 appears 2^omega(k) times (where omega = A001221). %C A289838 a(A004488(n)) = a(n) for any n >= 0. %C A289838 The number of distinct prime factors of a(n) equals the number of nonzero digits in the ternary representation of n. %H A289838 Rémy Sigrist, <a href="/A289838/b289838.txt">Table of n, a(n) for n = 0..10000</a> %e A289838 a(42) = A289815(42) * A289816(42) = 20 * 3 = 60. %o A289838 (PARI) a(n) = { my (v=1); %o A289838 for (o=2, oo, %o A289838 if (n==0, return (v)); %o A289838 if (gcd(v, o)==1 && omega(o)==1, %o A289838 if (n % 3, v *= o); %o A289838 n \= 3; %o A289838 ); %o A289838 );} %o A289838 (Python) %o A289838 from sympy import gcd, primefactors %o A289838 def omega(n): return 0 if n==1 else len(primefactors(n)) %o A289838 def a(n): %o A289838 v, o = 1, 2 %o A289838 while True: %o A289838 if n==0: return v %o A289838 if gcd(v, o)==1 and omega(o)==1: %o A289838 if n%3: v*=o %o A289838 n //= 3 %o A289838 o+=1 %o A289838 print([a(n) for n in range(101)]) # _Indranil Ghosh_, Aug 02 2017 %Y A289838 Cf. A001221, A004488, A289815, A289816. %K A289838 nonn,base,look %O A289838 0,2 %A A289838 _Rémy Sigrist_, Jul 13 2017