OFFSET
1,2
COMMENTS
For n a prime, a(n) must be of the form p^(n-1) for some prime, p.
MAPLE
with(numtheory): a:= proc(k) local s, m, n, d, i: if isprime(k) then for i from 1 do m:=ithprime(i)^(k-1): s:=convert(m, base, 10): if(s[nops(s)]=1) then RETURN(m) fi od else for d from 0 to 20 do for n from 0 to 10^d-1 do m:=10^d+n: if tau(m)=k then RETURN(m) fi od od: RETURN(0) fi: end: seq(a(k), k=1..33); # C. Ronaldo
with(numtheory): a:= proc(k) options remember: local s, m, n, d, i: if isprime(k) then for i from 1 do m:=ithprime(i)^(k-1): s:=convert(m, base, 10): if(s[nops(s)]=1) then RETURN(m) fi od else for d from 0 do for n from 0 to 10^d-1 do m:=10^d+n: if tau(m)=k then RETURN(m) fi od od: RETURN(0) fi: end: seq(a(k), k=1..35); # C. Ronaldo
MATHEMATICA
a = Table[0, {25}], Do[ If[ IntegerDigits[n][[1]] == 1, b = DivisorSigma[0, n]; If[ a[[b]] == 0, a[[b]] = n; Print[b, " = ", n]]], {n, 1, 2*10^7}] (* Robert G. Wilson v, Nov 15 2003 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Nov 14 2003
EXTENSIONS
Edited, corrected and extended by Robert G. Wilson v and Ray Chandler, Nov 15 2003
More terms from C. Ronaldo (aga_new_ac(AT)hotmail.com), Jan 02 2005
STATUS
approved