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: Peter Munn

Peter Munn's wiki page.

Peter Munn has authored 152 sequences. Here are the ten most recent ones:

A385176 Positive half of inverse speed permutation array. Square array A(n,k), n >= 0, k >= 0, read by ascending antidiagonals.

Original entry on oeis.org

1, -1, 2, 2, 2, 3, 2, -1, 3, 4, -2, 3, 3, 4, 5, -2, 3, -1, 4, 5, 6, 3, 3, 4, 4, 5, 6, 7, 3, -2, 4, -1, 5, 6, 7, 8, 3, -2, 4, 5, 5, 6, 7, 8, 9, -3, 4, 4, 5, -1, 6, 7, 8, 9, 10, -3, 4, -2, 5, 6, 6, 7, 8, 9, 10, 11, -3, 4, -2, 5, 6, -1, 7, 8, 9, 10, 11, 12, 4, 4, 5, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13
Offset: 0

Author

Peter Munn, Jun 20 2025

Keywords

Comments

Particles labeled with nonzero integers j start at time t = 0 at x = 2k (offset from the origin) on a straight line. Each particle, j, moves at speed -1/j, so crosses the origin at time t = 2j^2. T(n,k) gives the label of the particle in the line segment (2k, 2k+2) at time t = 2n+1.
It is easy to determine that particles labeled i and -j cross at x = 2*(i-j) at time t = 2ij, and that (for t > 0) a particle crosses x = 2k only when encountering a particle heading in the opposite direction. So at t = 2n+1 there is exactly one particle in each segment (2k, 2k+2) and the particle labels define a bi-infinite permution of the nonzero integers. For the terms of this sequence, we restrict k >= 0; and taking the absolute values of the terms in each row gives a permutation of the positive integers. Moreover, the differences between row n-1 and row n consist of exchanges of paired divisors of -n.
The halved positions, k, at which particles encounter a segment boundary x = 2k at t = 2n are given by row n of A368312. So when that row starts with a 0, this indicates a particle crossing the origin. On the other hand, the nonzero terms, k, of row t of A211343 indicate the segment midpoints x = 2k-1 that are encountered by particles at time t, with terms in odd (respectively even) columns corresponding to positive-labeled (respectively negative-labeled) particles.

Examples

			Square array A(n,k) begins:
   n   t\k|   0    1    2    3    4    5    6    7    8    9   10   11   12
  --------+-----------------------------------------------------------------
   0   1  |   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13
   1   3  |  -1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13
   2   5  |   2,  -1,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13
   3   7  |   2,   3,  -1,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13
   4   9  |  -2,   3,   4,  -1,   5,   6,   7,   8,   9,  10,  11,  12,  13
   5  11  |  -2,   3,   4,   5,  -1,   6,   7,   8,   9,  10,  11,  12,  13
   6  13  |   3,  -2,   4,   5,   6,  -1,   7,   8,   9,  10,  11,  12,  13
   7  15  |   3,  -2,   4,   5,   6,   7,  -1,   8,   9,  10,  11,  12,  13
   8  17  |   3,   4,  -2,   5,   6,   7,   8,  -1,   9,  10,  11,  12,  13
   9  19  |  -3,   4,  -2,   5,   6,   7,   8,   9,  -1,  10,  11,  12,  13
  10  21  |  -3,   4,   5,  -2,   6,   7,   8,   9,  10,  -1,  11,  12,  13
  11  23  |  -3,   4,   5,  -2,   6,   7,   8,   9,  10,  11,  -1,  12,  13
  12  25  |   4,  -3,   5,   6,  -2,   7,   8,   9,  10,  11,  12,  -1,  13
		

Crossrefs

