OFFSET
1,4
EXAMPLE
a(7) = a(77) = 0, a(1294) = 14.
MAPLE
catDigs := proc(L, i, j) local k ; add(L[k]*10^(k-i), k=i..j) ; end: A037282 := proc(n) local L, w, i, lenL, a ; L := convert(n, base, 10) ; lenL := nops(L) ; for w from lenL to 1 by -1 do for i from lenL-w+1 to 1 by -1 do a := catDigs(L, i, i+w-1) ; if isprime(a) then a := catDigs(L, 1, i-1)+10^(i-1)*catDigs(L, i+w, lenL) ; RETURN(A037282(a)) ; fi ; od: od: RETURN(n) ; end: seq(A037282(n), n=1..150) ; # R. J. Mathar, Oct 12 2007
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
More terms from R. J. Mathar, Oct 12 2007
STATUS
approved