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-9 of 9 results.

A141285 Largest part of the n-th partition of j in the list of colexicographically ordered partitions of j, if 1 <= n <= A000041(j).

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Aug 01 2008

Keywords

Comments

Also largest part of the n-th region of the set of partitions of j, if 1 <= n <= A000041(j). For the definition of "region of the set of partitions of j" see A206437.
Also triangle read by rows: T(j,k) is the largest part of the k-th region in the last section of the set of partitions of j.
For row n >= 2 the rows of triangle are also the branches of a tree which is a projection of a three-dimensional structure of the section model of partitions of A135010, version tree. The branches of even rows give A182730. The branches of odd rows give A182731. Note that each column contains parts of the same size. It appears that the structure of A135010 is a periodic table of integer partitions. See also A210979 and A210980.
Also column 1 of: A193870, A206437, A210941, A210942, A210943. - Omar E. Pol, Sep 01 2013
Also row lengths of A211009. - Omar E. Pol, Feb 06 2014

Examples

			Written as a triangle T(j,k) the sequence begins:
  1;
  2;
  3;
  2, 4;
  3, 5;
  2, 4, 3, 6;
  3, 5, 4, 7;
  2, 4, 3, 6, 5, 4, 8;
  3, 5, 4, 7, 3, 6, 5, 9;
  2, 4, 3, 6, 5, 4, 8, 4, 7, 6, 5, 10;
  3, 5, 4, 7, 3, 6, 5, 9, 5, 4, 8,  7, 6, 11;
  ...
  ------------------------------------------
  n  A000041                a(n)
  ------------------------------------------
   1 = p(1)                   1
   2 = p(2)                 2 .
   3 = p(3)                   . 3
   4                        2 .
   5 = p(4)               4   .
   6                          . 3
   7 = p(5)                   .   5
   8                        2 .
   9                      4   .
  10                    3     .
  11 = p(6)           6       .
  12                          . 3
  13                          .   5
  14                          .     4
  15 = p(7)                   .       7
  ...
From _Omar E. Pol_, Aug 22 2013: (Start)
Illustration of initial terms (n = 1..11) in three ways: as the largest parts of the partitions of 6 (see A026792), also as the largest parts of the regions of the diagram, also as the diagonal of triangle. By definition of "region" the largest part of the n-th region is also the largest part of the n-th partition (see below):
  --------------------------------------------------------
  .                  Diagram         Triangle in which
  Partitions       of regions       rows are partitions
  of 6           and partitions   and columns are regions
  --------------------------------------------------------
  .                _ _ _ _ _ _
  6                _ _ _      |                         6
  3+3              _ _ _|_    |                       3 3
  4+2              _ _    |   |                     4   2
  2+2+2            _ _|_ _|_  |                   2 2   2
  5+1              _ _ _    | |                 5       1
  3+2+1            _ _ _|_  | |               3 1       1
  4+1+1            _ _    | | |             4   1       1
  2+2+1+1          _ _|_  | | |           2 2   1       1
  3+1+1+1          _ _  | | | |         3   1   1       1
  2+1+1+1+1        _  | | | | |       2 1   1   1       1
  1+1+1+1+1+1       | | | | | |     1 1 1   1   1       1
  ...
The equivalent sequence for compositions is A001511. Explanation: for the positive integer j the diagram of regions of the set of compositions of j has 2^(j-1) regions. The largest part of the n-th region is A001511(n). The number of parts is A006519(n). On the other hand the diagram of regions of the set of partitions of j has A000041(j) regions. The largest part of the n-th region is a(n) = A001511(A228354(n)). The number of parts is A194446(n). Both diagrams have j sections. The diagram for partitions can be interpreted as one of the three views of a three dimensional diagram of compositions in which the rows of partitions are in orthogonal direction to the rest. For the first five sections of the diagrams see below:
  --------------------------------------------------------
  .          Diagram                           Diagram
  .         of regions                        of regions
  .      and compositions                   and partitions
  ---------------------------------------------------------
  .      j = 1 2 3 4 5                     j = 1 2 3 4 5
  ---------------------------------------------------------
   n  A001511                    A228354  a(n)
  ---------------------------------------------------------
   1   1     _| | | | | ............ 1    1    _| | | | |
   2   2     _ _| | | | ............ 2    2    _ _| | | |
   3   1     _|   | | |    ......... 4    3    _ _ _| | |
   4   3     _ _ _| | | ../  ....... 6    2    _ _|   | |
   5   1     _| |   | |    / ....... 8    4    _ _ _ _| |
   6   2     _ _|   | | ../ /   .... 12   3    _ _ _|   |
   7   1     _|     | |    /   /   . 16   5    _ _ _ _ _|
   8   4     _ _ _ _| | ../   /   /
   9   1     _| | |   |      /   /
  10   2     _ _| |   |     /   /
  11   1     _|   |   |    /   /
  12   3     _ _ _|   | ../   /
  13   1     _| |     |      /
  14   2     _ _|     |     /
  15   1     _|       |    /
  16   5     _ _ _ _ _| ../
  ...
