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

A332616 a(n) = value of the cubic form A^3 + B^3 + C^3 - 3ABC evaluated at row n of the table in A331195.

Original entry on oeis.org

0, 1, 2, 0, 8, 9, 4, 16, 5, 0, 27, 28, 20, 35, 18, 7, 54, 28, 8, 0, 64, 65, 54, 72, 49, 32, 91, 56, 27, 10, 128, 81, 40, 11, 0, 125, 126, 112, 133, 104, 81, 152, 108, 70, 44, 189, 130, 77, 36, 13, 250, 176, 108, 52, 14, 0, 216, 217, 200, 224, 189, 160, 243
Offset: 0

Views

Author

Mehmet A. Ates, Jun 08 2020

Keywords

Comments

No term in the sequence is congruent to 3 or 6 (mod 9).

Examples

			For n=3, a(n) = f[1,1,0] = 1^3 + 1^3 + 0^3 - 3*1*1*0 = 2.
		

Crossrefs

Cf. A074232 (in ascending order, strictly positive & without duplicates).

Programs

  • Mathematica
    SeqSize = 30;
    ListSize = 120;
    F3List = List[];
    f3[a_, b_, c_] := a^3 + b^3 + c^3 - 3*a*b*c
    For[i = 0, i <= SeqSize, i++, For[j = 0, j <= i, j++, For[k = 0, k <= j, k++, AppendTo[F3List, f3[i, j, k]]]]]
    ListPlot[F3List, PlotLabel -> "a(n)"]
    Print["First ", ListSize, " elements of a(n): ", Take[F3List, ListSize]]

Formula

a(n) = A056556(n)^3 + A056557(n)^3 + A056558(n)^3 - 3*A056556(n)*A056557(n)*A056558(n).

Extensions

Edited by N. J. A. Sloane, Aug 06 2020

A360071 Regular tetrangle where T(n,k,i) = number of integer partitions of n of length k with i distinct parts.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jan 28 2023

Keywords

Comments

I call this a tetrangle because it is a sequence of finite triangles. - Gus Wiseman, Jan 30 2023

Examples

			Tetrangle begins:
  1   1     1       1         1           1             1
      1 0   0 1     1 1       0 2         1 2           0 3
            1 0 0   0 1 0     0 2 0       1 1 1         0 3 1
                    1 0 0 0   0 1 0 0     0 2 0 0       0 2 1 0
                              1 0 0 0 0   0 1 0 0 0     0 2 0 0 0
                                          1 0 0 0 0 0   0 1 0 0 0 0
                                                        1 0 0 0 0 0 0
For example, finite triangle n = 5 counts the following partitions:
    (5)
     .    (41)(32)
     .   (311)(221)  .
     .     (2111)    .   .
  (11111)     .      .   .   .
		

Crossrefs

