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

A103198 Number of compositions of n into a square number of parts.

Original entry on oeis.org

1, 1, 1, 1, 2, 5, 11, 21, 36, 58, 94, 166, 331, 716, 1574, 3368, 6892, 13447, 25127, 45391, 80428, 142615, 259085, 491855, 982400, 2045001, 4352661, 9291361, 19609786, 40574017, 81973315, 161568281, 311062991, 586764281, 1089615033, 2005257849, 3688711427
Offset: 0

Views

Author

Vladeta Jovovic, Mar 18 2005

Keywords

Comments

From Gus Wiseman, Jan 17 2019: (Start)
Also the number of ways to fill a square matrix with the parts of an integer partition of n. For example, the a(6) = 11 matrices are:
[6]
.
[1 1] [1 1] [1 3] [3 1] [1 1] [1 2] [1 2] [2 1] [2 1] [2 2]
[1 3] [3 1] [1 1] [1 1] [2 2] [1 2] [2 1] [1 2] [2 1] [1 1]
(End)

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(n=0,
          `if`(issqr(t), 1, 0), add(b(n-j, t+1), j=1..n))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..40);  # Alois P. Heinz, Jan 18 2019
  • Mathematica
    nmax = 40; Rest[CoefficientList[Series[-1/2 + EllipticTheta[3, 0, x/(1-x)]/2, {x, 0, nmax}], x]] (* Vaclav Kotesovec, Jan 03 2017 *)

Formula

a(n) = Sum_{k>=0} (x/(1-x))^(k^2).
Binomial transform of the characteristic function of squares A010052, with 0th term omitted. - Carl Najafi, Sep 09 2011
a(n) = Sum_{k >= 0} binomial(n-1,k^2-1). - Gus Wiseman, Jan 17 2019

Extensions

a(0)=1 prepended by Alois P. Heinz, Jan 18 2019

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.

A323528 Numbers whose sum of prime indices is a perfect square.

Original entry on oeis.org

1, 2, 7, 9, 10, 12, 16, 23, 38, 51, 53, 65, 68, 77, 78, 94, 97, 98, 99, 104, 105, 110, 125, 126, 129, 132, 135, 140, 150, 151, 162, 168, 172, 176, 178, 180, 200, 205, 216, 224, 227, 240, 246, 249, 259, 288, 298, 311, 320, 328, 332, 333, 341, 361, 370, 377, 384
Offset: 1

Views

Author

Gus Wiseman, Jan 17 2019

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798. The sum of prime indices of n is A056239(n).
Also Heinz numbers of integer partitions of perfect squares, where the Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).

Examples

			10 is in the sequence because 10 = 2*5 = prime(1)*prime(3) and 1 + 3 = 4 is a square.
		

Crossrefs

Programs

  • Maple
    select(k-> issqr(add(numtheory[pi](i[1])*i[2], i=ifactors(k)[2])), [$1..400])[]; # Alois P. Heinz, Jan 22 2019
  • Mathematica
    Select[Range[100],IntegerQ[Sqrt[Sum[PrimePi[f[[1]]]*f[[2]],{f,FactorInteger[#]}]]]&]
  • PARI
    isok(n) = {my(f=factor(n)); issquare(sum(k=1, #f~, primepi(f[k, 1])*f[k,2]));} \\ Michel Marcus, Jan 18 2019

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.

A323526 One and prime numbers whose prime index is a perfect square.

Original entry on oeis.org

1, 2, 7, 23, 53, 97, 151, 227, 311, 419, 541, 661, 827, 1009, 1193, 1427, 1619, 1879, 2143, 2437, 2741, 3083, 3461, 3803, 4211, 4637, 5051, 5519, 6007, 6481, 6997, 7573, 8161, 8737, 9341, 9931, 10627, 11321, 12049, 12743, 13499, 14327, 15101, 15877, 16747, 17609
Offset: 1

Views

Author

Gus Wiseman, Jan 17 2019

Keywords

Crossrefs

Programs

  • Mathematica
    Array[Prime[#^2]&,20]
  • PARI
    vector(50, n, if (n==1, 1, prime((n-1)^2))) \\ Michel Marcus, Feb 15 2019

Formula

a(n) = A011757(n-1) for n > 1. - Alois P. Heinz, Jan 17 2019

A323527 Numbers whose sum of prime indices is not a perfect square.

Original entry on oeis.org

3, 4, 5, 6, 8, 11, 13, 14, 15, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 69, 70, 71, 72, 73, 74, 75, 76, 79, 80, 81
Offset: 1

Views

Author

Gus Wiseman, Jan 17 2019

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798. The sum of prime indices of n is A056239(n).

Crossrefs

Complement of A323528.
Cf. A000037, A000720, A001248, A026478 (Omega is square), A056239, A112798, A323520, A323521 (Omega is not square), A323525, A323526.

Programs

  • Maple
    remove(k-> issqr(add(numtheory[pi](i[1])*i[2], i=ifactors(k)[2])), [$1..99])[];  # Alois P. Heinz, Jan 22 2019
  • Mathematica
    Select[Range[100],!IntegerQ[Sqrt[Sum[PrimePi[f[[1]]]*f[[2]],{f,FactorInteger[#]}]]]&]
  • PARI
    isok(n) = {my(f=factor(n)); !issquare(sum(k=1, #f~, primepi(f[k, 1])*f[k,2]));} \\ Michel Marcus, Jan 18 2019
Showing 1-6 of 6 results.