cp's OEIS Frontend

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.

A384505 a(n) is the number of multisets of n positive decimal digits where the sum of the digits equals the product of the prime digits.

This page as a plain text file.
%I A384505 #7 Jun 22 2025 18:07:40
%S A384505 5,1,1,3,13,20,31,51,74,106,144,188,248,331,433,535,668,812,993,1206,
%T A384505 1435,1704,1991,2319,2688,3084,3529,3993,4514,5072,5675,6353,7097,
%U A384505 7915,8790,9724,10733,11803,12947,14164,15450,16809,18240,19757,21374,23073,24876,26759
%N A384505 a(n) is the number of multisets of n positive decimal digits where the sum of the digits equals the product of the prime digits.
%H A384505 Felix Huber, <a href="/A384505/b384505.txt">Table of n, a(n) for n = 1..200</a>
%F A384505 a(n) = A384445(n) - A384445(n-1) for n > 1.
%e A384505 a(1) = 5 because exactly for the 5 multisets with 1 digits {1}, {2}, {3}, {5}, and {7} their sum equals the product of the prime digits.
%e A384505 a(2) = 1 because only for 1 multiset with 2 positive digits {2, 2} their sum equals the product of the prime digits: 2 + 2 = 2*2 = 4.
%e A384505 a(3) = 1 because only for 1 multiset with 3 positive digits {1, 2, 3} their sum equals the product of the prime digits: 1 + 2 + 3 = 2*3 = 6.
%e A384505 a(4) = 3 because exactly for the 3 multisets with 4 digits {1, 2, 4, 7}, {1, 3, 5, 6}, and {5, 5, 6, 9} their sum equals the product of the prime digits: 1 + 2 + 4 + 7 = 2 * 7 = 14, 1 + 3 + 5 + 6 = 3*5 = 15, 5 + 5 + 6 + 9 = 5*5 = 25.
%p A384505 f:=proc(p,n)
%p A384505     local i,l,m,s,t,u,w,x,z;
%p A384505     m:={1,4,6,8,9};
%p A384505     t:=seq(cat(x,i),i in m);
%p A384505     Order:=p+1;
%p A384505     coeff(coeff(collect(convert(combstruct:-agfseries({l='Union'(t),w='Set'(l),t=~'Atom'},(map2(apply,s,{t})=~m) union {s(w)='Set'(s(l))},'unlabeled',z,[[u,s]])[w(z,u)],'polynom'),[z,u],'recursive'),z,p),u,n)
%p A384505 end proc:
%p A384505 A384505:=proc(n)
%p A384505     local a,k,m,s,p,j,L;
%p A384505     if n=1 then
%p A384505         5
%p A384505     elif n=2 then
%p A384505         1
%p A384505     else
%p A384505         a:=0;
%p A384505         for k from 9*n to 1 by -1 do
%p A384505             L:=ifactors(k)[2];
%p A384505             m:=nops(L);
%p A384505             if m>0 and L[m,1]<=7 then
%p A384505                 p:=n-add(L[j,2],j=1..m);
%p A384505                 s:=k-add(L[j,1]*L[j,2],j=1..m);
%p A384505                 if p>0 and s>0 then
%p A384505                     a:=a+f(p,s)
%p A384505                 fi
%p A384505             fi
%p A384505 	od;
%p A384505 	return a
%p A384505 	fi;
%p A384505 end proc;
%p A384505 seq(A384505(n),n=1..48);
%Y A384505 Partial sums give A384445.
%Y A384505 Cf. A002110, A006753, A007947, A007954, A066306, A067077, A384443, A384444.
%K A384505 nonn,base
%O A384505 1,1
%A A384505 _Felix Huber_, Jun 11 2025