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: Manfred Boergens

Manfred Boergens's wiki page.

Manfred Boergens has authored 10 sequences.

A383168 Triangle T(n,k) read by rows: For closed chains of identical regular m-gons with connecting inner vertices lying n vertices apart, the n-th row lists the possible m in ascending order; n>=0, 1<=k<=d(8+4n).

Original entry on oeis.org

5, 6, 8, 12, 7, 8, 9, 10, 12, 18, 9, 10, 12, 16, 24, 11, 12, 14, 15, 20, 30, 13, 14, 15, 16, 18, 20, 24, 36, 15, 16, 18, 21, 28, 42, 17, 18, 20, 24, 32, 48, 19, 20, 21, 22, 24, 27, 30, 36, 54, 21, 22, 24, 25, 28, 30, 40, 60, 23, 24, 26, 33, 44, 66
Offset: 1

Author

Manfred Boergens, Apr 18 2025

Keywords

Comments

Consider j identical regular m-gons, assembled into a circular closed chain. Two neighboring polygons share an edge and two vertices, the "inner" one lying in the interior of the chain. The interior is a j-pointed star with equal edges.
n is introduced in order to partition the set of chains into finite subsets. Two neighboring star points are separated by n vertices; there the star has reflex angles. (With n=0, regular polygons are considered as stars with no reflex angles.)
For every m > 4 there exists a chain of m-gons.
A366872 gives the number of row elements.
This sequence is interconnected with A383169. For each n there are finitely many pairs (m,j) for j m-gons building closed chains. m are given by T(n,k) and the corresponding j are given by A383169(n,k).
j = 2 + (8+4n)/(m-4-2n).
m = 4 + 2n + (8+4n)/(j-2).
These two equations allow a computation of T(n,k) and A383169(n,k) from each other, see Formula.

Examples

			Triangle begins:
  5,  6,  8, 12;
  7,  8,  9, 10, 12, 18;
  9, 10, 12, 16, 24;
 11, 12, 14, 15, 20, 30;
 13, 14, 15, 16, 18, 20, 24, 36;
 15, 16, 18, 21, 28, 42;
 17, 18, 20, 24, 32, 48;
 19, 20, 21, 22, 24, 27, 30, 36, 54;
 21, 22, 24, 25, 28, 30, 40, 60;
 23, 24, 26, 33, 44, 66;
 25, 26, 27, 28, 30, 32, 36, 40, 48, 72;
 ...
The third row T(2,.) asserts that regular 9-gons, 10-gons, 12-gons, 16-gons and 24-gons are the only regular polygons which can be assembled to a closed chain with connecting inner vertices lying 2 vertices apart.
		

Crossrefs

Programs

  • Mathematica
    Table[4 + 2*n + Divisors[8 + 4 n], {n, 0, 10}]//Flatten

Formula

T(n,k) = 4+2n + (k-th divisor of 8+4n in ascending order).
T(n,k) = 4+2n + A027750(8+4n,k).
T(n,k) = 4+2n + (8+4n)/(A383169(n,k)-2).
A383169(n,k) = 2 + (8+4n)/(T(n,k)-4-2n).
T(n,1) = 5+2n.
T(n,2) = 6+2n.
T(n,2) = A383169(n,2).
T(n,3) = 7+2n if n=1 mod 3, else = 8+2n.
T(n,3) = A047244(5+n).
T(n,d(8+4n)) = 12+6n (last row elements).
T(n,d(8+4n)-1) = 8+4n (second to last row elements).
T(n,d(8+4n)-2) = (10/3)*(2+n) if n=1 mod 3, else = 3*(2+n) (third last row elements).

A383169 Triangle T(n,k) read by rows: For closed chains of j identical regular polygons with connecting inner vertices lying n vertices apart, the n-th row lists the possible j in descending order; n>=0, 1<=k<=d(8+4n).

Original entry on oeis.org

10, 6, 4, 3, 14, 8, 6, 5, 4, 3, 18, 10, 6, 4, 3, 22, 12, 7, 6, 4, 3, 26, 14, 10, 8, 6, 5, 4, 3, 30, 16, 9, 6, 4, 3, 34, 18, 10, 6, 4, 3, 38, 20, 14, 11, 8, 6, 5, 4, 3, 42, 22, 12, 10, 7, 6, 4, 3, 46, 24, 13, 6, 4, 3, 50, 26, 18, 14, 10, 8, 6, 5, 4, 3
Offset: 1

