OFFSET
2,1
COMMENTS
Does there exist a solution for every prime p?
LINKS
Chai Wah Wu, Table of n, a(n) for n = 2..34
EXAMPLE
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.
MAPLE
A052022(n) = {
local( p, m );
p=prime(n) ;
for(k=2, 1000000000,
m=k*p;
return(m) ;
)
) ;
} # R. J. Mathar, Mar 02 2012
MATHEMATICA
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,base,nice
AUTHOR
Patrick De Geest, Nov 15 1999
EXTENSIONS
a(20)-a(29) from Donovan Johnson, May 09 2012
STATUS
approved