OFFSET
1,2
COMMENTS
a(3) = 0 because the numbers of the form 10..010..01 are divisible by 3. Conjecture : except for the numbers 1 and 3, for every possible square digit sum there exists a prime.
EXAMPLE
a(13) = 23 because 2^2 + 3^2 = 13, and 23 is the least such prime.
MAPLE
with(numtheory):for k from 2 to 100 do: id:=0:for p from 1 to 100000 while(id=0)
do:n:=ithprime(p):l:=length(n):n0:=n:s:=0:for m from 1 to l do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10):n0:=v :s:=s+u^2:od: if s=k then id:=1:printf(`%d, `, n):else fi:od:od:
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Mar 26 2011
STATUS
approved