Author

Manfred Boergens, Apr 18 2025

Keywords

Comments

Consider j identical regular m-gons, assembled into a circular closed chain. Two neighboring polygons share an edge and two vertices, the "inner" one lying in the interior of the chain. The interior is a j-pointed star with equal edges.
n is introduced in order to partition the set of chains into finite subsets. Two neighboring star points are separated by n vertices; there the star has reflex angles. (With n=0, regular polygons are considered as stars with no reflex angles.)
For every j > 2 there exists a chain with exactly j polygons.
A366872 gives the number of row elements.
The descending order in the definition was chosen with respect to the interconnection with A383168. For each n there are finitely many pairs (m,j) for j m-gons building closed chains. j are given by T(n,k) and the corresponding m are given by A383168(n,k).
m = 4 + 2n + (8+4n)/(j-2).
j = 2 + (8+4n)/(m-4-2n).
These two equations allow a computation of T(n,k) and A383168(n,k) from each other, see Formula.

Examples

			Triangle begins:
 10,  6,  4,  3;
 14,  8,  6,  5,  4, 3;
 18, 10,  6,  4,  3;
 22, 12,  7,  6,  4, 3;
 26, 14, 10,  8,  6, 5, 4, 3;
 30, 16,  9,  6,  4, 3;
 34, 18, 10,  6,  4, 3;
 38, 20, 14, 11,  8, 6, 5, 4, 3;
 42, 22, 12, 10,  7, 6, 4, 3;
 46, 24, 13,  6,  4, 3;
 50, 26, 18, 14, 10, 8, 6, 5, 4, 3;
 ...
The third row T(2,.) asserts that closed chains of identical regular polygons with connecting inner vertices lying 2 vertices apart can only be assembled with 18, 10, 6, 4 or 3 polygons.
		

Crossrefs

Programs

  • Mathematica
    Table[2 + Sort[Divisors[8 + 4 n], Greater], {n, 0, 10}]//Flatten

Formula

T(n,k) = 2 + (k-th divisor of 8+4n in descending order).
T(n,k) = 2 + A027750(8+4n,A000005(8+4n)-k+1).
T(n,k) = 2 + (8+4n)/(A383168(n,k)-4-2n).
A383168(n,k) = 4 + 2n + (8+4n)/(T(n,k)-2).
T(n,1) = 10 + 4n.
T(n,2) = 6 + 2n.
T(n,2) = A383168(n,2).
T(n,3) = (2/3)*(7+2n) if n=1 mod 3, else = 4+n.
T(n,d(8+4n)) = 3 (last row elements).
T(n,d(8+4n)-1) = 4 (second to last row elements).
T(n,d(8+4n)-2) = 5 if n=1 mod 3, else = 6 (third last row elements).

A381683 Triangle read by rows: T(n,k) = number of collections of up to k subsets of [n] covering [n], with [0]={}; n>=0, k=0..2^n.

Original entry on oeis.org

1, 2, 0, 1, 2, 0, 1, 5, 9, 10, 0, 1, 14, 58, 125, 181, 209, 217, 218, 0, 1, 41, 401, 1947, 6091, 13987, 25395, 38261, 49701, 57709, 62077, 63897, 64457, 64577, 64593, 64594, 0, 1, 122, 2802, 30352, 210448, 1076880, 4385616, 14839576, 42831176, 107303376, 236306016, 462089756, 809460556, 1280895556, 1846618196, 2447698581
Offset: 0

Author

Manfred Boergens, Mar 04 2025

Keywords

Comments

Partial row sums of A163353.
For covers (collections without an empty set) see A369950.
For disjoint collections see A381682.
For disjoint covers see A102661.

Examples

			Triangle begins:
  1 2
  0 1  2
  0 1  5   9   10
  0 1 14  58  125  181   209   217   218
  0 1 41 401 1947 6091 13987 25395 38261 49701 57709 62077 63897 64457 64577 64593 64594
  ...
