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.

A052022 Smallest number m larger than prime(n) such that prime(n) = sum of digits of m and prime(n) = largest prime factor of m (or 0 if no such number exists).

This page as a plain text file.
%I A052022 #31 Apr 09 2021 10:42:39
%S A052022 12,50,70,308,364,476,1729,4784,9947,8959,38998,588965,179998,1879859,
%T A052022 5988788,38778989,79693999,287978998,1489989599,4595969989,6888999949,
%U A052022 45999897788,197999598599,3999966997975,6849998899886,7885998969988,35889999789995,39969896999968
%N A052022 Smallest number m larger than prime(n) such that prime(n) = sum of digits of m and prime(n) = largest prime factor of m (or 0 if no such number exists).
%C A052022 Does there exist a solution for every prime p?
%H A052022 Chai Wah Wu, <a href="/A052022/b052022.txt">Table of n, a(n) for n = 2..34</a>
%e A052022 p=43 -> a(14)=179998 -> 1+7+9+9+9+8 = 43 and 179998 = 2*7*13*23*43. p=47 -> a(15)=1879859 -> 1+8+7+9+8+5+9 = 47 and 1879859 = 23*37*47*47.
%p A052022 A052022(n) = {
%p A052022   local( p,m );
%p A052022   p=prime(n) ;
%p A052022   for(k=2,1000000000,
%p A052022     m=k*p;
%p A052022     if( A007953(m) == p && A006530(m) == p,
%p A052022         return(m) ;
%p A052022     )
%p A052022   ) ;
%p A052022 } # _R. J. Mathar_, Mar 02 2012
%t A052022 snm[n_]:=Module[{k=2,p=Prime[n],m},m=k p;While[Total[ IntegerDigits[ m]]!=p||FactorInteger[m][[-1,1]]!=p,k++;m=k p];m]; Array[snm,18,2] (* _Harvey P. Dale_, Feb 28 2012 *)
%o A052022 (PARI) a(n) = my(p=prime(n), k=2, m=k*p); while ((sumdigits(m) != p) || (vecmax(factor(m)[,1]) != p), k++; m = k*p); m; \\ _Michel Marcus_, Apr 09 2021
%Y A052022 Cf. A052018, A052019, A052020, A052021, A007953, A005349, A028834.
%K A052022 nonn,base,nice
%O A052022 2,1
%A A052022 _Patrick De Geest_, Nov 15 1999
%E A052022 a(20)-a(29) from _Donovan Johnson_, May 09 2012