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 A284463 #15 Apr 22 2021 04:45:12 %S A284463 1,0,1,1,1,1,2,1,1,1,2,1,12,1,2,2,1,1,65,1,23,2,2,1,351,1,2,1,38,1, %T A284463 15778,1,1,2,2,2,10252,1,2,2,1601,1,302265,1,80,750,2,1,299426,1, %U A284463 13404,2,107,1,1618192,2,5031,2,2,1,707445067,1,2,2398,1,2,119762253,1,173,2,39614048,1,255418101,1,2,154603 %N A284463 Number of compositions (ordered partitions) of n into prime divisors of n. %H A284463 Alois P. Heinz, <a href="/A284463/b284463.txt">Table of n, a(n) for n = 0..2000</a> %H A284463 <a href="/index/Com#comp">Index entries for sequences related to compositions</a> %F A284463 a(n) = [x^n] 1/(1 - Sum_{p|n, p prime} x^p). %F A284463 a(n) = 1 if n is a prime power > 1. %F A284463 a(n) = 2 if n is a squarefree semiprime. %e A284463 a(6) = 2 because 6 has 4 divisors {1, 2, 3, 6} among which 2 are primes {2, 3} therefore we have [3, 3] and [2, 2, 2]. %p A284463 a:= proc(n) option remember; local b, l; %p A284463 l, b:= numtheory[factorset](n), %p A284463 proc(m) option remember; `if`(m=0, 1, %p A284463 add(`if`(j>m, 0, b(m-j)), j=l)) %p A284463 end; b(n) %p A284463 end: %p A284463 seq(a(n), n=0..100); # _Alois P. Heinz_, Mar 28 2017 %t A284463 Table[d = Divisors[n]; Coefficient[Series[1/(1 - Sum[Boole[PrimeQ[d[[k]]]] x^d[[k]], {k, Length[d]}]), {x, 0, n}], x, n], {n, 0, 75}] %o A284463 (Python) %o A284463 from sympy import divisors, isprime %o A284463 from sympy.core.cache import cacheit %o A284463 @cacheit %o A284463 def a(n): %o A284463 l=[x for x in divisors(n) if isprime(x)] %o A284463 @cacheit %o A284463 def b(m): return 1 if m==0 else sum(b(m - j) for j in l if j <= m) %o A284463 return b(n) %o A284463 print([a(n) for n in range(101)]) # _Indranil Ghosh_, Aug 01 2017, after Maple code %Y A284463 Cf. A000040, A014652, A023360, A066882, A100346. %K A284463 nonn %O A284463 0,7 %A A284463 _Ilya Gutkovskiy_, Mar 27 2017