T(3,2)=14 is the number of covering collections of 1 or 2 subsets of [3]:
  {{1,2,3}}
  {{},{1,2,3}}
  {{1},{2,3}}
  {{1},{1,2,3}}
  {{2},{1,3}}
  {{2},{1,2,3}}
  {{3},{1,2}}
  {{3},{1,2,3}}
  {{1,2},{1,3}}
  {{1,2},{2,3}}
  {{1,3},{2,3}}
  {{1,2},{1,2,3}}
  {{1,3},{1,2,3}}
  {{2,3},{1,2,3}}.
		

Crossrefs

Cf. A000371 (diagonal).

Programs

  • Mathematica
    Table[Sum[Sum[(-1)^(n-i)*Binomial[n, i]*Binomial[2^i, j], {i, 0, n}], {j, 0, k}], {n, 0, 4}, {k, 0, 2^n}]//Flatten
  • PARI
    T(n,k) = sum(j=0,k, sum(i=0,n, (-1)^(n-i)*binomial(n,i)*binomial(2^i,j)));
    for(n=0,5,for(k=0,2^n,print1(T(n,k),", "))); \\ Joerg Arndt, Mar 04 2025

Formula

T(n,k) = Sum_{j=0..k} Sum_{i=0..n} (-1)^(n-i)*binomial(n,i)*binomial(2^i,j).

A381682 Triangle read by rows: T(n,k) = number of collections of up to k+1 disjoint subsets of [n] covering [n], with [0]={}, 0<=k<=n.

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 1, 5, 9, 10, 1, 9, 22, 29, 30, 1, 17, 57, 92, 103, 104, 1, 33, 154, 309, 389, 405, 406, 1, 65, 429, 1080, 1570, 1731, 1753, 1754, 1, 129, 1222, 3889, 6640, 7956, 8250, 8279, 8280, 1, 257, 3537, 14332, 29053, 38650, 41758, 42256, 42293, 42294
Offset: 0

Author

Manfred Boergens, Mar 04 2025

Keywords

Comments

Partial row sums of A256894.
For disjoint covers (collections without an empty set) see A102661.
For non-disjoint collections see A381683.
For non-disjoint covers see A369950.

Examples

			Triangle begins:
 1
 1   2
 1   3    4
 1   5    9    10
 1   9   22    29    30
 1  17   57    92   103   104
 1  33  154   309   389   405   406
 1  65  429  1080  1570  1731  1753  1754
 1 129 1222  3889  6640  7956  8250  8279  8280
 1 257 3537 14332 29053 38650 41758 42256 42293 42294
 ...
T(3,2)=9 is the number of disjoint [3]-covering collections of up to 3 subsets:
 {{1,2,3}}
 {{1,2,3},{}}
 {{1},{2,3}}
 {{2},{1,3}}
 {{3},{1,2}}
 {{1},{2},{3}}
 {{1},{2,3},{}}
 {{2},{1,3},{}}
 {{3},{1,2},{}}.
		

Crossrefs

Cf. A186021 (diagonal).

Programs

  • Mathematica
    Table[If[n==0, 1, 2*Sum[StirlingS2[n, j], {j, k}] + StirlingS2[n, k+1]], {n, 0, 9}, {k, 0, n}] // Flatten

Formula

T(n,k) = 2*Sum_{j=1..k} S2(n,j) + S2(n,k+1) for n>=1.
T(0,k) = 1.

A380977 Triangle read by rows: T(n,m) (1<=m<=n) = number of surjections f:[n]->[m] with f(n) != f(j), j

Original entry on oeis.org

1, 0, 2, 0, 2, 6, 0, 2, 18, 24, 0, 2, 42, 144, 120, 0, 2, 90, 600, 1200, 720, 0, 2, 186, 2160, 7800, 10800, 5040, 0, 2, 378, 7224, 42000, 100800, 105840, 40320, 0, 2, 762, 23184, 204120, 756000, 1340640, 1128960, 362880, 0, 2, 1530, 72600, 932400, 5004720, 13335840, 18627840, 13063680, 3628800
Offset: 1

Author

Manfred Boergens, Feb 10 2025

Keywords

Comments

Number of n-tuples containing all elements of [m] with a unique last element.
Consider an urn with m balls of pairwise different colors. T(n,m) is motivated by the probability p(n,m) for exactly n draws with replacement needed to obtain all colors; p(n,m)=T(n,m)/m^n. - With m fixed and n running, p(n,m) is a probability distribution. The expected number of draws needed to obtain all colors is Sum_{j=1..m} m/j. (Expected value provided by M. Shackleford.)

