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.

Previous Showing 31-37 of 37 results.

A244865 Number of 3 X 3 symmetric matrices with row and column sums <= n.

Original entry on oeis.org

1, 14, 85, 336, 1023, 2610, 5860, 11942, 22555, 40068, 67677, 109578, 171157, 259196, 382096, 550116, 775629, 1073394, 1460845, 1958396, 2589763, 3382302, 4367364, 5580666, 7062679, 8859032, 11020933, 13605606, 16676745, 20304984, 24568384, 29552936, 35353081, 42072246, 49823397, 58729608
Offset: 0

Views

Author

N. J. A. Sloane, Jul 07 2014

Keywords

Comments

a(n) is the number of perimeter-magic hollow triangles of order 4 (4 elements per edge, 9 elements in total) with magic edge sum n+4. The triangles have 9 elements >=1, not necessarily distinct. Triangles obtained by rotations and flips (D_6 symmetry) are counted as being distinct. Associated triangles of order 3 are counted in A019298. - R. J. Mathar, Mar 05 2025

Programs

  • PARI
    Vec((1 + 8*x + 15*x^2 + 8*x^3 + x^4) / ((1 - x)^7*(1 + x)) + O(x^40)) \\ Colin Barker, Jan 11 2017

Formula

G.f.: (1 + 8*x + 15*x^2 + 8*x^3 + x^4) / ((1 - x)^7*(1 + x)).
From Colin Barker, Jan 11 2017: (Start)
a(n) = (15*(127+(-1)^n) + 6432*n + 8936*n^2 + 6480*n^3 + 2570*n^4 + 528*n^5 + 44*n^6) / 1920.
a(n) = 6*a(n-1) - 14*a(n-2) + 14*a(n-3) - 14*a(n-5) + 14*a(n-6) - 6*a(n-7) + a(n-8) for n>7.
(End)

A008764 Number of 3 X 3 symmetric stochastic matrices under row and column permutations.

Original entry on oeis.org

1, 1, 2, 4, 6, 8, 12, 16, 21, 27, 34, 42, 52, 62, 74, 88, 103, 119, 138, 158, 180, 204, 230, 258, 289, 321, 356, 394, 434, 476, 522, 570, 621, 675, 732, 792, 856, 922, 992, 1066, 1143, 1223, 1308, 1396, 1488, 1584, 1684, 1788, 1897, 2009, 2126, 2248, 2374, 2504
Offset: 0

Views

Author

Keywords

Examples

			There are 6 nonisomorphic symmetric 3 X 3 matrices with row and column sums 4:
[0 0 4] [0 1 3] [0 1 3] [0 2 2] [0 2 2] [1 1 2]
[0 4 0] [1 2 1] [1 3 0] [2 0 2] [2 1 1] [1 2 1]
[4 0 0] [3 1 0] [3 0 1] [2 2 0] [2 1 1] [2 1 1]
		

Crossrefs

Cf. A019298.

Programs

  • GAP
    a:=[1,1,2,4,6,8,12,16,21];; for n in [10..60] do a[n]:=2*a[n-1]-a[n-2]+a[n-3]-a[n-4]-a[n-5]+a[n-6]-a[n-7]+2*a[n-8]-a[n-9]; od; a; # G. C. Greubel, Sep 10 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 60); Coefficients(R!( (1+x^3)/((1-x)*(1-x^2)*(1-x^3)*(1-x^4)) )); // G. C. Greubel, Sep 10 2019
    
  • Maple
    seq(coeff(series((1+x^3)/((1-x)*(1-x^2)*(1-x^3)*(1-x^4)), x, n+1), x, n), n = 0 .. 60); # G. C. Greubel, Sep 10 2019
  • Mathematica
    LinearRecurrence[{2,-1,1,-1,-1,1,-1,2,-1}, {1,1,2,4,6,8,12,16,21}, 60] (* G. C. Greubel, Sep 10 2019 *)
  • PARI
    my(x='x+O('x^60)); Vec((1+x^3)/((1-x)*(1-x^2)*(1-x^3)*(1-x^4))) \\ G. C. Greubel, Sep 10 2019
    
  • Sage
    def A008764_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((1+x^3)/((1-x)*(1-x^2)*(1-x^3)*(1-x^4))).list()
    A008764_list(60) # G. C. Greubel, Sep 10 2019
    

