login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A136251 a(n) = n-th prime reduced modulo the sum of its digits. 6
0, 0, 0, 0, 1, 1, 1, 9, 3, 7, 3, 7, 1, 1, 3, 5, 3, 5, 2, 7, 3, 15, 6, 4, 1, 1, 3, 3, 9, 3, 7, 1, 5, 9, 9, 4, 1, 3, 13, 8, 9, 1, 4, 11, 10, 9, 3, 6, 7, 8, 1, 1, 3, 3, 5, 10, 14, 1, 5, 6, 10, 13, 7, 1, 5, 9, 2, 12, 11, 13, 1, 2, 15, 9, 18, 5, 9, 17, 1, 6, 13, 1, 7, 3, 7, 3, 7, 9, 10, 8, 8, 19, 12, 1, 15, 7, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,8
COMMENTS
First occurrence of k: A138792. - Robert G. Wilson v, Mar 27 2008
LINKS
FORMULA
a(n) = A070635(A000040(n)). - Michel Marcus, Mar 07 2023
EXAMPLE
2 = 2*1 + 0
3 = 3*1 + 0
5 = 5*1 + 0
7 = 7*1 + 0
11 = 2*5 + 1 (the sum of the digits of 11 is equal to 2)
13 = 4*3 + 1
17 = 8*2 + 1
19 = 10*1 + 9
MAPLE
P := select(isprime, [2, seq(i, i=3..10^3, 2)]):
map(p -> p mod convert(convert(p, base, 10), `+`), P); # Robert Israel, Mar 05 2024
MATHEMATICA
f[n_] := Block[{p = Prime@n}, Mod[p, Plus @@ IntegerDigits@p]]; Array[f, 97] (* Robert G. Wilson v, Mar 27 2008 *)
PROG
(PARI) a(n) = my(p=prime(n)); p % sumdigits(p); \\ Michel Marcus, Mar 07 2023
CROSSREFS
Sequence in context: A324993 A068353 A346989 * A073002 A357044 A348302
KEYWORD
easy,nonn,base
AUTHOR
Odimar Fabeny, Mar 17 2008
EXTENSIONS
More terms from Robert G. Wilson v, Mar 27 2008
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 12:44 EDT 2024. Contains 371913 sequences. (Running on oeis4.)