Examples

			The triangle T(n,m) begins:
  n\m  1 2    3     4      5       6        7        8        9      10 ...
   1:  1
   2:  0 2
   3:  0 2    6
   4:  0 2   18    24
   5:  0 2   42   144    120
   6:  0 2   90   600   1200     720
   7:  0 2  186  2160   7800   10800     5040
   8:  0 2  378  7224  42000  100800   105840    40320
   9:  0 2  762 23184 204120  756000  1340640  1128960   362880
  10:  0 2 1530 72600 932400 5004720 13335840 18627840 13063680 3628800
  ...
T(4,3)=18 is the number of 4-sequences of draws from [3] completing the covering of [3] with the last draw; these sequences are (without brackets and commas):
   1123 1213 1223 2113 2123 2213 1132 1312 1332
   3112 3132 3312 2231 2321 2331 3221 3231 3321
		

Crossrefs

Row sums give A005649(n-1) for n>=1.

Programs

  • Mathematica
    Table[m! StirlingS2[n - 1, m - 1], {n, 10}, {m, n}]//Flatten

Formula

T(n,m) = m!*S2(n-1,m-1) = m!*A048993(n-1,m-1).
T(n,m) = m*A131689(n-1,m-1).
T(n,3) = A068293(n-1), n>1.

A374845 The numbers p or 2p with p prime and p = 3 mod 4, in ascending order.

Original entry on oeis.org

3, 6, 7, 11, 14, 19, 22, 23, 31, 38, 43, 46, 47, 59, 62, 67, 71, 79, 83, 86, 94, 103, 107, 118, 127, 131, 134, 139, 142, 151, 158, 163, 166, 167, 179, 191, 199, 206, 211, 214, 223, 227, 239, 251, 254, 262, 263, 271, 278, 283, 302, 307, 311, 326, 331, 334, 347, 358, 359, 367, 379, 382, 383, 398
Offset: 1

Author

Manfred Boergens, Jul 22 2024

Keywords

Comments

Numbers appearing exactly once in a Pythagorean triple and as the smallest number in this triple.
Subsequence of A292762.
Inserting 4 as second term gives A374846.

Crossrefs