A386236 Ratio of the period and the reduced period of the Fibonacci 3-step sequence A000073 mod n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 3, 1, 1, 1, 3, 3, 1, 3, 1, 1, 1, 1, 3, 3, 3, 1, 1, 1, 1, 1, 1, 3, 3, 1, 3, 3, 1, 1, 3, 1, 1, 3, 1, 1, 1, 3, 1, 1, 3, 1, 3, 1, 3, 3, 1, 1, 1, 3, 1, 3, 1, 3, 1, 1, 1, 1, 3, 1, 3, 3, 1, 1, 3, 3, 3, 3, 1, 3, 1, 1, 3, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, 3, 1, 1, 3, 3, 1, 1, 1, 3, 3, 3
Offset: 1

Author

Peter Munn, Jul 16 2025

Keywords

Comments

The period is A046738(n) and the reduced period is A046737(n).
See also the information in A154754 and A046737.

Crossrefs

The equivalent sequence for Fibonacci numbers is A001176.
Cf. A060839 (differs first at n=31), A154754 (restriction to prime indices).

Formula

a(n) = A046738(n)/A046737(n).

A385504 Binomially timely primes: primes prime(k) that do not arrive late in comparison with the binomially weighted average of prime(1) .. prime(2k-1).

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 23, 31, 43, 47, 53, 61, 73, 79, 83, 89, 103, 107, 109, 113, 139, 151, 167, 181, 193, 197, 199, 211, 233, 239, 241, 271, 277, 281, 283, 293, 313, 317, 353, 359, 383, 389, 401, 443, 449, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 617
Offset: 1

Author

Peter Munn, Jul 11 2025

Keywords

Comments

Primes prime(k) such that prime(k) <= A007443(2k-1)/2^(2k-2), where prime(k) is the k-th prime and A007443 is the binomial transform of primes.
Though the average uses all primes from 2 to prime(2k-1), their influence is substantially weighted towards the primes nearer to prime(k).
Some previously studied sets of primes that depend on each prime's relationship with a broad neighborhood of primes, e.g., convex hull primes (A319126) and A124661, can be shown to be subsets of these timely primes, and some other such sets, e.g., popular primes (A385503), look likely to be shown to be subsets too.
Comments about density within the primes: (Start)
The progressive decrease in density of the primes means this weighted average we are using might be seen as slightly biased so that primes that are "only approximately on time" qualify for the sequence. Nevertheless, this bias in the average seems to be significantly less than 0.5, slowly decreasing with index, and the author expects an analytically derivable asymptote (for the bias) of about 0.25. See also the comments in A302334.
The early race behavior (timely primes v. their complement within the primes) looks like races where the chosen subset's relative asymptotic density is 0.5 and where this subset is ahead except for occasional relatively short excursions where the complement takes over. Here, timely primes are ahead for more than 80% of the indices up to the 500th prime; they then lead continuously up to the 10000th prime, where their lead has fallen below 50 after a peak greater than 200. See the graph in the links. (End)

Examples

			The binomially weighted averages can be computed by taking progressive averages as shown in the table below:
   n   prime |<- progressive averages ... ->
  -------------------------------------------
   1:   _2_                              the _underlined_ values are the averaged primes
              5/2
   2:    3         _13/4_                   <-- 13/4 is thus the 2nd averaged prime
               4            33/8
   3:    5           5            _83/16_       <-- 83/16 is thus the 3rd averaged prime
               6            25/4  ...
   4:    7          15/2   ...              <-- 15/2 is the average of 6 and 9
               9  ...
   5:   11  ...
  ...
3 is less than 13/4, so 3 is in the sequence.
5 is less than 83/16, so 5 is in the sequence.
If we continue the average table above, we find the 5th averaged prime is 10 + 147/256, and the 5th prime, 11, is greater than this, so 11 is not in the sequence.
		

Crossrefs

See the comments for the relationship with A007443.
See the formula section for the relationship with A302334.
A124661, A319126 are subsets.

Programs

  • PARI
    \\ See Links

Formula

{a(n) : n >= 1} = {prime(k) : k >= 1 and prime(k) <= A302334(k)}.

A385503 Popular primes.

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 23, 31, 43, 47, 73, 83, 109, 113, 199, 283, 467, 661, 773, 887, 1109, 1129, 1327, 1627, 2143, 2399, 2477, 2803, 2861, 2971, 3739, 3931, 3947, 4297
Offset: 1

