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: Yifan Xie

Yifan Xie's wiki page.

Yifan Xie has authored 45 sequences. Here are the ten most recent ones:

A386376 a(n) is the smallest integer k such that b(n,k) is squarefree, where b(n,1) = n and b(n, k+1) = b(n,k) + rad(b(n, k)) for k >= 1.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 2, 5, 1, 1, 4, 1, 1, 1, 4, 1, 3, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 8, 1, 1, 1, 2, 7, 1, 1, 8, 3, 7, 1, 2, 1, 7, 1, 2, 1, 1, 1, 6, 1, 1, 5, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 6, 2, 1, 1, 1, 6, 5, 1, 1, 4, 1, 1, 1
Offset: 1

Author

Yifan Xie, Aug 20 2025

Keywords

Comments

rad(k) = A007947(k) is the largest squarefree integer dividing n.
Proof of a(n)'s existence: (Start)
Let c(n,k) = b(n,k) / rad(b(n,k)). Suppose that c(n,k) > 1 for all positive integers k. Pick k such that c(n,k) = m is the smallest. Let p be the smallest prime not dividing b(n,k). There exists an integer 1 <= i' <= p-1 such that p divides m + i'. So there exists a smallest integer 1 <= i <= i' such that m + i has a prime divisor not dividing b(n,k). From the minimality of i, for 1 <= j <= i-1, c(n,k+j) = m + j does not produce prime divisors not dividing b(n,k).
From the choice of i, there exists a prime q >= p such that q does not divide b(n,k) but q divides m + i. Then c(n,k+i) = (rad(b(n,k+i-1) * (c(n,k+i-1) + 1)) / rad(rad(b(n,k+i-1) * (c(n,k+i-1) + 1)) <= (c(n,k+i-1) + 1) / q <= (m + i) / p <= (m + p - 1) / p < m, because m > 1, a contradiction from the minimality of m. (End)

Examples

			For n = 9, b(9,1) = 9, b(9,2) = 9 + rad(9) = 12, b(9,3) = 12 + rad(12) = 18, b(9,4) = 18 + rad(18) = 24, b(9,5) = 24 + rad(24) = 30 is squarefree, so a(9) = 5.
		

Crossrefs

Programs

  • Mathematica
    rad[m_]:=Times@@(First@# & /@ FactorInteger@ m);a[n_]:=Module[{k=1,b=n},While[!SquareFreeQ[b],k++;b=b+rad[b]];k];Array[a,87] (* James C. McMahon, Aug 25 2025 *)
  • PARI
    A007947(n) = factorback(factorint(n)[, 1]);
    a(n) = {my(cnt = 1, x = n); while(x != A007947(x), x += A007947(x); cnt++); cnt};

A385675 For positive integers n, a multiset A of positive integers is called "n-good" if for any number 1 <= i <= n, we can find a submultiset B of A such that the sum of B is equal to i. a(n) is the number of minimal n-good multisets.

Original entry on oeis.org

1, 2, 3, 7, 9, 18, 27, 47, 62, 101, 140, 226, 301, 437, 579, 838, 1077, 1525, 1985, 2721, 3470, 4674, 5899, 7843, 9773, 12703, 15803, 20431, 25129, 32167, 39519, 49982, 60928, 76373, 92537, 115313, 138969, 171372, 205847, 252604, 301444, 367890, 438145, 531202, 630209
Offset: 1

Author

Yifan Xie, Aug 05 2025

Keywords

Comments

An n-good multiset A is minimal if it is impossible to get another n-good multiset by deleting one element from A.
An n-good multiset must contain 1 and have a sum of elements >= n. - Michael S. Branicky, Aug 13 2025

Examples

			For n = 6, {1, 2, 3} and {1, 1, 3, 6} are minimal n-good multisets.
		

Crossrefs

Cf. A126796.

Programs

  • Python
    # for illustrative purposes
    from functools import cache
    from itertools import chain, combinations, combinations_with_replacement as cwr
    def f(t): return tuple(e for e in t if e != 0)
    def powerset(s): return chain.from_iterable(combinations(s, r) for r in range(len(s)+1))
    @cache
    def good(n, A): return 1 in A and sum(A) >= n and set(range(1, n+1))-set(sum(B) for B in powerset(A)) == set()
    def a(n): return sum(good(n, A) and all(not good(n, A[:i]+A[i+1:]) for i in range(len(A))) for A in map(f, cwr(range(n+1), n)))
    print([a(n) for n in range(1, 11)]) # Michael S. Branicky, Aug 13 2025

A386820 a(n) is the size of largest subset of {1, 1/2, ..., 1/n} that can be partitioned into two parts, the sum of elements of which are equal.

Original entry on oeis.org

0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 6, 6, 6, 9, 9, 9, 11, 11, 11, 14, 14, 14
Offset: 1

Author

Yifan Xie, Aug 03 2025

Keywords

Examples

			For a(6) = 4, the set {1, 1/2, 1/3, 1/6} is chosen because 1 = 1/2 + 1/3 + 1/6.
The two parts for a(18) = 11 are 1 + 1/5 + 1/6 + 1/15 = 1/2 + 1/3 + 1/4 + 1/9 + 1/10 + 1/12 + 1/18.
The two parts for a(20) = 11 are 1 + 1/9 + 1/10 + 1/15 + 1/18 = 1/2 + 1/3 + 1/5 + 1/6 + 1/12 + 1/20.
		

Crossrefs

Formula

a(n) = a(n-1) if n/k = p is a prime and p > A001008(k).

A385366 a(n) = Sum_{permutations p of [n]} des(p^2), where des(p) is the number of descents of p.

Original entry on oeis.org

0, 0, 2, 24, 192, 1560, 13680, 131040, 1370880, 15603840, 192326400, 2554675200, 36404121600, 554204851200, 8979363993600, 154305575424000, 2803653844992000, 53708801642496000, 1082001156268032000, 22869278876860416000, 506043617700741120000, 11699825757321461760000
Offset: 1

Author

Yifan Xie, Jun 26 2025

Keywords

Examples

			For the permutation p = (2, 3, 4, 1), p^2 = (3, 4, 1, 2), and des(p) = des(p^2) = 1 (because 4 > 1).
		

Crossrefs

Cf. A001286.

Programs

  • Mathematica
    A385366[n_] := If[n <= 2, 0, (n - 1)!*(n^2 - n - 4)/2];
    Array[A385366, 25] (* Paolo Xausa, Jul 14 2025 *)
  • PARI
    a(n)=if(n>2,(n-1)!*(n^2-n-4)/2, 0);

Formula

a(n) = 0 if n <= 2; a(n) = (n-1)!*(n^2-n-4)/2 if n >= 3.

A384424 The maximal possible number of 'good' steps in a Hamiltonian cycle on the n X n king's graph, as is specified in the comments.

Original entry on oeis.org

0, 0, 5, 8, 16, 24, 36, 44
Offset: 1

Author

Yifan Xie, May 28 2025

Keywords

Comments

The cycle is drawn on an n X n square grid. Denote the geometric center of the grid by O. An edge a -> b on the cycle is 'good' if the distance from b to O is strictly less than the distance from a to O.
The n = 8 case is Grade 9, Problem 4 of 2025 All-Russian Olympiad.

Examples

			Proof that a(6) <= 24: Mark the cells on a 6 X 6 grid with the following symbols:
  ABXXBA
  BXXXXB
  XXOOXX
  XXOOXX
  BXXXXB
  ABXXBA
The 4 steps to A and the 4 steps from O must be non-'good'. For each A, the 2 steps to the neighboring B's cannot both be 'good', or they must both be A -> B. So there are at least 4 + 4 + 4 = 12 non-'good' steps, hence a(6) <= 24.
		

Crossrefs

Cf. A308129.

A383622 First differences of A383621.

Original entry on oeis.org

1, 4, 5, 7, 11, 13, 14, 17, 19, 20, 23, 25, 28, 29, 31, 35, 37, 41, 43, 44, 46, 47, 49, 52, 53, 55, 59, 61, 65, 67, 68, 70, 71, 73, 76, 77, 79, 83, 85, 89, 91, 92, 95, 97, 98, 100, 101, 103, 107, 109, 113, 115, 116, 119, 121, 124, 125, 127, 131, 133, 137, 139, 140, 143
Offset: 1

Author

Yifan Xie, May 10 2025

Keywords

Comments

The multiplication table T(i,j) = A027649(i) * A007310(j) for i >= 0 and j >= 1, sorted in ascending order. There are repeating terms: 322 appears twice.

Crossrefs

Programs

  • PARI
    A027649(n) = 2*3^n-2^n;
    upto(nn) = {v=[]; for(n=0, logint(nn,3), d = A027649(n); m = floor(nn/d); for(i=0, floor(m/6), if(6*i+1 <= m, v=concat(v, d*(6*i+1))); if(6*i+5 <= m, v=concat(v, d*(6*i+5))))); v=vecsort(v); v};

Formula

a(n) ~ c*n, where c = 3*(Sum_{k=0..oo} 1/A027649(k))^(-1) = 2.216821...

A383621 a(n) is the minimum possible value of x_1 + x_2 + ... + x_n where x_1, x_2, ..., x_n are positive integers such that x_i does not divide x_j for any i != j.

Original entry on oeis.org

1, 5, 10, 17, 28, 41, 55, 72, 91, 111, 134, 159, 187, 216, 247, 282, 319, 360, 403, 447, 493, 540, 589, 641, 694, 749, 808, 869, 934, 1001, 1069, 1139, 1210, 1283, 1359, 1436, 1515, 1598, 1683, 1772, 1863, 1955, 2050, 2147, 2245, 2345, 2446, 2549, 2656, 2765, 2878
Offset: 1

Author

Yifan Xie, May 10 2025

Keywords

Comments

The sequence is the solution to Problem 9 of 2022 Chinese Team Selection Test. - Yifan Xie, Jun 27 2025

Examples

			For n <= 6, the construction is given by the n smallest primes.
For n = 7, the numbers 4, 5, 6, 7, 9, 11, 13 are mutually indivisible and their sum is a(7) = 55.
		

Crossrefs

Cf. A027649.
Partial sums of A383622.

Programs

  • PARI
    A027649(n) = 2*3^n-2^n;
    A383622(nn) = {my(v=[]); for(n=0, logint(nn,3), d = A027649(n); m = floor(nn/d); for(i=0, floor(m/6), if(6*i+1 <= m, v=concat(v, d*(6*i+1))); if(6*i+5 <= m, v=concat(v, d*(6*i+5))))); v=vecsort(v); v};
    lista(nn) = {u = A383622(3*nn); my(v=vector(nn)); s=0; for(n=1, nn, s = s + u[n]; v[n] = s); v};

Formula

a(n) ~ c*n^2, where c = (3/2)*(Sum_{k=0..oo} 1/A027649(k))^(-1) = 1.108410...

A383614 The unique sequence such that Sum_{d|n} d*a(d)^(n/d) = sigma(n)^2 for every n.

Original entry on oeis.org

1, 4, 5, 4, 7, -10, 9, -44, -23, -197, 13, -845, 15, -2340, -701, -9164, 19, -31578, 21, -124979, -11355, -381326, 25, -1778580, -3323, -5162265, -212899, -21915630, 31, -70256029, 33, -311369996, -4439583, -1010580635, -129393, -4135827284, 39, -14467258386
Offset: 1

Author

Yifan Xie, May 02 2025

Keywords

Comments

Replace the sequence A072861 on the right-hand side of the equation with any integer sequence. It can be proved that the resulting sequence {a(n)} contain only integer terms if and only if for any prime p and positive integer n such that val(n, p) = k, p^k divides s(n) - s(n/p). The simplest sequence satisfying this property is A000203, and the resulting sequence {a(n)} is the constant sequence of 1's.
In 2025 China Team Selection Test, Test 4, Day 1, Problem 1, this sequence gives {z(n)} when {x(n)} and {y(n)} are constant sequences of 1's.

Examples

			For n = 1, the equation gives a(1) = sigma(1)^2 = 1;
For n = 6, the equation gives 1*1^6 + 2*4^3 + 3*5^2 + 6*a(6) = sigma(6)^2 = 144, so a(6) = -10.
		

Crossrefs

Programs

  • PARI
    lista(nn) = {my(v=vector(nn)); v[1] = 1; for(n=2, nn, s = sigma(n)^2; fordiv(n, d, s -= d*v[d]^(n/d)); v[n]=s/n); v}

Formula

For prime p, a(p) = p + 2.

A383194 The least number of times that b(k) = 2*k - 1 for the first n terms of a "mean-central" sequence, as is defined in A383192.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 10, 10, 10, 10, 10, 11, 11
Offset: 1

Author

Yifan Xie, Apr 21 2025

Keywords

Comments

Problem 2 of the 2025 European Girls' Mathematical Olympiad implies that a(n) -> oo as n -> oo.

Crossrefs

A383193 The lexicographically earliest "mean-central" sequence, as is defined in A383192.

Original entry on oeis.org

1, 3, 5, 6, 10, 11, 12, 13, 19, 20, 21, 23, 25, 26, 27, 28, 36, 37, 38, 39, 41, 42, 46, 47, 49, 51, 53, 55, 56, 57, 58, 59, 69, 70, 71, 72, 73, 75, 77, 78, 82, 83, 84, 85, 91, 92, 93, 94, 98, 99, 101, 102, 106, 107, 109, 111, 113, 115, 117, 118, 119, 120
Offset: 1

Author

Yifan Xie, Apr 20 2025

Keywords

Crossrefs