OFFSET
1,1
EXAMPLE
139 is in the sequence because 1*1! + 3*2! + 9*3! = 1 + 6 + 54 = 61 is prime.
MAPLE
for n from 1 to 140 do :l:=length(n):n0:=n:s:=0:for m from l by -1 to 1 do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10):n0:=v :s:=s+u*m!:od: if type(s, prime)=true then printf(`%d, `, n):else fi:od:
MATHEMATICA
Select[Range[200], PrimeQ[Total[IntegerDigits[#]Range[IntegerLength[#]]!]]&] (* Harvey P. Dale, Apr 12 2023 *)
PROG
(PARI) is_A198096(n)=isprime(sum(k=1, #n=Vecsmall(Str(n)), (n[k]-48)*k!)) \\ M. F. Hasler, Jan 26 2012
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Oct 21 2011
STATUS
approved