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

A003099 a(n) = Sum_{k=0..n} binomial(n,k^2).

Original entry on oeis.org

1, 2, 3, 4, 6, 11, 22, 43, 79, 137, 231, 397, 728, 1444, 3018, 6386, 13278, 26725, 51852, 97243, 177671, 320286, 579371, 1071226, 2053626, 4098627, 8451288, 17742649, 37352435, 77926452, 159899767, 321468048, 632531039, 1219295320, 2308910353, 4314168202
Offset: 0

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Partial sums of A103198.

Programs

  • Magma
    [(&+[Binomial(n, j^2): j in [0..n]]): n in [0..50]]; // G. C. Greubel, Oct 26 2022
    
  • Mathematica
    Table[Sum[Binomial[n, k^2], {k, 0, Sqrt[n]}], {n, 0, 50}] (* T. D. Noe, Sep 10 2011 *)
  • PARI
    a(n)=sum(k=0,sqrtint(n),binomial(n,k^2)) \\ Charles R Greathouse IV, Mar 26 2013
    
  • SageMath
    def A003099(n): return sum( binomial(n,k^2) for k in range(isqrt(n)+1))
    [A003099(n) for n in range(50)] # G. C. Greubel, Oct 26 2022

Formula

a(n)*sqrt(n)/2^n is bounded: lim sup a(n)*sqrt(n)/2^n = 0.82... and lim inf a(n)*sqrt(n)/2^n = 0.58... - Benoit Cloitre, Nov 14 2003 [These constants are sqrt(2/Pi) * JacobiTheta3(0,exp(-4)) = 0.827112271364145742... and sqrt(2/Pi) * JacobiTheta2(0,exp(-4)) = 0.587247586271786487... - Vaclav Kotesovec, Jan 15 2023]
Binomial transform of the characteristic function of squares A010052. - Carl Najafi, Sep 09 2011
G.f.: (1/(1 - x)) * Sum_{k>=0} (x/(1 - x))^(k^2). - Ilya Gutkovskiy, Jan 22 2024

Extensions

More terms from Carl Najafi, Sep 09 2011

A323525 Number of ways to arrange the parts of a multiset whose multiplicities are the prime indices of n into a square matrix.

Original entry on oeis.org

1, 1, 0, 0, 0, 0, 1, 0, 6, 4, 0, 12, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 0, 126, 252, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Jan 17 2019

Keywords

Comments

This multiset (row n of A305936) is generally not the same as the multiset of prime indices of n. For example, the prime indices of 12 are {1,1,2}, while a multiset whose multiplicities are {1,1,2} is {1,1,2,3}.

Examples

			The a(9) = 6 matrices:
  [1 1] [1 2] [1 2] [2 1] [2 1] [2 2]
  [2 2] [1 2] [2 1] [1 2] [2 1] [1 1]
The a(38) = 9 matrices:
  [1 1 1] [1 1 1] [1 1 1] [1 1 1] [1 1 1] [1 1 1] [1 1 2] [1 2 1] [2 1 1]
  [1 1 1] [1 1 1] [1 1 1] [1 1 2] [1 2 1] [2 1 1] [1 1 1] [1 1 1] [1 1 1]
  [1 1 2] [1 2 1] [2 1 1] [1 1 1] [1 1 1] [1 1 1] [1 1 1] [1 1 1] [1 1 1]
		

Crossrefs

