login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A141062
a(n) = (prime(n) - 1) mod (sum of digits of prime(n)).
0
1, 2, 4, 6, 0, 0, 0, 8, 2, 6, 2, 6, 0, 0, 2, 4, 2, 4, 1, 6, 2, 14, 5, 3, 0, 0, 2, 2, 8, 2, 6, 0, 4, 8, 8, 3, 0, 2, 12, 7, 8, 0, 3, 10, 9, 8, 2, 5, 6, 7, 0, 0, 2, 2, 4, 9, 13, 0, 4, 5, 9, 12, 6, 0, 4, 8, 1, 11, 10, 12, 0, 1, 14, 8, 17, 4, 8, 16, 0, 5, 12, 0, 6, 2, 6, 2, 6, 8, 9, 7, 7, 18, 11, 0, 14, 6, 4, 0, 2
OFFSET
1,2
EXAMPLE
Prime(1) = 2, so a(1) = (2 - 1) mod 2 = 1 mod 2 = 1;
prime(5) = 11, so a(5) = (11 - 1) mod (1+1) = 10 mod 2 = 0.
MAPLE
sd:=proc(n) options operator, arrow: add(convert(n, base, 10)[j], j=1..nops(convert(n, base, 10))) end proc: seq(`mod`(ithprime(n)-1, sd(ithprime(n))), n= 1..100); # Emeric Deutsch, Aug 23 2008
CROSSREFS
Sequence in context: A328784 A128124 A182687 * A131806 A004518 A013670
KEYWORD
nonn,base,less
AUTHOR
EXTENSIONS
Corrected and extended by Emeric Deutsch, Aug 23 2008
STATUS
approved