cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A302660 a(n) = (prime(n) mod 9) + (prime(n) mod 10).

Original entry on oeis.org

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

Views

Author

Dimitris Valianatos, Apr 11 2018

Keywords

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
| /. . . | . . : | | : . . | . . .\
| / . . . : . . : : : : . . : . . . \
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}.

Examples

			For n=7, prime(7) = 17, 17 mod 9 = 8 and 17 mod 10 = 7. So a(7) = 8 + 7 = 15.
		

Crossrefs

Programs

  • Magma
    [(NthPrime(n) mod 9) + (NthPrime(n) mod 10): n in [1..100]]; // Vincenzo Librandi, Jun 10 2018
  • 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 *)
  • PARI
    {forprime(n = 2, 1000, s = n%9 + n%10; print1(s", "))}
    

Formula

a(n) = A038194(n) + A007652(n).