Author

Peter Munn, Jul 01 2025

Keywords

Comments

McNew says that a prime p is "popular" on an interval [2, k] if no prime occurs more frequently than p as the greatest prime factor (gpf, A006530) of the integers in that interval. - N. J. A. Sloane, Jul 25 2017
Does there exist two popular primes p < q such that q gets popular earlier than p, i.e., such that q is popular (for the first time) on [2,k] but p is not popular on [2,j] for any j < k? - Pontus von Brömssen, Jul 02 2025

Crossrefs

A384003 Irregular triangle T(n,k), n >= 0, 0 <= k < 2^(n-1), where T(n,k) = Product_{j=0..n-1} prime(j+1)^((n-j)*d_j), where d_j is the bit with digit weight 2^j in the binary expansion of 2^(n-1)+k.

Original entry on oeis.org

1, 2, 3, 12, 5, 40, 45, 360, 7, 112, 189, 3024, 175, 2800, 4725, 75600, 11, 352, 891, 28512, 1375, 44000, 111375, 3564000, 539, 17248, 43659, 1397088, 67375, 2156000, 5457375, 174636000, 13, 832, 3159, 202176, 8125, 520000, 1974375, 126360000, 4459, 285376, 1083537
Offset: 0

Author

Michael De Vlieger and Peter Munn, May 28 2025

Comments

This sequence can be seen as a structured ordering of numbers m that are not divisible by the square of their greatest prime factor and where every prime in the canonical factorization of m has the same sum of prime index and exponent. For example, prime(1)^3 * prime(3)^1 = 2^3 * 5 = 40. The ordering is lexicographic according to prime divisors listed in decreasing order, as used for A019565. Row n has the numbers whose greatest prime factor is prime(n).

Examples

			Table begins:
n\k  0    1    2     3    4     5     6       7
-----------------------------------------------
0:   1;
1:   2;
2:   3,  12;
3:   5,  40,  45,  360;
4:   7, 112, 189, 3024, 175, 2800, 4725, 75600;
     ...
Table showing prime power decomposition of a(n), where A067255(a(n)) represents prime(i)^j | a(n), with j in the i-th position, replacing 0 with "." for visibility:
 n     a(n)  A067255(a(n))
--------------------------
 0       1   .
 1       2   1
 2       3   .1
 3      12   21
 4       5   ..1
 5      40   3.1
 6      45   .21
 7     360   321
 8       7   ...1
 9     112   4..1
10     189   .3.1
11    3024   43.1
12     175   ..21
13    2800   4.21
14    4725   .321
15   75600   4321
		