The positions of 0's are numbers whose sum of prime indices is not a perfect square (A323527).
The positions of 1's are primes indexed by squares (A323526).

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    nrmptn[n_]:=Join@@MapIndexed[Table[#2[[1]],{#1}]&,Reverse[primeMS[n]]];
    Table[If[IntegerQ[Sqrt[Total[primeMS[n]]]],Length[Permutations[nrmptn[n]]],0],{n,100}]

Formula

If A056239(n) is a perfect square, a(n) = A318762(n). Otherwise, a(n) = 0.

A323519 a(n) is the number of ways to fill a square matrix with the multiset of prime factors of n, if the number of prime factors (counted with multiplicity) is a perfect square, and a(n) = 0 otherwise.

Original entry on oeis.org

1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 4, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 6, 1, 0, 0, 4, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 4, 0, 4, 0, 0, 1, 12, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 12, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Jan 17 2019

Keywords

Examples

			The a(60) = 12 matrices:
  [2 2] [2 2] [2 3] [2 3] [2 5] [2 5] [3 2] [3 2] [3 5] [5 2] [5 2] [5 3]
  [3 5] [5 3] [2 5] [5 2] [2 3] [3 2] [2 5] [5 2] [2 2] [2 3] [3 2] [2 2]
		

Crossrefs

Positions of 0's are A323521.
Positions of 1's are A323520.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[If[IntegerQ[Sqrt[PrimeOmega[n]]],Length[Permutations[primeMS[n]]],0],{n,100}]

Formula

If A001222(n) is a perfect square, then a(n) = A008480(n). Otherwise, a(n) = 0.

A323522 Number of ways to fill a square matrix with the parts of a strict integer partition of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 25, 25, 49, 73, 121, 145, 217, 265, 361, 433, 553, 649, 817, 937, 1129, 1297, 1537, 1729, 2017, 2257, 2593, 2881, 3265, 3601, 4057, 4441, 4945, 5401, 5977, 6481, 7129, 7705, 8425, 9073, 9865, 373465, 374353, 738025, 1101865, 1828513
Offset: 0

Views

Author

Gus Wiseman, Jan 17 2019

Keywords

Examples

			The a(10) = 25 matrices:
  [10]
.
  [4 3] [4 3] [4 2] [4 2] [4 1] [4 1] [3 4] [3 4]
  [2 1] [1 2] [3 1] [1 3] [3 2] [2 3] [2 1] [1 2]
.
  [3 2] [3 2] [3 1] [3 1] [2 4] [2 4] [2 3] [2 3]
  [4 1] [1 4] [4 2] [2 4] [3 1] [1 3] [4 1] [1 4]
.
  [2 1] [2 1] [1 4] [1 4] [1 3] [1 3] [1 2] [1 2]
  [4 3] [3 4] [3 2] [2 3] [4 2] [2 4] [4 3] [3 4]
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) b(n, i):= `if`(n=0, [1], `if`(i<1, [], zip((x, y)
          -> x+y, b(n, i-1), `if`(i>n, [], [0, b(n-i, i-1)[]]), 0)))
        end:
    a:= n-> (l-> add(l[i^2+1]*(i^2)!, i=0..floor(sqrt(nops(l)-1))))(b(n$2)):
    seq(a(n), n=0..50);  # Alois P. Heinz, Jan 17 2019
  • Mathematica
    Table[Sum[(k^2)!*Length[Select[IntegerPartitions[n,{k^2}],UnsameQ@@#&]],{k,n}],{n,20}]
    (* Second program: *)
    q[n_, k_] := q[n, k] = If[n < k || k < 1, 0,
         If[n == 1, 1, q[n-k, k] + q[n-k, k-1]]];
    a[n_] := If[n == 0, 1, Sum[(k^2)! q[n, k^2], {k, 0, n}]];
    a /@ Range[0, 50] (* Jean-François Alcover, May 20 2021 *)

Formula

a(n) = Sum_{k >= 0} (k^2)! * Q(n, k^2) where Q = A008289.

A280351 Expansion of Sum_{k>=0} (x/(1 - x))^(k^3).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 9, 37, 121, 331, 793, 1717, 3433, 6436, 11441, 19449, 31825, 50389, 77521, 116281, 170545, 245158, 346105, 480701, 657802, 888058, 1184419, 1564435, 2063206, 2799487, 4272049, 8544097, 23535821, 77331981, 262534537, 865287625, 2720095405
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 01 2017

Keywords

Comments

Number of compositions of n into a cube number of parts.

Examples

			a(9) = 9 because we have:
[1]  [9]
[2]  [2, 1, 1, 1, 1, 1, 1, 1]
[3]  [1, 2, 1, 1, 1, 1, 1, 1]
[4]  [1, 1, 2, 1, 1, 1, 1, 1]
[5]  [1, 1, 1, 2, 1, 1, 1, 1]
[6]  [1, 1, 1, 1, 2, 1, 1, 1]
[7]  [1, 1, 1, 1, 1, 2, 1, 1]
[8]  [1, 1, 1, 1, 1, 1, 2, 1]
[9]  [1, 1, 1, 1, 1, 1, 1, 2]
		

Crossrefs

Programs

  • Maple
    a := n -> ifelse(n = 0, 1, add(binomial(n - 1, k^3 - 1), k = 1..floor(n^(1/3)))):
    seq(a(n), n = 0..39); # Peter Luschny, Dec 23 2022
  • Mathematica
    nmax = 39; CoefficientList[Series[Sum[(x/(1 - x))^k^3, {k, 0, nmax}], {x, 0, nmax}], x]

Formula

a(0) = 1; a(n) = Sum_{k=1..floor(n^(1/3))} binomial(n-1, k^3-1) for n > 0. - Jerzy R Borysowicz, Dec 22 2022

Extensions

a(0)=1 prepended by Alois P. Heinz, Dec 17 2022

A280352 Expansion of Sum_{k>=1} (x/(1 - x))^(k*(k+1)/2).

Original entry on oeis.org

1, 1, 2, 4, 7, 12, 22, 43, 85, 164, 308, 573, 1079, 2081, 4097, 8129, 16049, 31315, 60402, 115806, 222416, 430791, 843987, 1670054, 3322167, 6606936, 13078586, 25714238, 50230292, 97708338, 189921842, 370216757, 725680489, 1431888173, 2842060970, 5662371069
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 01 2017

Keywords

Comments

Number of compositions of n into a triangular number of parts.

Examples

			a(5) = 7 because we have:
  [1]  [5]
  [2]  [3, 1, 1]
  [3]  [1, 3, 1]
  [4]  [1, 1, 3]
  [5]  [2, 2, 1]
  [6]  [2, 1, 2]
  [7]  [1, 2, 2]
		

Crossrefs

Programs

  • Mathematica
    nmax = 36; Rest[CoefficientList[Series[Sum[(x/(1 - x))^(k (k + 1)/2), {k, 1, nmax}], {x, 0, nmax}], x]]
    nmax = 40; Rest[CoefficientList[Series[-1 + EllipticTheta[2, 0, Sqrt[x/(1-x)]]/(2*(x/(1-x))^(1/8)), {x, 0, nmax}], x]] (* Vaclav Kotesovec, Jan 01 2017 *)
  • PARI
    a(n) = sum(k=1, (sqrtint(8*n+1)-1)\2, binomial(n-1, k*(k+1)/2-1)) \\ Andrew Howroyd, Jan 14 2023

Formula

G.f.: Sum_{k>=1} (x/(1-x))^(k*(k+1)/2).
a(n) = Sum_{k=1..floor((sqrt(8*n+1)-1)/2)} binomial(n-1, k*(k+1)/2-1). - Jerzy R Borysowicz, Dec 26 2022
Conjecture: a(n+1)/a(n) ~ 2. - Jerzy R Borysowicz, Jan 14 2023
Conjecture: abs(b(n)-1) < 0.015, where b(n) = a(n)*sqrt(n)/2^(n-1), for n > 781; b(n) does not have a limit. - Jerzy R Borysowicz, Feb 17 2023

A323523 Number of positive integer square matrices with entries summing to n and equal row and column sums.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 1, 4, 2, 5, 1, 12, 1, 7, 22, 9, 1, 64, 1, 34, 121, 11, 1, 525, 2, 13, 407, 2022, 1, 801, 1, 10163, 1036, 17, 6211, 41735, 1, 19, 2212, 285784, 1, 3822, 1, 381446, 2229142, 23, 1, 1189540, 2, 22069276, 7261, 2309410, 1, 20943183, 164176641
Offset: 0

Views

Author

Gus Wiseman, Jan 17 2019

Keywords

Comments

Also the number of non-normal semi-magic squares with positive integer entries summing to n.

Examples

			The a(12) = 12 matrices:
  [12]
.
  [1 5] [5 1] [2 4] [4 2] [3 3]
  [5 1] [1 5] [4 2] [2 4] [3 3]
.
  [1 1 2] [1 1 2] [1 2 1] [1 2 1] [2 1 1] [2 1 1]
  [1 2 1] [2 1 1] [1 1 2] [2 1 1] [1 1 2] [1 2 1]
  [2 1 1] [1 2 1] [2 1 1] [1 1 2] [1 2 1] [1 1 2]
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    ptnsqrs[n_]:=Union@@Permutations/@Select[Union@@(Tuples[Permutations/@#]&/@Map[primeMS,facs[n],{2}]),And[SameQ@@Length/@#,Length[#]==0||Length[#]==Length[First[#]]]&];
    Table[Sum[Length[Select[ptnsqrs[Times@@Prime/@y],And[SameQ@@Total/@#,SameQ@@Total/@Transpose[#]]&]],{y,IntegerPartitions[n]}],{n,10}]

Formula

a(p) = 1 and a(p^2) = 2 for p prime (see comment in A323349). - Chai Wah Wu, Jan 20 2019
a(n) = Sum_{d|n, d<=n/d} A257493(d, n/d-d) for n > 0. - Andrew Howroyd, Apr 10 2020

Extensions

a(16)-a(55) from Chai Wah Wu, Jan 20 2019

A307522 Expansion of Product_{k>=1} ((1 + x)^k - x^k)/((1 + x)^k + x^k).

Original entry on oeis.org

1, -2, 2, -2, 4, -10, 22, -42, 72, -116, 188, -332, 662, -1432, 3148, -6736, 13784, -26894, 50254, -90782, 160856, -285230, 518170, -983710, 1964800, -4090002, 8705322, -18582722, 39219572, -81148034, 163946630, -323136562, 622125982, -1173528562, 2179230066
Offset: 0

Views

Author

Seiichi Manyama, Apr 12 2019

Keywords

Crossrefs

Programs

  • Maple
    a(n) := 2*(-1)^n*add( binomial(n-1, n-k^2), k = 1..floor(sqrt(n))):
    print(1, seq(a(n), n = 1..40)); # Peter Bala, Dec 31 2024
  • Mathematica
    m = 34; CoefficientList[Series[Product[((1 + x)^k - x^k)/((1 + x)^k + x^k), {k, 1, m}], {x, 0, m}], x] (* Amiram Eldar, May 14 2021 *)
  • PARI
    my(N=66, x='x+O('x^N)); Vec(prod(k=1, N, ((1+x)^k-x^k)/((1+x)^k+x^k)))

Formula

G.f.: theta_4(x/(1 + x)), where theta_4() is the Jacobi theta function.
From Peter Bala, Dec 31 2024: (Start)
For n >= 1, a(n) = 2 * (-1)^n * Sum_{k = 1..floor(sqrt(n))} binomial(n-1, n-k^2).
For n >= 1, |a(n)| = 2 * A103198(n). (End)

A339445 Number of partitions of n into squares such that the number of parts is a square.

Original entry on oeis.org

1, 1, 0, 0, 2, 0, 0, 1, 0, 2, 1, 0, 2, 1, 0, 2, 3, 1, 2, 2, 2, 2, 2, 2, 3, 5, 2, 4, 6, 1, 4, 6, 3, 7, 6, 4, 10, 6, 4, 10, 9, 6, 11, 10, 8, 10, 10, 11, 14, 16, 11, 15, 19, 10, 17, 22, 13, 24, 23, 16, 28, 21, 18, 33, 30, 24, 33, 33, 29, 33, 37, 33, 43, 45, 35, 49
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 05 2020

Keywords

Examples

			                                    [1 1 1]
                          [1 4]     [1 1 1]
a(23) = 2 because we have [9 9] and [4 4 9].
		

Crossrefs

Programs

  • Maple
    g:= proc(n, k, m)
      # number of partitions of n into k parts which are squares > m^2
       option remember; local r;
      if k = 0 then if n = 0 then return 1 else return 0 fi fi;
      if n < k*(m+1)^2 then return 0 fi;
      add(procname(n-r*(m+1)^2, k-r, m+1), r =max(0, ceil((k*(m+2)^2-n)/(2*m+3))) .. k)
    end proc:
    f:= proc(n) local k; add(g(n,k^2,0),k=1..floor(sqrt(n))) end proc:
    f(0):= 1:
    map(f, [$0..100]); # Robert Israel, Oct 26 2023

A323524 Number of integer partitions of n whose parts can be arranged into a square matrix with equal row and column sums.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 1, 3, 2, 3, 1, 5, 1, 4, 4, 6, 1, 10, 1, 7, 10, 6, 1, 24, 2, 7, 22, 18, 1, 38, 1, 35, 43, 9, 6, 124, 1, 10, 77, 158, 1, 110, 1, 285, 186, 12, 1, 742, 2, 170, 203, 1110, 1, 285, 480, 2115, 306, 15, 1
Offset: 0

Views

Author

Gus Wiseman, Jan 17 2019

Keywords

Examples

			The a(12) = 5 integer partitions are (12), (5,5,1,1), (4,4,2,2), (3,3,3,3), (2,2,2,1,1,1,1,1,1). For example, such a matrix for (2,2,2,1,1,1,1,1,1) is:
  [1 1 2]
  [2 1 1]
  [1 2 1]
		

Crossrefs

Formula

a(p) = 1 and a(p^2) = 2 for p prime (see comment in A323349). - Chai Wah Wu, Jan 20 2019

Extensions

a(16)-a(59) from Chai Wah Wu, Jan 20 2019
Showing 1-10 of 10 results.