Row sums are A008284 (partitions by number of parts), reverse A058398.
First columns i = 1 are A051731.
Last columns i = k are A060016.
Column sums are A116608 (partitions by number of distinct parts).
Positive terms are counted by A360072.
A000041 counts partitions, strict A000009.
Other tetrangles: A318393, A318816, A320808, A334433, A345197.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], Length[#]==k&&Length[Union[#]]==i&]],{n,1,9},{k,1,n},{i,1,k}]

A360010 First part of the n-th weakly decreasing triple of positive integers sorted lexicographically. Each n > 0 is repeated A000217(n) times.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Feb 11 2023

Keywords

Examples

			Triples begin: (1,1,1), (2,1,1), (2,2,1), (2,2,2), (3,1,1), (3,2,1), (3,2,2), (3,3,1), (3,3,2), (3,3,3), ...
		

Crossrefs

For pairs instead of triples we have A002024.
Positions of first appearances are A050407(n+2) = A000292(n)+1.
The zero-based version is A056556.
The triples have sums A070770.
The second instead of first part is A194848.
The third instead of first part is A333516.
Concatenating all the triples gives A360240.

Programs

  • Mathematica
    nn=9;First/@Select[Tuples[Range[nn],3],GreaterEqual@@#&]
  • Python
    from math import comb
    from sympy import integer_nthroot
    def A360010(n): return (m:=integer_nthroot(6*n,3)[0])+(n>comb(m+2,3)) # Chai Wah Wu, Nov 04 2024

Formula

a(n) = A056556(n) + 1 = A331195(3n) + 1.
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/8 + log(2)/4. - Amiram Eldar, Feb 18 2024
a(n) = m+1 if n>binomial(m+2,3) and a(n) = m otherwise where m = floor((6n)^(1/3)). - Chai Wah Wu, Nov 04 2024

A330709 Two-column table read by rows: pairs (i,j) in order sorted from the left.

Original entry on oeis.org

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

Views

Author

Mehmet A. Ates, Jun 08 2020

Keywords

Crossrefs

a(2n)= A003056(n),
a(2n+1)= A002262(n).
Cf. A331195.

Programs

  • Mathematica
    TwoDVectors = List[];
    SeqSize = 20;
    For[i = 0, i <= SeqSize, i++,
      For[j = 0, j <= i, j++,
        AppendTo[TwoDVectors, {i, j}]
      ]
    ];
    Flatten[TwoDVectors]

A360072 Number of pairs of positive integers (k,i) such that k >= i and there exists an integer partition of n of length k with i distinct parts.

Original entry on oeis.org

0, 1, 2, 3, 5, 5, 9, 9, 13, 14, 18, 19, 26, 25, 30, 34, 39, 40, 48, 48, 56, 59, 64, 67, 78, 78, 84, 89, 97, 99, 111, 111, 121, 125, 131, 137, 149, 149, 158, 165, 176, 177, 190, 191, 202, 210, 216, 222, 238, 239, 250, 256, 266, 270, 284, 289, 302, 307, 316, 323
Offset: 0

Views

Author

Gus Wiseman, Jan 28 2023

Keywords

Comments

This is the number of nonzero terms in the n-th triangle of A360071.

Examples

			The a(5) = 5 pairs are: (1,1), (2,2), (3,2), (4,2), (5,1). The pair (3,3) is absent because it is not possible to partition 5 into 3 parts, all 3 of which are distinct.
The a(6) = 9 pairs are: (1,1), (2,1), (2,2), (3,1), (3,2), (3,3), (4,2), (5,2), (6,1). The pair (3,3) is present because (3,2,1) is a partition of 6 into 3 parts, all 3 of which are distinct.
		

Crossrefs

A000041 counts integer partitions, strict A000009.
A008284 counts partitions by number of parts, reverse A058398.
A116608 counts partitions by number of distinct parts.

Programs

  • Mathematica
    Table[Count[Flatten[Sign[Table[Length[Select[IntegerPartitions[n], Length[#]==k&&Length[Union[#]]==i&]],{k,1,n},{i,1,k}]]],1],{n,0,30}]
  • PARI
    a(n) = if(n < 1, 0, numdiv(n) + sum(k=2, (sqrtint(8*n+1)-1)\2, n-binomial(k+1,2)+1)) \\ Andrew Howroyd, Jan 30 2023

Formula

a(n) = A000005(n) + Sum_{k=2..floor((sqrt(8*n+1)-1)/2)} (1 + n - binomial(k+1,2)) for n > 0. - Andrew Howroyd, Jan 30 2023

Extensions

Terms a(31) and beyond from Andrew Howroyd, Jan 30 2023

A360240 Weakly decreasing triples of positive integers sorted lexicographically and concatenated.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Feb 11 2023

Keywords

Examples

			Triples begin: (1,1,1), (2,1,1), (2,2,1), (2,2,2), (3,1,1), (3,2,1), (3,2,2), (3,3,1), (3,3,2), (3,3,3), ...
		

Crossrefs

The triples have sums A070770.
Positions of first appearances are A158842.
For pairs instead of triples we have A330709 + 1.
The zero-based version is A331195.
- The first part is A360010 = A056556 + 1.
- The second part is A194848 = A056557 + 1.
- The third part is A333516 = A056558 + 1.

Programs

  • Mathematica
    nn=9;Join@@Select[Tuples[Range[nn],3],GreaterEqual@@#&]
  • Python
    from math import isqrt, comb
    from sympy import integer_nthroot
    def A360240(n): return (m:=integer_nthroot((n-1<<1)+6,3)[0])+(n>3*comb(m+2,3)) if (a:=n%3)==1 else (k:=isqrt(r:=(b:=(n-1)//3)+1-comb((m:=integer_nthroot((n-1<<1)-1,3)[0])-(b(k<<2)*(k+1)+1) if a==2 else 1+(r:=(b:=(n-1)//3)-comb((m:=integer_nthroot((n-1<<1)-3,3)[0])+(b>=comb(m+2,3))+1,3))-comb((k:=isqrt(m:=r+1<<1))+(m>k*(k+1)),2) # Chai Wah Wu, Jun 07 2025

Formula

a(n) = A331195(n-1) + 1.

A372667 Norm i^2+j^2+k^2 of (i,j,k) for 0 <= k <= j <= i.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 9, 12, 9, 10, 11, 13, 14, 17, 18, 19, 22, 27, 16, 17, 18, 20, 21, 24, 25, 26, 29, 34, 32, 33, 36, 41, 48, 25, 26, 27, 29, 30, 33, 34, 35, 38, 43, 41, 42, 45, 50, 57, 50, 51, 54, 59, 66, 75, 36, 37, 38, 40, 41, 44, 45, 46, 49, 54, 52, 53
Offset: 0

Views

Author

A. Timothy Royappa, May 09 2024

Keywords

Comments

In crystallography, these triples (i,j,k) can be interpreted as Miller indices, which can be sorted into a list: (0 0 0), (1 0 0), (1 1 0), (1 1 1), (2 0 0), (2 1 0), (2 1 1), (2 2 0), (2 2 1), (2 2 2), (3 0 0), (3 1 0), (3 1 1), (3 2 0), etc.

Examples

			The first few triples are:
   0, 0, 0
   1, 0, 0
   1, 1, 0
   1, 1, 1
   2, 0, 0
   2, 1, 0
   2, 1, 1
   2, 2, 0
   2, 2, 1
   2, 2, 2
   3, 0, 0
   ...
		

References

  • C. Suryanarayana and M. Grant Norton, X-Ray Diffraction - A Practical Approach, Springer Science + Business Media, 1998, p. 83.

Crossrefs

The table of triples forms A331195.
Cf. A070770, A069011 (2-dimensional analog), A004215 (complement to this sequence)

Programs

  • Maple
    a:=[];
    for i from 0 to 10 do for j from 0 to i do for k from 0 to j do
    a:=[op(a),i^2+j^2+k^2]; od: od: od: a; # N. J. A. Sloane, Jun 03 2024
  • Python
    print([i**2 + j**2 + k**2 for i in range(7) for j in range(i+1) for k in range(j+1)]) # Andrey Zabolotskiy, May 09 2024

Extensions

More terms from Andrey Zabolotskiy, May 09 2024
Showing 1-7 of 7 results.