Programs

  • Mathematica
    f[x_] := If[x == 1, {0}, Function[g, ReplacePart[Table[0, {PrimePi[f[[-1, 1]] ]}], #] &@ Map[PrimePi@ First@ # -> Last@ # &, g]]@ FactorInteger@ x]; Table[f[Reverse@ Range[Length[#]]*#] &@ Reverse@ IntegerDigits[n, 2], {n, 0, 120}]

Formula

T(0,0) = 1; T(1,0) = 2.
Otherwise, T(n,2k) = A003961(T(n-1,k)).
T(n,2k+1) = T(n,2k)*2^n.
T(n,0) = prime(n).
T(n,2^(n-1)-1) = A006939(n).
T(n,2^(n-2)) = A251720(n).
Using a(m) to denote a term of the linear sequence with offset 0: (Start)
A019565(m) = A007947(a(m)).
a(m) = T(n,k) = gcd(A019565(m)^n, A006939(n)).
Equivalently, for p = A000040(i), the i-th prime, p|a(m) iff p|A019565(m), in which case A060175(m,i) = j - i + 1, where j = PrimePi(gpf(A019565(m))) = A061395(A019565(m)).
(End)
For n > 0, A071178(T(n,k)) = 1.

Extensions

Name edited by Peter Munn, Aug 30 2025

A384149 Irregular triangle T(n, k) in which row n gives the 2-densely-aggregated composition of sigma(n).

Original entry on oeis.org

1, 3, 1, 3, 7, 1, 5, 12, 1, 7, 15, 1, 3, 9, 3, 15, 1, 11, 28, 1, 13, 3, 21, 1, 8, 15, 31, 1, 17, 39, 1, 19, 42, 1, 3, 7, 21, 3, 33, 1, 23, 60, 1, 5, 25, 3, 39, 1, 3, 9, 27, 56, 1, 29, 72, 1, 31, 63, 1, 3, 11, 33, 3, 51, 1, 12, 35, 91, 1, 37, 3, 57, 1, 3, 13, 39, 90, 1, 41, 96, 1, 43, 7, 77, 1, 32, 45
Offset: 1

Author

Peter Munn, May 22 2025

Keywords

Comments

We form the 2-densely-aggregated composition of sigma(n) = A000203(n) by listing the divisors of n in increasing order and assigning adjacent divisors for summation in the same aggregate if (and only if) they differ by a factor of less than or equal to 2. The ordering of the aggregate sums in the composition follows the ordering of the summed divisors.
We follow here the use of 2-dense/2-densely reported in the comments of A174973.
If n is in A174973 then row n has length 1 and its sole term is sigma(n).
From empirical evidence of the first 1000 rows, reinforced by some known related properties, it looks readily credible that if we take the average of row n and its reversal we get A237270 row n, a palindromic composition of sigma(n) that was defined using Dyck paths. Row lengths are therefore conjectured to be in the database as A237271.

Examples

			For row 9: the ordered divisors of 9 are (1, 3, 9). Adjacent divisors differ by a factor of 3, which is greater than 2, so each divisor is trivially summed into a separate aggregate and the 2-densely-aggregated composition of sigma(9) is (1, 3, 9).
For row 12, the ordered divisors of 12 are (1, 2, 3, 4, 6, 12). Every pair of adjacent divisors differs by a factor <= 2, so they are summed in a single aggregate and the 2-densely-aggregated composition of sigma(12) is (1+2+3+4+6+12) = (28).
For row 10, the ordered divisors of 10 are (1, 2, 5, 10). The adjacent divisors (1, 2) and (5, 10) differ by a factor of 2, but (2, 5) differ by a larger factor, so there are 2 aggregates and the 2-densely-aggregated composition of sigma(10) is (1+2, 5+10) = (3, 15).
For 29029 = 7 * 11 * 13 * 29, the 2-densely-aggregated composition of sigma(29029) is (1, 7+11+13, 29, 77+91+143+203+319+377, 1001, 2233+2639+4147, 29029) = (1, 31, 29, 1210, 1001, 9019, 29029). Note that this composition is not in ascending order.
Triangle begins:
  row
   1  1,
   2  3,
   3  1, 3,
   4  7,
   5  1, 5,
   6  12,
   7  1, 7,
   8  15,
   9  1, 3, 9,
  10  3, 15,
  11  1, 11,
  12  28,
  13  1, 13,
  14  3, 21,
  15  1, 8, 15,
  16  31,
  ...
If we take the average of row 9, (1, 3, 9) and its reversal, (9, 3, 1), we get (5, 3, 5), which is A237270 row 9. Doing the same for row 10, (3, 15), we get (9, 9), which is A237270 row 10.
		

Crossrefs

Programs

  • Mathematica
    t384149[n_] := Module[{dL = Divisors[n]}, Map[#[[1]] &, Map[Apply[Plus, #] &, Split[Transpose[{dL, Append[Rest[dL], 2 n + 1]}], #[[2]] <= 2 #[[1]] &]]]] (* row n of triangle *)
    a384149[n_] := Flatten[Map[t384149, Range[n]]]
    a384149[45] (* Hartmut F. W. Hoft, Jun 07 2025 *)

A379271 Composite numbers, k, whose prime factors, viewed on a log log scale, have a small standard deviation defined with respect to bigomega(k), as specified in the comments.

Original entry on oeis.org

4, 6, 8, 9, 10, 12, 15, 16, 18, 20, 21, 24, 25, 27, 28, 30, 32, 33, 35, 36, 39, 40, 42, 44, 45, 48, 49, 50, 51, 52, 54, 55, 56, 57, 60, 63, 64, 65, 66, 68, 70, 72, 75, 76, 77, 78, 80, 81, 84, 85, 88, 90, 91, 92, 95, 96, 98, 99, 100, 102, 104, 105, 108, 110, 112, 114, 115, 116, 117, 119, 120, 121, 124, 125, 126, 128
Offset: 1

Author

Peter Munn, Feb 18 2025

Keywords

Comments

Composite numbers k (written as a product of primes p_1 * p_2 * ... * p_m) such that s( {log(log(p_i)) : 1 <= i <= m} ) < s( {i : 1 <= i <= m} ), where s is standard deviation and m = bigomega(k).
Loosely described, these are numbers whose prime factors, including repetitions, are relatively close together. (Note we get the same criterion irrespective of whether s is sample standard deviation or population standard deviation.)
The author's intent is to divide the set of composite numbers into 2 parts whose asymptotic densities differ at most by a small factor. So his choice of criterion was guided by particular information relating to the statistics of prime factors of large numbers.
From Charles R Greathouse IV, May 19 2025: (Start)
For example, semiprimes p*q with p <= q are in this sequence if (and only if) q < p^e where e = 2.71... is the base of the natural logarithm.
For any m, there are finitely many primes p (perhaps none) such that p*m is in the sequence. (End)

Crossrefs

Subsequences: A251728, the composites in A253784, A380438.

Programs

  • Mathematica
    Select[Select[Range[128], CompositeQ], Less @@ Map[StandardDeviation, Transpose@ MapIndexed[{Log@ Log[#1], First[#2]} &, Flatten[ConstantArray[#1, #2] & @@@ FactorInteger[#] ] ] ] &] (* Michael De Vlieger, May 04 2025 *)

A381500 a(n) = A019565(A187769(n)).

Original entry on oeis.org

1, 2, 3, 6, 5, 10, 15, 30, 7, 14, 21, 35, 42, 70, 105, 210, 11, 22, 33, 55, 77, 66, 110, 165, 154, 231, 385, 330, 462, 770, 1155, 2310, 13, 26, 39, 65, 91, 143, 78, 130, 195, 182, 273, 455, 286, 429, 715, 1001, 390, 546, 910, 1365, 858, 1430, 2145, 2002, 3003
Offset: 0

Author

Keywords

Comments

The squarefree numbers, ordered first by largest prime factor (dividing the sequence into rows), then by number of prime factors, then lexicographically by their prime factors (written in descending order).
We index (a(n)) from offset 0, matching the choice for A019565 and similar sequences.

Examples

			Table begins:
  Row 0:  1;
  Row 1:  2;
  Row 2:  3,  6;
  Row 3:  5, 10, 15, 30;
  Row 4:  7, 14, 21, 35, 42, 70, 105, 210;
  Row 5: 11, 22, 33, 55, 77, 66, 110, 165, 154, 231, 385, 330, 462, 770, 1155, 2310;
  ...
Table of a(n) for n = 0..31, demonstrating relationship of this sequence with s = A187769:
          <-factors                    <-factors
   n  a(n)  2 3 5 7  s(n)  |   n   a(n)  2 3 5 7 11 s(n)
  -------------------------|----------------------------
   0    1   .          0   |  16    11   . . . . x   16
   1    2   x          1   |  17    22   x . . . x   17
   2    3   . x        2   |  18    33   . x . . x   18
   3    6   x x        3   |  19    55   . . x . x   20
   4    5   . . x      4   |  20    77   . . . x x   24
   5   10   x . x      5   |  21    66   x x . . x   19
   6   15   . x x      6   |  22   110   x . x . x   21
   7   30   x x x      7   |  23   165   . x x . x   22
   8    7   . . . x    8   |  24   154   x . . x x   25
   9   14   x . . x    9   |  25   231   . x . x x   26
  10   21   . x . x   10   |  26   385   . . x x x   28
  11   35   . . x x   12   |  27   330   x x x . x   23
  12   42   x x . x   11   |  28   462   x x . x x   27
  13   70   x . x x   13   |  29   770   x . x x x   29
  14  105   . x x x   14   |  30  1155   . x x x x   30
  15  210   x x x x   15   |  31  2310   x x x x x   31
  -------------------------|----------------------------
            1 2 4 8  s(n)  |             1 2 4 8 16 s(n)
             bits->                         bits->
		

Crossrefs

Programs

  • Mathematica
    a187769 = {{0}}~Join~Table[SortBy[Range[2^n, 2^(n + 1) - 1], DigitCount[#, 2, 1] &], {n, 0, 8}] // Flatten; a019565[x_] := Times @@ Prime@ Flatten@ Position[#, 1] &@ Reverse@ IntegerDigits[x, 2]; Map[a019565, a187769]

Formula

a(n) = A019565(A187769(n)).
As an irregular triangle T(n,k), where row 0 = {1}:
For n > 1, omega(T(n,1)) = 1, omega(T(n, 2^(n-1))) = n, thus row n is divided into n segments S such that with S, omega(T(n,k)) = m, where m = 1..n. (See A187769 for the lengths of segments associated with Pascal's triangle A007318.)
S(-1,-1) = (1).
For n >= 0:
S(n-1, n) = (); S(n, -1) = ();
for 0 <= m <= n, S(n,m) = ( A253550'(S(n-1, m)), A119416'(S(n-1, m-1)) ), where Axxx'((i_1, i_2, ..., i_j)) denotes Axxx(i_1), Axxx(i_2), ..., Axxx(i_j).
a(A163866(n)) = A098012(n).

A378494 Intersection of A000379 and A026424.

Original entry on oeis.org

8, 12, 18, 20, 27, 28, 32, 44, 45, 48, 50, 52, 63, 68, 75, 76, 80, 92, 98, 99, 112, 116, 117, 120, 124, 125, 147, 148, 153, 162, 164, 168, 171, 172, 175, 176, 188, 207, 208, 212, 236, 242, 243, 244, 245, 261, 264, 268, 270, 272, 275, 279, 280, 284, 292, 304, 312, 316
Offset: 1

Author

Paolo Xausa, Nov 28 2024, following a suggestion from Peter Munn

Keywords

Comments

First differs from A187042 at n = 24, where a(24) = 120 is missing from A187042.

Crossrefs

Programs

  • Mathematica
    A000379Q[k_] := k == 1 || EvenQ[Count[IntegerDigits[FactorInteger[k][[All, 2]], 2], 1, 2]];
    A026424Q[k_] := OddQ[PrimeOmega[k]];
    Select[Range[500], A000379Q[#] && A026424Q[#] &]

A378489 Intersection of A000028 and A028260.

Original entry on oeis.org

4, 9, 16, 24, 25, 40, 49, 54, 56, 60, 81, 84, 88, 90, 96, 104, 121, 126, 132, 135, 136, 140, 150, 152, 156, 160, 169, 184, 189, 198, 204, 220, 224, 228, 232, 234, 240, 248, 250, 256, 260, 276, 289, 294, 296, 297, 306, 308, 315, 328, 336, 340, 342, 344, 348, 350
Offset: 1

Author

Paolo Xausa, Nov 28 2024, following a suggestion from Peter Munn

Keywords

Comments

First differs from A066427 at n = 11, where A066427(11) = 72 is missing from this sequence.

Crossrefs

Programs

  • Mathematica
    A000028Q[k_] := k > 1 && OddQ[Count[IntegerDigits[FactorInteger[k][[All, 2]], 2], 1, 2]];
    A028260Q[k_] := EvenQ[PrimeOmega[k]];
    Select[Range[500], A000028Q[#] && A028260Q[#] &]