OFFSET
1,1
COMMENTS
The sum (prime(n) mod 9 + prime(n) mod 10) gives numbers between 2 and 17.
For large n the distribution is displayed in the diagram below.
.
^
|
3y| .. . . . . . . . . .. o o
| /:\ /:\
| / : \ / : \
2y| .. . . . . . o / : o--o : \ o
| /:\ / : : : : \ /:\
| / | \ / : | | : \ / | \
y| .. o--o--o : o--o : : : : o--o : o--o--o
| /. . . | . . : | | : . . | . . .\
| / . . . : . . : : : : . . : . . . \
|__o__o__o__o__o__o__o__o__o__o__o__o__o__o__o__o__o__o__\
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 /
.
If y is the quantity for {2, 3, 4, 6, 7, 12, 13, 15, 16, 17} (same)
then 2y is the quantity of {5, 9, 10, 14} (same) and
3y is the quantity for {8, 11} (same).
Example: For primes less than 10^10, the distribution of frequencies of a(n) from 2 to 17 is {18960677, 18960726, 18960712, 37920181, 18959991, 18960427, 56880630, 37923467, 37921201, 56882003, 18960991, 18960869, 37920879, 18960270, 18959802, 18959685}.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
For n=7, prime(7) = 17, 17 mod 9 = 8 and 17 mod 10 = 7. So a(7) = 8 + 7 = 15.
MAPLE
map(t -> (t mod 9)+(t mod 10), [seq(ithprime(i), i=1..100)]); # Robert Israel, Jun 10 2018
MATHEMATICA
Array[Mod[#, 9] + Mod[#, 10] &@ Prime@ # &, 95] (* Michael De Vlieger, Apr 21 2018 *)
PROG
(PARI) {forprime(n = 2, 1000, s = n%9 + n%10; print1(s", "))}
(Magma) [(NthPrime(n) mod 9) + (NthPrime(n) mod 10): n in [1..100]]; // Vincenzo Librandi, Jun 10 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Dimitris Valianatos, Apr 11 2018
STATUS
approved