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.

Showing 1-2 of 2 results.

A184594 Where A184593, the difference between 5n and A101306(n), becomes a new record in either direction.

Original entry on oeis.org

1, 2, 5, 6, 20, 21, 35, 62, 64, 65, 67, 97, 159, 198, 267, 444, 449, 499, 761, 764, 800, 801, 802, 803, 804, 810, 886, 1413, 1435, 1613, 1614, 1615, 1634, 2566, 2568, 4162, 4653, 6115, 6118, 6120, 6121, 6124, 6136, 7063, 7070, 7071, 7075, 7076, 7118, 7119, 7424
Offset: 1

Views

Author

Robert G. Wilson v, Jan 17 2011

Keywords

Comments

Use the first Mathematica program in A184593 to produce the difference.

Crossrefs

Cf. A184593.

Programs

  • Mathematica
    k = 1; p = 2; lst = {}; mn = mx = s = 0; While[p < 10^5, s = s + Mod[p, 10]; d = s - 5 k; If[ Positive@ d, If[d > mx, AppendTo[lst, k]; mx = d], If[d < mn, AppendTo[lst, k]; mn = d]]; k++; p = NextPrime@ p]; lst

A277097 a(n) = 5 - (prime(n) mod 10).

Original entry on oeis.org

3, 2, 0, -2, 4, 2, -2, -4, 2, -4, 4, -2, 4, 2, -2, 2, -4, 4, -2, 4, 2, -4, 2, -4, -2, 4, 2, -2, -4, 2, -2, 4, -2, -4, -4, 4, -2, 2, -2, 2, -4, 4, 4, 2, -2, -4, 4, 2, -2, -4, 2, -4, 4, 4, -2, 2, -4, 4, -2, 4, 2, 2, -2, 4, 2, -2, 4, -2, -2, -4, 2
Offset: 1

Views

Author

Dimitris Valianatos, Sep 29 2016

Keywords

Comments

Except for a(1)=3 and a(3)=5 the entries are either {-4, -2, 2, 4} and occur in roughly equal ratios. - Robert G. Wilson v, Nov 04 2016

Examples

			For n = 10 and prime(10) = 29, so a(10) = 5 - 9 = -4.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := 5 - Mod[Prime[n], 10]; Array[f, 71] (* Robert G. Wilson v, Nov 04 2016 *)
  • PARI
    a(n) = my(p=prime(n)); (10*(p\10)+5) - p; \\ Michel Marcus, Sep 30 2016

Formula

a(n) = 5 - A007652(n). - Robert G. Wilson v, Nov 04 2016
Showing 1-2 of 2 results.