Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #8 Jul 26 2015 01:52:10
%S 23,233,7,73,11,4801,11,17,13,19,17,337,17,23,19,31,23,151,23,29,29,
%T 31,29,73,29,41,31,37,37,619,37,41,37,43,41,61,41,47,43,61,47,67,47,
%U 53,53,61,53,73,53,59,59,61,59,79,59,71,61,67,67,109,67,71,67,73,71,101,71,83
%N a(n) is the smallest prime whose base-n digits add up to a composite number.
%C Inspired by a homework problem in Crandall and Pomerance, Prime Numbers.
%e 23 = 10111 (base 2) and 1+1+1+1=4, 233 = 22122 (base 3) and 2+2+1+2+2=9, 337 = 1,12,12 (base 13) and 1+12+12=25.
%t f[n_] := Block[{p = PrimePi[n] + 1}, While[ PrimeQ[Plus @@ IntegerDigits[Prime[p], n]], p++ ]; Prime[p]]; Table[ f[n], {n, 2, 70}] (* _Robert G. Wilson v_, Aug 21 2004 *)
%K nonn,base
%O 2,1
%A _John L. Drost_, Aug 19 2004
%E More terms from _Robert G. Wilson v_, Aug 21 2004