OFFSET
1,1
COMMENTS
"Odd digits" means odd-valued digits (not digits in odd-indexed positions).
FORMULA
EXAMPLE
The sequence of the sums of odd digits is 0, 3=3, 5=5, 7=7, 1+7=8, 1+9=10, 3+7=10, 5+9=14, 7+9=16, 9+7=16, 1+7+9=17, 1+9+7=17, 1+9+9=19 and so on. - R. J. Mathar, Feb 02 2015
MAPLE
A158085 := proc(n)
option remember;
if n =1 then
2;
else
for a from procname(n-1)+1 do
if isprime(a) then
return a;
end if;
end if;
end do:
end if; # R. J. Mathar, Feb 02 2015
MATHEMATICA
spl[n_]:=Module[{sod=Total[Select[IntegerDigits[n], OddQ]], p1= NextPrime[ n]}, While[ Total[ Select[ IntegerDigits[ p1], OddQ]]<sod, p1=NextPrime[ p1]]; p1]; NestList[spl, 2, 40] (* Harvey P. Dale, Nov 15 2018 *)
CROSSREFS
KEYWORD
nonn,base,less
AUTHOR
Juri-Stepan Gerasimov, Mar 12 2009
EXTENSIONS
Corrected (997 inserted, 1699 removed, 9199 to 9739 inserted) by R. J. Mathar, May 19 2010
STATUS
approved