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 A286851 #19 Feb 16 2025 08:33:45 %S A286851 1,1,2,2,2,2,25,2,2,2,129,2,170,2,742,450,2,2,4603,2,1503,3321,29967, %T A286851 2,9278,2,200390,2,13460,2,154004511,2,2,226020,9262157,51886,127654, %U A286851 2,63346598,2044895,170354,2,185493291001,2,1304512,567124,2972038875,2,59489916,2,20367343494,184947044,14324735,2 %N A286851 Number of compositions (ordered partitions) of n into unitary divisors of n. %H A286851 Alois P. Heinz, <a href="/A286851/b286851.txt">Table of n, a(n) for n = 0..2000</a> %H A286851 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/UnitaryDivisor.html">Unitary Divisor</a> %H A286851 <a href="/index/Com#comp">Index entries for sequences related to compositions</a> %F A286851 a(n) = [x^n] 1/(1 - Sum_{d|n, gcd(d, n/d) = 1} x^d). %F A286851 a(n) = 2 if n is a prime power (A246655). %e A286851 a(8) = 2 because 8 has 4 divisors {1, 2, 4, 8} among which 2 are unitary divisors {1, 8} therefore we have [8] and [1, 1, 1, 1, 1, 1, 1, 1]. %p A286851 a:= proc(n) option remember; local b, l; l, b:= %p A286851 select(x-> igcd(x, n/x)=1, numtheory[divisors](n)), %p A286851 proc(m) option remember; `if`(m=0, 1, %p A286851 add(`if`(j>m, 0, b(m-j)), j=l)) %p A286851 end; b(n) %p A286851 end: %p A286851 seq(a(n), n=0..60); # _Alois P. Heinz_, Aug 01 2017 %t A286851 Join[{1}, Table[d = Divisors[n]; Coefficient[Series[1/(1 - Sum[Boole[GCD[n/d[[k]], d[[k]]] == 1] x^d[[k]], {k, Length[d]}]), {x, 0, n}], x, n], {n, 1, 53}]] %o A286851 (Python) %o A286851 from sympy import divisors, gcd %o A286851 from sympy.core.cache import cacheit %o A286851 @cacheit %o A286851 def a(n): %o A286851 l=[x for x in divisors(n) if gcd(x, n//x)==1] %o A286851 @cacheit %o A286851 def b(m): return 1 if m==0 else sum(b(m - j) for j in l if j <= m) %o A286851 return b(n) %o A286851 print([a(n) for n in range(61)]) # _Indranil Ghosh_, Aug 01 2017, after Maple code %Y A286851 Cf. A066874, A100346, A246655, A284463, A284464, A284465, A284466. %K A286851 nonn %O A286851 0,3 %A A286851 _Ilya Gutkovskiy_, Aug 01 2017