login
A302660
a(n) = (prime(n) mod 9) + (prime(n) mod 10).
1
4, 6, 10, 14, 3, 7, 15, 10, 8, 11, 5, 8, 6, 10, 9, 11, 14, 8, 11, 9, 4, 16, 5, 17, 14, 3, 7, 15, 10, 8, 8, 6, 9, 13, 14, 8, 11, 4, 12, 5, 17, 2, 3, 7, 15, 10, 5, 10, 9, 13, 11, 14, 8, 9, 12, 5, 17, 2, 14, 3, 7, 8, 8, 6, 10, 9, 8, 11, 12, 16, 5, 17, 14, 7, 10, 8, 11, 8, 6, 13, 14, 8, 9, 4, 16, 5, 17, 14, 3, 7, 15, 11, 8, 6, 13
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
FORMULA
a(n) = A038194(n) + A007652(n).
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
Sequence in context: A079524 A141740 A088135 * A255005 A376379 A137699
KEYWORD
nonn,easy
AUTHOR
Dimitris Valianatos, Apr 11 2018
STATUS
approved