Also we can draw an infinite Dyck path in which the n-th odd-indexed line segment has a(n) up-steps and the n-th even-indexed line segment has A194446(n) down-steps. Note that the height of the n-th largest peak between two successive valleys at height 0 is also the partition number A000041(n). See below:
.                                 5
.                                 /\                 3
.                   4            /  \           4    /\
.                   /\          /    \          /\  /
.         3        /  \     3  /      \        /  \/
.    2    /\   2  /    \    /\/        \   2  /
. 1  /\  /  \  /\/      \  /            \  /\/
. /\/  \/    \/          \/              \/
.
.(End)
		

Crossrefs

Where records occur give A000041, n>=1. Column 1 is A158478. Row j has length A187219(j). Row sums give A138137. Right border gives A000027.

Programs

  • Mathematica
    Last/@DeleteCases[DeleteCases[Sort@PadRight[Reverse/@IntegerPartitions[13]], x_ /; x == 0, 2], {}] (* updated _Robert Price, May 15 2020 *)

Formula

a(n) = A001511(A228354(n)). - Omar E. Pol, Aug 22 2013

Extensions

Edited by Omar E. Pol, Nov 28 2010
Better definition and edited by Omar E. Pol, Oct 17 2013

A098548 a(n) = n if n <= 3, otherwise the smallest number > a(n-1) having at least one common factor with a(n-2) but none with a(n-1).

Original entry on oeis.org

1, 2, 3, 4, 9, 10, 21, 22, 27, 28, 33, 34, 39, 40, 51, 52, 57, 58, 63, 64, 69, 70, 81, 82, 87, 88, 93, 94, 99, 100, 111, 112, 117, 118, 123, 124, 129, 130, 141, 142, 147, 148, 153, 154, 159, 160, 171, 172, 177, 178, 183, 184, 189, 190, 201, 202, 207, 208, 213, 214
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 14 2004

Keywords

Comments

The number a(n) is even if and only if n is even. If n>=1, then a(2n) = a(2n-1) + 1. If n>=2, then a(2n+1) - a(2n) >= 5. As a consequence, if n>=15, then a(n) > 3n. - Benoit Jubin, Dec 07 2014
A098549(n) = a(a(n)).

Crossrefs

Cf. A158478 (smallest prime factor), A251104 (largest prime factor), A251139 (number of distinct prime factors), A251141 (total number of prime factors), A251046 (squarefree part), A251090 (squarefree kernel).
Cf. also A251535 and A251536 (bisections), A251537, A251538, A251539 (jumps), A251540.

Programs

  • Haskell
    a098548 n = a098548_list !! (n-1)
    a098548_list = 1 : 2 : 3 : f 2 3 [4..] where
       f u v (w:ws) = if gcd u w > 1 && gcd v w == 1
                         then w : f v w ws else f u v ws
    -- Reinhard Zumkeller, Nov 21 2014
  • Maple
    x2 := 0: for n from 1 to 1000 do x := x2 + 1: while (n >= 4 and (gcd(x,x2) > 1 or gcd(x,x1) = 1)) do x := x + 1: end do; print (n, x); x1 := x2: x2 := x: end do: # David Applegate, Nov 26 2014
  • Mathematica
    a := {1, 2, 3}; For[n = 4, n <= 1000, n++, If[GCD[n, a[[-1]]] == 1 && GCD[n, a[[-2]]] > 1, AppendTo[a, n]]]; a (* L. Edson Jeffery, Dec 04 2014 *)

A158799 a(0)=1, a(1)=2, a(n)=3 for n >= 2.

Original entry on oeis.org

1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
Offset: 0

Views

Author

Jaume Oliver Lafont, Mar 27 2009

Keywords

Comments

a(n) = number of neighboring natural numbers of n (i.e., n, n - 1, n + 1). a(n) = number of natural numbers m such that n - 1 <= m <= n + 1. Generalization: If a(n,k) = number of natural numbers m such that n - k <= m <= n + k (k >= 1) then a(n,k) = a(n-1,k) + 1 = n + k for 0 <= n <= k, a(n,k) = a(n-1,k) = 2*k + 1 for n >= k + 1. - Jaroslav Krizek, Nov 18 2009
Partial sums of A130716; partial sums give A008486. - Jaroslav Krizek, Dec 06 2009
In atomic spectroscopy, a(n) is the number of P term symbols with spin multiplicity equal to n+1, i.e., there is one singlet-P term (n=0), there are two doublet-P terms (n=1), and there are three P terms for triple multiplicity (n=2) and higher (n>2). - A. Timothy Royappa, Mar 16 2012
a(n+1) is also the domination number of the n-Andrásfai graph. - Eric W. Weisstein, Apr 09 2016
Decimal expansion of 37/300. - Elmo R. Oliveira, May 11 2024
a(n+1) is also the domination number of the n X n rook complement graph. - Eric W. Weisstein, Mar 10 2025