Programs

  • Mathematica
    t={}; Do[If[(PrimeQ[n]&&Mod[n, 4] == 3)||(PrimeQ[n/2]&&Mod[n/2, 4] == 3), t=Join[t,{n}]], {n, 470}]; t
    (* Positions of the ones in  A046081, omitting position = 4;  based on program by Jean-François Alcover *)
    a[1] = 0; a[n_] := Module[{f}, f = Select[FactorInteger[n], Mod[#[[1]], 4] == 1 &][[All, 2]]; (DivisorSigma[0, If[OddQ[n], n, n/2]^2] - 1)/2 + (Times @@ (2*f + 1) - 1)/2]; arr = Array[a, nmax]; fl = Flatten[Position[arr, 1]]; Delete[fl, 2]

A374846 Numbers appearing exactly once in a Pythagorean triple.

Original entry on oeis.org

3, 4, 6, 7, 11, 14, 19, 22, 23, 31, 38, 43, 46, 47, 59, 62, 67, 71, 79, 83, 86, 94, 103, 107, 118, 127, 131, 134, 139, 142, 151, 158, 163, 166, 167, 179, 191, 199, 206, 211, 214, 223, 227, 239, 251, 254, 262, 263, 271, 278, 283, 302, 307, 311, 326, 331, 334, 347, 358, 359, 367, 379, 382, 383, 398
Offset: 1

Author

Manfred Boergens, Jul 22 2024

Keywords

Comments

Positions of the ones in A046081.
With the exception a(2) = 4, the terms are given by A374845, thus providing a simple formula for the sequence.

Crossrefs

Programs

  • Mathematica
    t={}; Do[If[(PrimeQ[n] && Mod[n, 4] == 3) || (PrimeQ[n/2] && Mod [n/2, 4] == 3), t = Join[t, {n}]], {n, 445}]; t = Insert[t, 4, 2]
    (* Positions of the ones in  A046081; based on program by Jean-François Alcover *)
    a[1] = 0; a[n_] := Module[{f}, f = Select[FactorInteger[n], Mod[#[[1]], 4] == 1 &][[All, 2]]; (DivisorSigma[0, If[OddQ[n], n, n/2]^2] - 1)/2 + (Times @@ (2*f + 1) - 1)/2]; arr = Array[a, 445]; fl = Flatten[Position[arr, 1]]
  • Python
    from itertools import count, islice
    from sympy import isprime
    def A374846_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:n==4 or (isprime(n) and n&3==3) or (isprime(n>>1) and n&7==6), count(max(startvalue,1)))
    A374846_list = list(islice(A374846_gen(),20)) # Chai Wah Wu, Jul 31 2024

Formula

p or 2p with p prime and p = 3 mod 4, with 4 added to the sequence, in ascending order.

A369950 Triangle read by rows: T(n,k) = number of j-covers of [n] with j<=k, k=1..2^n-1.

Original entry on oeis.org

1, 1, 4, 5, 1, 13, 45, 80, 101, 108, 109, 1, 40, 361, 1586, 4505, 9482, 15913, 22348, 27353, 30356, 31721, 32176, 32281, 32296, 32297, 1, 121, 2681, 27671, 182777, 894103, 3491513, 11348063, 31483113, 75820263, 160485753, 301604003
Offset: 1

Author

Manfred Boergens, Feb 12 2024

Keywords

Comments

Partial row sums of A055154.
Also, number of k-covers of [n] allowing for empty subsets.
Amendments by Manfred Boergens, Mar 09 2025: (Start)
For covers which may include one empty set see A381683.
For disjoint covers see A102661.
For disjoint covers which may include one empty set see A381682. (End)

Examples

			Triangle (with rows n >= 1 and columns k >= 1) begins as follows:
 1;
 1, 4, 5;
 1, 13, 45, 80, 101, 108, 109;
 1, 40, 361, 1586, 4505, 9482, 15913, 22348, 27353, 30356, 31721, 32176, 32281, 32296, 32297;
 ...
There are T(3,2) = 13 covers of [3] consisting of up to 2 subsets (brackets and commas omitted):
 123
 123 1
 123 2
 123 3
 123 12
 123 13
 123 23
 12 13
 12 23
 13 23
 12 3
 13 2
 23 1
		

Crossrefs

Cf. A055154, A003465 (diagonal), A102661, A381682, A381683.

Programs

  • Mathematica
    Flatten[Table[Sum[Sum[StirlingS1[i+1, j+1] (2^j-1)^n, {j, 0, i}]/i!, {i, k}], {n, 6}, {k, 2^n-1}]]
  • Python
    from math import comb
    def A369950(n,k): return sum((-1)**j*comb(n, j)*comb(2**(n-j)-1, i) for j in range(n+1) for i in range(1,k+1)) # John Tyler Rascoe, Mar 06 2025

Formula

T(n,k) = Sum_{i=1..k} (1/i!)*Sum_{j=0..i} Stirling1(i+1, j+1)*(2^j-1)^n.
T(n,k) = Sum_{i=1..k} Sum_{j=0..n} (-1)^j*C(n, j)*C(2^(n-j)-1, i).
T(n,2^n-1) = A003465(n).

A366872 Number of closed chains of identical regular polygons with connecting inner vertices lying n vertices apart.

Original entry on oeis.org

4, 6, 5, 6, 8, 6, 6, 9, 8, 6, 10, 6, 8, 12, 7, 6, 12, 6, 10, 12, 8, 6, 12, 9, 8, 12, 10, 6, 16, 6, 8, 12, 8, 12, 15, 6, 8, 12, 12, 6, 16, 6, 10, 18, 8, 6, 14, 9, 12, 12, 10, 6, 16, 12, 12, 12, 8, 6, 20, 6, 8, 18, 9, 12, 16, 6, 10, 12, 16, 6, 18, 6, 8, 18
Offset: 0

Author

Manfred Boergens, Oct 26 2023

Keywords

Comments

Consider j identical regular polygons, assembled into a circular closed chain. Two neighboring polygons share an edge and two vertices, the "inner" one lying in the interior of the chain. The interior is a j-pointed star with equal edges.
n is introduced in order to partition the set of chains into finite subsets. Two neighboring star points are separated by n vertices; there the star has reflex angles. (With n=0, regular polygons are considered as stars with no reflex angles.)
Geometrical reasoning shows that for each n there are finitely many (not zero) chains with the described properties.
a(n) is the number of these chains and equals d(8+4n), the number of divisors of 8+4n.
For every m > 4 there exists a chain of m-gons. The possible m for each n are given by A383168.
For every j > 2 there exists a chain with exactly j polygons. The possible j for each n are given by A383169.

Examples

			a(0) = 4 is the number of chains of identical regular polygons which have an interior regular polygon, namely 10 pentagons, 6 hexagons, 4 octagons, 3 dodecagons.
a(1) = 6 is the number of chains of identical regular polygons which have an interior proper star with identical edges, namely 14 heptagons, 8 octagons, 6 nonagons, 5 decagons, 4 dodecagons, 3 18-gons.
		

Crossrefs

Programs

  • Mathematica
    Table[{n, Length[Divisors[8+4 n]]}, {n, 0, 107}] // TableForm
    (With additional output describing the chains:)
    Do[Print["n = ", n, " a(n) = ", Length[Divisors[8+4 n]]]; d = Divisors[8+4 n]; le = Length[d]; Do[t1 = d[[i]]; t2 = (8+4 n)/d[[i]]; Print["m = ", t1+4+2 n, " j = ", t2+2], {i,le}], {n, 0, 19}]

Formula

a(n) = A000005(8+4n).
a(n) > 5, with the exceptions a(0) = 4 and a(2) = 5.
a(n) = 6 iff n = 6 or n + 2 is an odd prime.

A347941 For sets of n random points in the real plane, a(n) is an upper bound for the minimal number of nearest neighbors.

Original entry on oeis.org

2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 17, 18, 18, 18, 18, 18, 18, 19, 19, 19, 20, 20, 20, 20, 20, 20, 21, 21, 21, 22, 22, 22, 22, 22, 22, 23
Offset: 2

Author

Manfred Boergens, Sep 20 2021

Keywords

Comments

The sequence deals with sets of n points with pairwise different distances. The randomness in the definition provides for pairwise different distances with probability = 1.
A point A is called a nearest neighbor if there is a point B with smaller distance to A than to any other point C.
In graph theory terms: Let G be a simple digraph; the vertices of G are n arbitrarily placed points in R^2 with pairwise different distances; the edges of G are arrows joining each point (tail end) to its nearest neighbor (head end). Let b(n) be the minimal number of points receiving arrowheads in any such graph. a(n) is the best upper bound yet known for b(n).
A261953(n) for n >= 2 can be seen as an "inverse" to a(n).
a(n) is built by constructing G with n points and m nearest neighbors, m chosen as minimal as possible, then defining a(n)=m.
The start is a(n)=2 for n <= 9 and a(n)=3 for n=10,11,12. We call the pairs (n,m)=(9,2) and (n,m)=(12,3) "anchor pairs" and proceed to bigger n by combining graphs with these anchor pairs to bigger graphs. So the next anchor pairs are (18,4), (21,5) and (27,6).
If (n0,m-1) and (n1,m) are anchor pairs then a(n')=m for n0 < n' <= n1.
We conjecture that a(n) is optimal. This claim is true if the following assumptions hold:
- The anchor pairs (9,2) and (12,3) are optimal.
- All bigger anchor pairs (n,m) are constructed by combining copies of (9,2) if m is even and adding one (12,3) if m is odd.

Examples

			G with 25 vertices has at least 6 nearest neighbors (conjectured; it is proved that there are G with n=25 and m=6 but it is not yet proved that 6 is the minimum).
		

Crossrefs

Cf. A261953.

Programs

  • Mathematica
    h=(n+5)/9; Join[{2,2}, Table[2 Floor[h] + If[FractionalPart[h]<2/3, 0, 1], {n, 4, 100}]]

Formula

a(2) = a(3) = 2.
a(n) = 2j for n = 9j-5 ... 9j, j > 0;
a(n) = 2j+1 for n = 9j+1 ... 9j+3, j > 0;
With h=(n+5)/9 for n>3:
a(n) = 2*floor(h) if h-floor(h)<2/3;
a(n) = 2*floor(h)+1 otherwise.
G.f.: -x^2*(x^11-2*x^9+x^8+2)/(-x^10+x^9+x-1). - Alois P. Heinz, Sep 20 2021