login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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