Formula

Expansion of (1+x^3)/((1-x)*(1-x^2)*(1-x^3)*(1-x^4)) = (1-x+x^2)/( (1+x)*(1+x+x^2)*(1+x^2)*(1-x)^4).
a(n) = A008762(n) - A008762(n-1) + A008762(n-2). - R. J. Mathar, Aug 06 2013

Extensions

Better description and more terms from Vladeta Jovovic, Feb 06 2000

A130046 Hexagonal pyramid of Pascal numbers in 3 dimensions. The 3-dimensional sequence is split into slices of the pyramid which in turn consist of rows of the slice, each containing multiple columns of numbers and where each element of slice j is composed of the sum of the three elements above it in slice j-1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 5, 2, 1, 5, 5, 1, 1, 2, 1, 1, 2, 1, 2, 8, 8, 2, 1, 8, 15, 8, 1, 2, 8, 8, 2, 1, 2, 1, 1, 2, 1, 3, 11, 11, 3, 3, 18, 31, 18, 3, 1, 11, 31, 31, 11, 1, 2, 11, 18, 11, 2, 1, 3, 3, 1, 1, 3, 3, 1, 3, 15, 24, 15, 3, 3, 24, 60, 60, 24, 3, 1, 15, 60, 93, 60, 15, 1, 3, 24
Offset: 0

Views

Author

Jeffrey C. Jacobs (darklord(AT)timehorse.com), May 03 2007

Keywords

Comments

Successive slices [0,0], [1,0], [1,1], [2,1], [2,2], [3,2], [3,3], [4,3], [4,4], ... in table A109672; see also A046816 (slices [n,0]), A109673 (slices [n,n]), A109649 (slices [0,k]), A109390 (slices [n,1]), A109393 (slices [1,k]), A109494 (slices [n,2]), A109495 (slices [2,k]). - Philippe Deléham, May 03 2007

Examples

			Slice[0]:
...
Slice[1]:
1
Slice[2]:
.1
1.1
Slice[3]:
.1.1
1.3.1
.1.1
Slice[4]:
..1.1
.2.5.2
1.5.5.1
.1.2.1
Slice[5]:
....1..2..1
..2..8..8..2
.1..8.15..8..1
..2..8..8..2
....1..2..1
Slice[6]:
.....1..2..1
....3.11.11..3
..3.18.31.18..3
.1.11.31.31.11..1
..2.11.18.11..2
....1..3..3..1
		

Crossrefs