Crossrefs

Programs

  • Mathematica
    PadRight[{1,2},120,{3}] (* or *) Min[#,3]&/@Range[120] (* Harvey P. Dale, Apr 08 2018 *)
  • PARI
    a(n)=if(n>1,3,if(n<0,0,n++))

Formula

G.f.: (1+x+x^2)/(1-x) = (1-x^3)/(1-x)^2.
a(n) = (n>=0)+(n>=1)+(n>=2).
a(n) = 1 + n for 0 <= n <= 1, a(n) = 3 for n >= 2. a(n) = A157532(n) for n >= 1. - Jaroslav Krizek, Nov 18 2009
E.g.f.: 3*exp(x) - x - 2 = x^2/(2*G(0)) where G(k) = 1 + (k+2)/(x - x*(k+1)/(x + k + 1 - x^4/(x^3 + (k+1)*(k+2)*(k+3)/G(k+1)))); (continued fraction). - Sergei N. Gladkovskii, Jul 06 2012
a(n) = min(n+1,3). - Wesley Ivan Hurt, Apr 16 2014
a(n) = 1 + A130130(n). - Elmo R. Oliveira, May 11 2024

Extensions

Corrected by Jaroslav Krizek, Dec 17 2009

A251101 Smallest prime factor of A098550(n).

Original entry on oeis.org

1, 2, 3, 2, 3, 2, 3, 2, 5, 2, 5, 2, 5, 2, 7, 2, 3, 2, 3, 2, 3, 11, 13, 3, 2, 3, 2, 3, 2, 17, 2, 5, 2, 5, 2, 5, 2, 7, 2, 7, 2, 3, 19, 2, 5, 2, 3, 2, 3, 2, 23, 2, 5, 2, 3, 2, 3, 2, 3, 2, 29, 31, 2, 3, 2, 3, 2, 7, 2, 7, 2, 7, 2, 7, 2, 5, 2, 3, 37, 2, 3, 2, 3, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 30 2014

Keywords

Comments

a(n) = A020639(A098550(n)).

Crossrefs

Programs

  • Haskell
    a251101 = a020639 . fromIntegral . a098550

A158515 Number of colors needed to paint a wheel graph on n nodes.

Original entry on oeis.org

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

Views

Author

Jaume Oliver Lafont, Mar 20 2009

Keywords

Comments

Adjacent nodes are not allowed to have the same color.

Crossrefs

Programs

  • Mathematica
    PadRight[{0, 1, 2}, 100, {4, 3}] (* Paolo Xausa, Apr 22 2024 *)
  • PARI
    a(n)=if(n<4,n,4-n%2)
    
  • Scheme
    (define (A158515 n) (if (< n 4) n (- 4 (modulo n 2)))) ;; Antti Karttunen, Sep 14 2017

Formula

G.f.: x*(1+2*x+2*x^2+2*x^3)/(1-x^2)

A251104 Largest prime factor of A098548(n).

Original entry on oeis.org

1, 2, 3, 2, 3, 5, 7, 11, 3, 7, 11, 17, 13, 5, 17, 13, 19, 29, 7, 2, 23, 7, 3, 41, 29, 11, 31, 47, 11, 5, 37, 7, 13, 59, 41, 31, 43, 13, 47, 71, 7, 37, 17, 11, 53, 5, 19, 43, 59, 89, 61, 23, 7, 19, 67, 101, 23, 13, 71, 107, 73, 11, 79, 17, 3, 61, 83, 5, 29
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 30 2014

Keywords

Comments

a(n) = A006530(A098548(n)).

Crossrefs

Programs

  • Haskell
    a251104 = a006530 . fromIntegral . a098548

A244951 Minimum number of colors needed to color the faces of the Platonic solids such that no two faces meeting at a common edge share the same color (in the order tetrahedron, cube, octahedron, dodecahedron, icosahedron).

Original entry on oeis.org

4, 3, 2, 4, 3
Offset: 1

Views

Author

Felix Fröhlich, Jul 08 2014

Keywords

Examples

			a(1) = 4, since in the tetrahedron any face shares a common edge with any other face, so each face needs a distinct color.
a(2) = 3, since the cube has three sets of opposite faces. Any two faces that are not opposite share a common edge, so only opposite faces can have the same color.
a(3) = 2, since cutting the octahedron along its "equator" results in two square pyramids. The triangular faces of a single pyramid can be colored using two colors in an alternating fashion. Then the two pyramids are reassembled such that at the "equator" differently colored faces meet.
a(4) and a(5) are shown in illustration in the links.
		

Crossrefs

Cf. A098112, A198861, A158478 (analog for sides of polygons).

Programs

  • Maple
    with(GraphTheory): with(SpecialGraphs):
    map(ChromaticNumber @ PlaneDual, [TetrahedronGraph(), HypercubeGraph(3), OctahedronGraph(), DodecahedronGraph(), IcosahedronGraph()]); # Robert Israel, Aug 24 2014

Extensions

Corrected value of a(4) due to discovery of a new coloring for the dodecahedron.
Corrected value of a(5) due to discovery of a new coloring for the icosahedron.

A171712 Triangle T(n,k) read by rows. Coloring of sectors in a circle.

Original entry on oeis.org

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

Views

Author

Mats Granvik, Dec 16 2009

Keywords

Comments

One row equals a coloring of n sectors in a circle and each number in the k-th column represents a color in the k-th sector of the circle. No pair of adjacent sectors can have the same color. The smallest numbers are chosen as colors and they are ordered from smallest to largest.

Examples

			Table begins:
  1;
  1, 2;
  1, 2, 3;
  1, 2, 1, 2;
  1, 2, 1, 2, 3;
  1, 2, 1, 2, 1, 2;
  1, 2, 1, 2, 1, 2, 3;
  1, 2, 1, 2, 1, 2, 1, 2;
		

Crossrefs

Cf. A158478.

Programs

  • GAP
    T:= function(n,k)
        if k=1 then return 1;
        elif k=n then return (5-(-1)^n)/2;
        else return (3+(-1)^k)/2; fi; end;
    Flat(List([1..15], n-> List([1..n], k-> T(n,k) ))); # G. C. Greubel, Nov 29 2019
  • Magma
    function T(n,k)
      if k eq 1 then return 1;
      elif k eq n then return (5-(-1)^n)/2;
      else return (3+(-1)^k)/2;  end if; return T; end function;
    [T(n,k): k in [1..n], n in [1..15]]; // G. C. Greubel, Nov 29 2019
    
  • Maple
    seq(seq( `if`(k=1, 1, `if`(k=n, (5-(-1)^n)/2, (3+(-1)^k)/2 )), k=1..n), n=1..15); # G. C. Greubel, Nov 29 2019
  • Mathematica
    T[n_, k_]:= If[k==1, 1, If[k==n, (5-(-1)^n)/2, (3+(-1)^k)/2]]; Table[T[n, k], {n, 15}, {k, n}]//Flatten (* G. C. Greubel, Nov 29 2019 *)
  • PARI
    T(n,k) = if(k==1, 1, if(k==n, (5-(-1)^n)/2, (3+(-1)^k)/2 )); \\ G. C. Greubel, Nov 29 2019
    
  • Sage
    def T(n, k):
        if (k==1): return 1
        elif (k==n): return (5-(-1)^n)/2
        else: return (3+(-1)^k)/2
    [[T(n, k) for k in (1..n)] for n in (1..15)] # G. C. Greubel, Nov 29 2019
    

Formula

T(n, k) = (3 + (-1)^k)/2 with T(n, 1) = 1 and T(n, n) = (5 - (-1)^n)/2 for n >= 2. - G. C. Greubel, Nov 29 2019

A333416 Irregular triangle T read by rows: each row represents a finite (increasing) oscillation contained in the infinite (increasing) oscillation O.

Original entry on oeis.org

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

Views

Author

Stefano Spezia, Mar 24 2020

Keywords

Comments

The oscillations are bounded affine permutations. For the definition of a bounded affine permutation, see Definitions 1 and 2 in Madras and Troyka.
The infinite (increasing) oscillation O is described by the function f defined as f(s) = s - 4*(-1)^s - 2 with s in the set of integers, while the finite (increasing) oscillations are indecomposable permutations, i.e., that are not the sum of two permutations of nonzero size, and that are contained in O.
For each m >= 3, there are exactly two oscillations of size m: 312 and 231, 3142 and 2413, and so on (see p. 22 of Madras and Troyka).

Examples

			1
2  1
3  1  2
2  3  1
3  1  4  2
2  4  1  3
3  1  5  2  4
2  4  1  5  3
3  1  5  2  6  4
2  4  1  6  3  5
		

Crossrefs

Cf. A000142, A266977, A158478, A333616 (row sums).

Formula

T(n, 1) = A158478(n).
Showing 1-9 of 9 results.