OFFSET
1,2
EXAMPLE
Prime(1) = 2, so a(1) = 1 mod 2 = 1;
prime(5) = 11, so a(5) = 5 mod (1+1) = 5 mod 2 = 1.
MAPLE
sd:=proc(n) options operator, arrow: add(convert(n, base, 10)[j], j=1..nops(convert(n, base, 10))) end proc: seq(`mod`(n, sd(ithprime(n))), n=1..100); # Emeric Deutsch, Aug 16 2008
PROG
(PARI) a(n) = n % sumdigits(prime(n)); \\ Michel Marcus, Feb 18 2021
CROSSREFS
KEYWORD
nonn,base,less
AUTHOR
Juri-Stepan Gerasimov, Aug 04 2008
EXTENSIONS
Corrected and extended by Emeric Deutsch, Aug 16 2008
STATUS
approved