Subsequence of A109672 table of slices.
Other tables of slices (see 2007 comment from Philippe Deléham): A046816, A109390, A109393, A109494, A109495, A109649, A109673.
Cf. A007318 (Pascal's triangle).

Formula

Let j be a given slice of the hexagonal pyramid. For j = 0, there are no elements.
For j > 0, let a[x] to a[x+y-1] represent the elements of the slice, where x is the (j-1)th element of A019298 and y is the j-th element of A077043. Each slice j consists of j rows of varying column length, numbered 0 to j-1.
The length of the first row of slice j is given by floor((j+1)/2) and the last row by floor(j/2)+1, where by convention the last row is always greater or equal in length to the first row.
The floor(j/2)th row is j columns in length and any row before it is given by the formula floor((j+1)/2) + row#. For rows after the floor(j/2)th row, the length is given by floor(j/2) + j - row#.
The elements a[x] to a[x+y-1] are thus layed out as a concatenated series of rows of varying column lengths as specified above.
Thus for a given slice j, the element at row row# and column col# is represented by a[x + floor((j+1)/2) * row# + row# * (row# - 1) / 2 + col# ] when row# <= floor(j/2) and by a[x + y - (floor(j/2) + 1) * (j - row#) - (j - row#) * (j - row# + 1) / 2 + col#] otherwise, where x and y are defined above and row# and col# start counting from 0.
The elements of a for a given slice j, row# and col#, represented by the coordinate pair (row#, col#), is given by the following recursive relation:
For j = 1, there is 1 element whose value is 1 at (0, 0). Call this Slice[1] whose first and only element forms a0 = 1.
For j > 1, each element (row#, col#) is given by the sum of the 3 elements above it in the pyramid. If the preceding slice does not contain one of the cells specified because the coordinates are invalid for that slice, the value is assumed to be 0.
The cells above can be found using the following formula for a given cell Slice[j](row#, col#):
If j is odd:
If row# > floor(j/2):
Sum:
Slice[j-1](row#, col#-1)
Slice[j-1](row#-1,col#)
Slice[j-1](row#-1,col#-1)
Otherwise:
Sum:
Slice[j-1](row#, col#)
Slice[j-1](row#-1,col#)
Slice[j-1](row#-1,col#-1)
Otherwise:
If row# > floor(j/2):
Sum:
Slice[j-1](row#, col#)
Slice[j-1](row#-1,col#)
Slice[j-1](row#,col#-1)
Otherwise:
Sum:
Slice[j-1](row#, col#)
Slice[j-1](row#,col#-1)
Slice[j-1](row#-1,col#-1)
Each slice is also a solution to the Prouhet-Tarry-Escott problem for a given n and k. The slices[n,k] in sequence A109672 map to the slices here by the relation k + n = j - 1, where k = n (j odd) or k = n + 1 (j even).
When j is even, k = n - 1 would also be a solution to the Pascal hexagonal pyramid, however here the k = n + 1 solution is chosen. For j even, the slices are also given by A109673.
Only 3 of the 6 hexagonal vertices have corresponding cells in the slice below them. Only every other vertex has a cell below it and all vertices with cells below them are always separated by 2 edges.
By convention, when constructing Slice[j] for j odd, the uppermost vertices of Slice[j-1] are chosen to have cells below them and for j even the 2 vertices adjacent to the uppermost vertices of Slice[j-1] are chosen.

A237669 Number of prime parts in the partitions of 3n into 3 parts.

Original entry on oeis.org

0, 5, 12, 17, 29, 35, 50, 59, 77, 87, 108, 120, 144, 156, 182, 198, 228, 243, 275, 292, 327, 346, 383, 402, 443, 465, 507, 531, 578, 601, 649, 674, 722, 748, 800, 829, 886, 915, 974, 1006, 1067, 1097, 1158, 1189, 1253, 1286, 1353, 1388, 1456, 1491, 1561
Offset: 1

Views

Author

Wesley Ivan Hurt, Feb 11 2014

Keywords

Examples

			Count the primes in the partitions of 3n into 3 parts for a(n).
                                               13 + 1 + 1
                                               12 + 2 + 1
                                               11 + 3 + 1
                                               10 + 4 + 1
                                                9 + 5 + 1
                                                8 + 6 + 1
                                                7 + 7 + 1
                                   10 + 1 + 1  11 + 2 + 2
                                    9 + 2 + 1  10 + 3 + 2
                                    8 + 3 + 1   9 + 4 + 2
                                    7 + 4 + 1   8 + 5 + 2
                                    6 + 5 + 1   7 + 6 + 2
                        7 + 1 + 1   8 + 2 + 2   9 + 3 + 3
                        6 + 2 + 1   7 + 3 + 2   8 + 4 + 3
                        5 + 3 + 1   6 + 4 + 2   7 + 5 + 3
                        4 + 4 + 1   5 + 5 + 2   6 + 6 + 3
            4 + 1 + 1   5 + 2 + 2   6 + 3 + 3   7 + 4 + 4
            3 + 2 + 1   4 + 3 + 2   5 + 4 + 3   6 + 5 + 4
1 + 1 + 1   2 + 2 + 2   3 + 3 + 3   4 + 4 + 4   5 + 5 + 5
   3(1)        3(2)        3(3)        3(4)        3(5)     ..   3n
---------------------------------------------------------------------
    0           5           12          17          29      ..  a(n)
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[PrimePi[i] - PrimePi[i - 1], {i, n + Floor[j/2] + 1 - Floor[1/(j + 1)], n + 2 (j + 1)}], {j, 0, n - 2}] + Sum[i (PrimePi[i] - PrimePi[i - 1]), {i, n}] + Sum[(PrimePi[n + i] - PrimePi[n + i - 1]) (n - 2 i), {i, Floor[(n - 1)/2]}] + Sum[(PrimePi[i] - PrimePi[i - 1]) (2 n - 2 i + 1 - Floor[(n - i + 1)/2]), {i, n}], {n, 70}]
    Table[Count[Flatten[IntegerPartitions[3 n,{3}]],?PrimeQ],{n,60}] (* _Harvey P. Dale, Oct 16 2016 *)

Formula

a(n) = A237264(n) + A236762(n) + A236758(n).

A270694 Alternating sum of centered heptagonal pyramidal numbers.

Original entry on oeis.org

0, -1, 8, -23, 51, -94, 157, -242, 354, -495, 670, -881, 1133, -1428, 1771, -2164, 2612, -3117, 3684, -4315, 5015, -5786, 6633, -7558, 8566, -9659, 10842, -12117, 13489, -14960, 16535, -18216, 20008, -21913, 23936, -26079, 28347, -30742, 33269
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 21 2016

Keywords

Comments

More generally, the ordinary generating function for the alternating sum of centered k-gonal pyramidal numbers is -x*(1 - (k - 2)*x + x^2)/((1 - x)*(1 + x)^4).

Crossrefs

Cf. A004126 (centered heptagonal pyramidal numbers).
Cf. A000330, A006323 (partial sums of centered heptagonal pyramidal numbers), A019298, A232599.

Programs

  • Magma
    [((-1)^n*(2*n + 1)*(14*n^2 + 14*n - 9) + 9)/48 : n in [0..40]]; // Wesley Ivan Hurt, Mar 21 2016
    
  • Maple
    A270694:= n-> ((-1)^n*(2*n+1)*(14*n^2+14*n-9) + 9)/48; seq(A270694(n), n=0..40); # G. C. Greubel, Apr 02 2021
  • Mathematica
    LinearRecurrence[{-3, -2, 2, 3, 1}, {0, -1, 8, -23, 51}, 39]
    Table[((-1)^n (2 n + 1) (14 n^2 + 14 n - 9) + 9)/48, {n, 0, 38}]
  • PARI
    my(x='x+O('x^50)); concat(0, Vec(-x*(1-5*x+x^2)/((1-x)*(1+x)^4))) \\ Altug Alkan, Mar 21 2016
    
  • Sage
    [((-1)^n*(2*n+1)*(14*n^2+14*n-9) +9)/48 for n in (0..40)] # G. C. Greubel, Apr 02 2021

Formula

G.f.: -x*(1 - 5*x + x^2)/((1 - x)*(1 + x)^4).
a(n) = -3*a(n-1) - 2*a(n-2) + 2*a(n-3) + 3*a(n-4) + a(n-5).
a(n) = ((-1)^n*(2*n + 1)*(14*n^2 + 14*n - 9) + 9)/48.
E.g.f.: (1/48)*(9*exp(x) - (9 + 66*x - 126*x^2 + 28*x^3)*exp(-x)). - G. C. Greubel, Mar 28 2016

A270695 Alternating sum of centered octagonal pyramidal numbers.

Original entry on oeis.org

0, -1, 9, -26, 58, -107, 179, -276, 404, -565, 765, -1006, 1294, -1631, 2023, -2472, 2984, -3561, 4209, -4930, 5730, -6611, 7579, -8636, 9788, -11037, 12389, -13846, 15414, -17095, 18895, -20816, 22864, -25041, 27353, -29802, 32394, -35131, 38019
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 21 2016

Keywords

Crossrefs

Cf. A000447 (centered octagonal pyramidal numbers).
Cf. A000330, A006324 (partial sums of centered octagonal pyramidal numbers), A019298, A232599.

Programs

  • Magma
    [((-1)^n*(4*n^2 - 1)*(2*n + 3) + 3)/12 : n in [0..40]]; // Wesley Ivan Hurt, Mar 21 2016
    
  • Maple
    A270695:= n-> ((-1)^n*(4*n^2 -1)*(2*n+3) +3)/12: seq(A270695(n), n=0..40); # G. C. Greubel, Apr 02 2021
  • Mathematica
    LinearRecurrence[{-3, -2, 2, 3, 1}, {0, -1, 9, -26, 58}, 39]
    Table[((-1)^n (4 n^2 - 1) (2 n + 3) + 3)/12, {n, 0, 38}]
  • PARI
    x='x+O('x^100); concat(0, Vec(-x*(1-6*x+x^2)/((1-x)*(1+x)^4))) \\ Altug Alkan, Mar 21 2016
    
  • Sage
    [((-1)^n*(4*n^2 -1)*(2*n+3) +3)/12 for n in (0..40)] # G. C. Greubel, Apr 02 2021

Formula

G.f.: -x*(1 - 6*x + x^2)/((1 - x)*(1 + x)^4).
E.g.f.: (1/12)*(3*exp(x) - (3 + 18*x - 36*x^2 + 8*x^3)*exp(-x)).
a(n) = -3*a(n-1) - 2*a(n-2) + 2*a(n-3) + 3*a(n-4) + a(n-5).
a(n) = ((-1)^n*(4*n^2 - 1)*(2*n + 3) + 3)/12.

Extensions

a(6)=179 inserted by Georg Fischer, Apr 03 2019

A319777 a(n) is the number of equivalence classes of triples of sets each with n or fewer elements where two triples are equivalent if the number of elements in all intersections is the same.

Original entry on oeis.org

1, 15, 100, 436, 1459, 4069, 9929, 21871, 44426, 84494, 152171, 261749, 432906, 692102, 1074198, 1624314, 2399943, 3473337, 4934182, 6892578, 9482341, 12864643, 17232007, 22812673, 29875352, 38734384, 49755317, 63360923, 80037668, 100342652, 124911036
Offset: 0

Views

Author

Peter Kagey, Sep 26 2018

Keywords

Comments

A019298(n) is the analogous sequence if the three sets must each have exactly n elements.

Examples

			The triple (A, B, C) = ({1, 2}, {1, 2, 3}, {1, 4}) is equivalent to the triple (A', B', C') = ({1, 8}, {1, 4, 8}, {5, 8}) because all intersections of the sets in a triple are equal:
|A|         = |{1, 2}|    = 2 = |{1, 8}|    = |A'|
|B|         = |{1, 2, 3}| = 3 = |{1, 4, 8}| = |B'|
|C|         = |{1, 4}|    = 2 = |{5, 8}|    = |C'|
|A & B|     = |{1, 2}|    = 2 = |{1, 8}|    = |A' & B'|
|A & C|     = |{1}|       = 1 = |{8}|       = |A' & C'|
|B & C|     = |{1}|       = 1 = |{8}|       = |B' & C'|
|A & B & C| = |{1}|       = 1 = |{8}|       = |A' & B' & C'|
		

Crossrefs

Cf. A000330(n-1) is analogous, but with pairs instead of triples.

Programs

  • GAP
    List([0..30],n->Sum([0..n],k->(15*(127+(-1)^k)+6432*k+8936*k^2+6480*k^3+2570*k^4+528*k^5+44*k^6)/1920)); # Muniru A Asiru, Sep 28 2018
    
  • Maple
    a:=n->add((15*(127+(-1)^k)+6432*k+8936*k^2+6480*k^3+2570*k^4+528*k^5+44*k^6)/1920,k=0..n): seq(a(n),n=0..30); # Muniru A Asiru, Sep 28 2018
  • PARI
    a(n) = sum(k=0, n, (15*(127+(-1)^k) + 6432*k + 8936*k^2 + 6480*k^3 + 2570*k^4 + 528*k^5 + 44*k^6) / 1920); \\ Michel Marcus, Dec 27 2018
    
  • PARI
    Vec((1 + 8*x + 15*x^2 + 8*x^3 + x^4) / ((1 - x)^8*(1 + x)) + O(x^40)) \\ Colin Barker, Dec 28 2018

Formula

a(n) = Sum_{k=0..n} A244865(k). [corrected by Michel Marcus, Dec 27 2018]
From Colin Barker, Dec 27 2018: (Start)
G.f.: (1 + 8*x + 15*x^2 + 8*x^3 + x^4) / ((1 - x)^8*(1 + x)).
a(n) = 7*a(n-1) - 20*a(n-2) + 28*a(n-3) - 14*a(n-4) - 14*a(n-5) + 28*a(n-6) - 20*a(n-7) + 7*a(n-8) - a(n-9) for n>8.
(End)
Previous Showing 31-37 of 37 results.