%I #31 Sep 08 2022 08:46:21
%S 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,
%T 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,
%U 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
%N a(n) = (prime(n) mod 9) + (prime(n) mod 10).
%C The sum (prime(n) mod 9 + prime(n) mod 10) gives numbers between 2 and 17.
%C For large n the distribution is displayed in the diagram below.
%C .
%C ^
%C |
%C 3y| .. . . . . . . . . .. o o
%C | /:\ /:\
%C | / : \ / : \
%C 2y| .. . . . . . o / : o--o : \ o
%C | /:\ / : : : : \ /:\
%C | / | \ / : | | : \ / | \
%C y| .. o--o--o : o--o : : : : o--o : o--o--o
%C | /. . . | . . : | | : . . | . . .\
%C | / . . . : . . : : : : . . : . . . \
%C |__o__o__o__o__o__o__o__o__o__o__o__o__o__o__o__o__o__o__\
%C 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 /
%C .
%C If y is the quantity for {2, 3, 4, 6, 7, 12, 13, 15, 16, 17} (same)
%C then 2y is the quantity of {5, 9, 10, 14} (same) and
%C 3y is the quantity for {8, 11} (same).
%C 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}.
%H Robert Israel, <a href="/A302660/b302660.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A038194(n) + A007652(n).
%e For n=7, prime(7) = 17, 17 mod 9 = 8 and 17 mod 10 = 7. So a(7) = 8 + 7 = 15.
%p map(t -> (t mod 9)+(t mod 10), [seq(ithprime(i),i=1..100)]); # _Robert Israel_, Jun 10 2018
%t Array[Mod[#, 9] + Mod[#, 10] &@ Prime@ # &, 95] (* _Michael De Vlieger_, Apr 21 2018 *)
%o (PARI) {forprime(n = 2, 1000, s = n%9 + n%10; print1(s", "))}
%o (Magma) [(NthPrime(n) mod 9) + (NthPrime(n) mod 10): n in [1..100]]; // _Vincenzo Librandi_, Jun 10 2018
%Y Cf. A007652, A038194.
%K nonn,easy
%O 1,1
%A _Dimitris Valianatos_, Apr 11 2018
|