login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A065521
a(n) = floor(prime(n) / n) * n - prime(n) mod n.
1
2, 1, 1, 1, 9, 11, 11, 13, 13, 11, 13, 35, 37, 41, 43, 43, 43, 47, 47, 49, 53, 53, 55, 55, 53, 55, 59, 61, 65, 67, 121, 125, 127, 133, 131, 137, 139, 141, 145, 147, 149, 155, 153, 159, 163, 169, 165, 161, 165, 171, 175, 177, 183, 181, 183, 185, 187, 193, 195, 199
OFFSET
1,1
LINKS
FORMULA
a(n) = A038605(n) * n - A004648(n).
MATHEMATICA
Table[Floor[Prime[n]/n]n-Mod[Prime[n], n], {n, 60}] (* Harvey P. Dale, Dec 27 2019 *)
PROG
(PARI) { for (n=1, 1000, a=floor(prime(n) / n) * n - prime(n) % n; write("b065521.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 20 2009
(PARI) a(n) = n*(prime(n)\n) - (prime(n) % n); \\ Michel Marcus, Jun 18 2018
CROSSREFS
Sequence in context: A123602 A208896 A288972 * A225700 A156188 A179930
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Nov 27 2001
STATUS
approved