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 A372897 #42 May 26 2024 15:55:21 %S A372897 4,33,303,2670,23741,222638,2211826,22325173,220321667,2128051302, %T A372897 20606839279,203631013986,2048538361591,20655036405780, %U A372897 205672896661755,2012878671315492,19505453673514959,190027534666354756,1884928265282803982,19032829919297816897,193085599933330233795 %N A372897 Count of n-digit numbers whose sum of digits is a prime. %C A372897 a(n) is the number of terms in A028834 with n digits. %C A372897 Sum of digits s in n digits is a composition of s into n parts the first of which ranges 1 to 9 and the rest 0 to 9. The number of such compositions is the coefficient of x^s in polynomial (x^1 + ... + x^9)*(x^0 + ... + x^9)^(n-1) and a(n) is the sum of those coefficients where s is prime. - _Kevin Ryde_, May 19 2024 %C A372897 a(554) is the first term for which number_of_digits(a(n)) != n. - _Antoine Mathys_, May 22 2024 %H A372897 Antoine Mathys, <a href="/A372897/b372897.txt">Table of n, a(n) for n = 1..1000</a> %e A372897 For n=1 the a(1)=4 numbers are 2,3,5,7. %t A372897 a[n_]:=Sum[Coefficient[Sum[x^i,{i,9}]Sum[x^i,{i,0,9}]^(n-1),x^i],{i,Prime[Range[PrimePi[9n]]]}]; Array[a,21] (* _Stefano Spezia_, May 16 2024 *) %o A372897 (PARI) a(n)=my(p=sum(i=1,9,x^i)*sum(i=0,9,x^i)^(n-1),s=0);forprime(q=2,9*n,s+=polcoef(p,q));s; %Y A372897 Cf. A000720, A028834. %K A372897 nonn,base %O A372897 1,1 %A A372897 _Antoine Mathys_, May 15 2024 %E A372897 a(12)-a(21) from _Stefano Spezia_, May 16 2024