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.

User: P. Michael Kielstra

P. Michael Kielstra's wiki page.

P. Michael Kielstra has authored 2 sequences.

A335992 Numbers that are the average of more pairs of distinct twin primes than any previous number.

Original entry on oeis.org

1, 4, 8, 12, 24, 57, 105, 150, 330, 645, 666, 945, 1155, 1770, 1785, 2625, 2925, 3255, 3465, 5145, 5460, 5775, 6930, 8295, 10605, 11340, 13650, 15015, 17205, 18480, 19635, 21945, 27930, 30030, 38115, 42735, 45045, 48840, 51765, 53130
Offset: 1

Author

P. Michael Kielstra, Jul 04 2020

Keywords

Comments

Let T(n) be the number of pairs of twin primes (that is, primes p where p+2 or p-2 is also prime) with average n. These are the positions at which T(n) attains high-water marks.

Examples

			1 is not the average of any pairs of twin primes.  4 is the average of one pair of twin primes: 3 and 5.  8 is the average of two pairs of twin primes: 5 and 11, and 3 and 13.  (Note that the difference between the twin primes in each pair is not necessarily 2.  However, both members of the pair are twin primes, that is, prime numbers p such that either p+2 or p-2 is also prime.  The fact that their twins are not part of the pair doesn't matter.)
		

Crossrefs

The values attained at these high-water marks are given in A335993.

Programs

  • Mathematica
    m = 10^4; tp = Select[Range[3, m, 2], PrimeQ[#] && Or @@ PrimeQ[# + {-2, 2}] &]; f[n_] := Module[{k = Length @ IntegerPartitions[n, {2}, tp]}, If[MemberQ[tp, n/2], k - 1, k]]; s = {}; fm = 0; Do[f1 = f[n]; If[f1 > fm, fm = f1; AppendTo[s, n]], {n, 2, m/2, 2}]; Prepend[s/2, 1] (* Amiram Eldar, Jul 11 2020 *)

A335993 High-water marks of the sequence given by the number of twin primes with average n.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 12, 13, 16, 18, 20, 24, 32, 34, 44, 48, 52, 54, 62, 66, 70, 74, 88, 94, 108, 118, 120, 132, 138, 152, 158, 170, 190, 216, 232, 250, 252, 260, 282, 290, 318, 332, 378, 384, 396, 446, 450, 452, 480, 481, 502, 512, 526, 532, 552, 592, 624, 641, 674, 692, 708, 728, 820, 850
Offset: 1

Author

P. Michael Kielstra, Jul 04 2020

Keywords

Comments

Let T(n) be the number of twin primes with average n. These are the high-water marks of the sequence T(n).

Crossrefs

The positions at which those high-water marks are attained are given in A335992.

Programs

  • Mathematica
    m = 10^4; tp = Select[Range[3, m, 2], PrimeQ[#] && Or @@ PrimeQ[# + {-2, 2}] &]; f[n_] := Module[{k = Length @ IntegerPartitions[n, {2}, tp]}, If[MemberQ[tp, n/2], k - 1, k]]; s = {}; fm = 0; Do[f1 = f[n]; If[f1 > fm, fm = f1; AppendTo[s, f1]], {n, 2, m/2, 2}]; Prepend[s, 0] (* Amiram Eldar, Jul 11 2020 *)