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 A018818 #100 Jan 23 2025 12:57:16 %S A018818 1,2,2,4,2,8,2,10,5,11,2,45,2,14,14,36,2,81,2,92,18,20,2,458,7,23,23, %T A018818 156,2,742,2,202,26,29,26,2234,2,32,30,1370,2,1654,2,337,286,38,2, %U A018818 9676,9,407,38,454,2,3132,38,3065,42,47,2,73155,2,50,493,1828,44,5257,2,740,50,5066 %N A018818 Number of partitions of n into divisors of n. %C A018818 From _Reinhard Zumkeller_, Dec 11 2009: (Start) %C A018818 For odd primes p: a(p^2) = p + 2; for n > 1: a(A001248(n)) = A052147(n); %C A018818 For odd primes p > 3, a(3*p) = 2*p + 4; for n > 2: a(A001748(n)) = A100484(n) + 4. (End) %C A018818 From _Matthew Crawford_, Jan 19 2021: (Start) %C A018818 For a prime p, a(p^3) = (p^3 + p^2 + 2*p + 4)/2; %C A018818 For distinct primes p and q, a(p*q) = (p+1)*(q+1)/2 + 2. (End) %H A018818 Alois P. Heinz, <a href="/A018818/b018818.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from T. D. Noe) %H A018818 Douglas Bowman et al., <a href="https://www.jstor.org/stable/2325075">Problem 6640: Partitions of n into parts which are divisors of n</a>, American Mathematical Monthly, 99(3) (1992), 276-277. %H A018818 Hansraj Gupta, <a href="http://www.dli.gov.in/rawdataupload/upload/insa/INSA_2/20005a84_1276.pdf">Partitions of n into divisors of m</a>, Indian J. Pure Appl. Math., 6(11) (1975), 1276-1286. %H A018818 Hansraj Gupta, <a href="https://insa.nic.in/writereaddata/UpLoadedFiles/IJPAM/20005a84_1276.pdf">Partitions of n into divisors of m</a>, Indian J. Pure Appl. Math., 6(11) (1975), 1276-1286. %H A018818 Martin Klazar, <a href="http://arxiv.org/abs/1808.08449">What is an answer? — remarks, results and problems on PIO formulas in combinatorial enumeration, part I</a>, arXiv:1808.08449 [math.CO], 2018. %H A018818 Noah Lebowitz-Lockard and Joseph Vandehey, <a href="https://arxiv.org/abs/2402.08119">On the number of partitions of a number into distinct divisors</a>, arXiv:2402.08119 [math.NT], 2024. See p. 1. %H A018818 Rémy Sigrist, <a href="/A018818/a018818.png">Colored logarithmic scatterplot of the first 10000 terms</a> (where the color is function of A000005(n)). %H A018818 <a href="/index/Par#part">Index entries for sequences related to partitions</a>. %F A018818 Coefficient of x^n in the expansion of 1/Product_{d|n} (1-x^d). - _Vladeta Jovovic_, Sep 28 2002 %F A018818 a(n) = 2 iff n is prime. - _Juhani Heino_, Aug 27 2009 %F A018818 a(n) = f(n,n,1), where f(n,m,k) = f(n,m,k+1) + f(n,m-k,k)*0^(n mod k) if k <= m, otherwise 0^m. - _Reinhard Zumkeller_, Dec 11 2009 %F A018818 Paul Erdős, Andrew M. Odlyzko, and the Editors of the AMM give bounds; see Bowman et al. - _Charles R Greathouse IV_, Dec 04 2012 %e A018818 The a(6) = 8 representations of 6 are 6 = 3 + 3 = 3 + 2 + 1 = 3 + 1 + 1 + 1 = 2 + 2 + 2 = 2 + 2 + 1 + 1 = 2 + 1 + 1 + 1 + 1 = 1 + 1 + 1 + 1 + 1 + 1. %p A018818 A018818 := proc(n) %p A018818 local a,p,w,el ; %p A018818 a := 0 ; %p A018818 for p in combinat[partition](n) do %p A018818 w := true ; %p A018818 for el in p do %p A018818 if modp(n,el) <> 0 then %p A018818 w := false; %p A018818 break; %p A018818 end if; %p A018818 end do: %p A018818 if w then %p A018818 a := a+1 ; %p A018818 end if; %p A018818 end do: %p A018818 a ; %p A018818 end proc: # _R. J. Mathar_, Mar 30 2017 %t A018818 Table[d = Divisors[n]; Coefficient[Series[1/Product[1 - x^d[[i]], {i, Length[d]}], {x, 0, n}], x, n], {n, 100}] (* _T. D. Noe_, Jul 28 2011 *) %o A018818 (Haskell) %o A018818 a018818 n = p (init $ a027750_row n) n + 1 where %o A018818 p _ 0 = 1 %o A018818 p [] _ = 0 %o A018818 p ks'@(k:ks) m | m < k = 0 %o A018818 | otherwise = p ks' (m - k) + p ks m %o A018818 -- _Reinhard Zumkeller_, Apr 02 2012 %o A018818 (PARI) a(n)=numbpartUsing(n, divisors(n)); %o A018818 numbpartUsing(n, v, mx=#v)=if(n<1, return(n==0)); sum(i=1,mx, numbpartUsing(n-v[i],v,i)) \\ inefficient; _Charles R Greathouse IV_, Jun 21 2017 %o A018818 (PARI) A018818(n) = { my(p = Ser(1, 'x, 1+n)); fordiv(n, d, p /= (1 - 'x^d)); polcoef(p, n); }; \\ _Antti Karttunen_, Jan 23 2025, after _Vladeta Jovovic_ %o A018818 (Magma) [#RestrictedPartitions(n,{d:d in Divisors(n)}): n in [1..100]]; // _Marius A. Burtea_, Jan 02 2019 %Y A018818 Cf. A002577, A027750, A033630, A072721, A161148 (partitions in squared divisors), A171565, A210442, A211110, A225244, A306387, A379957. %Y A018818 Cf. A000005, A001248, A001748, A052147, A100484. %K A018818 nonn,nice,look %O A018818 1,2 %A A018818 _David W. Wilson_