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.

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

A121497 Binomial transform of the characteristic function of the prime numbers (A010051).

Original entry on oeis.org

0, 0, 1, 4, 10, 21, 41, 78, 148, 282, 537, 1013, 1882, 3446, 6267, 11468, 21416, 41209, 81771, 166042, 340994, 700570, 1429375, 2886777, 5771828, 11453105, 22638215, 44742141, 88681674, 176545766, 352992931, 707922077, 1421120880, 2849433326
Offset: 0

Views

Author

T. D. Noe, Aug 03 2006

Keywords

Comments

This is the binomial transform of the sequence {0,0,1,1,0,1,0,1,...}. Sequence A052467, the binomial transform of the sequence {0,1,1,0,1,0,1,...} is very similar. In fact, the first differences of this sequence yields A052467.
The number of pernicious numbers (A052294) less than 2^n. Although the graph looks almost like 2^n, the graph of a(n)/2^n has quite a bit of variation. - T. D. Noe, Mar 14 2009
a(n)/2^n is the probability that a series of Bernoulli trials with probability of success equal to 1/2 will result in a prime number of successes. Cf. A178851. - Eric M. Schmidt, Jul 13 2012
a(n) equals the number of subsets of [n] whose cardinalities are prime. - Ivan N. Ianakiev, Jul 14 2019
Upper and lower bounds are provided by Kim and Sinha (see links). - Jeffrey Shallit, Nov 14 2024

Crossrefs

Programs

  • Maple
    Primes:= select(isprime, [2,seq(i,i=3..100,2)]):
    G:= add((z/(1-z))^p/(1-z),p=Primes):
    S:= series(G,z,101):
    seq(coeff(S,z,i),i=0..100); # Robert Israel, Sep 27 2018
  • Mathematica
    Table[Sum[Binomial[n,Prime[i]], {i,PrimePi[n]}], {n,40}]
  • PARI
    a(n)=my(s);forprime(p=2,n,s+=binomial(n,p));s \\ Charles R Greathouse IV, Mar 22 2013

Formula

a(n) = Sum_{i=1..pi(n)} binomial(n,prime(i)), where pi(n) is A000720(n), the number of primes <= n.
E.g.f.: exp(x) * (x^2/2! + x^3/3! + x^5/5! + ...) - Eric M. Schmidt, Jul 14 2012
G.f.: Sum_{p prime} x^p/(1-x)^(p+1). - Robert Israel, Sep 27 2018

Extensions

a(0) inserted by Franklin T. Adams-Watters, Jul 13 2012

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

A102623 Number of compositions into a prime number of distinct parts.

Original entry on oeis.org

0, 0, 2, 2, 4, 10, 12, 18, 26, 32, 40, 52, 60, 72, 206, 218, 352, 490, 744, 1002, 1382, 1760, 2380, 3004, 3864, 4728, 5954, 12218, 13804, 20554, 27660, 39930, 52682, 75632, 99184, 132940, 172332, 227088, 287606, 373562, 465280, 587602, 725880, 899802, 1094846
Offset: 1

Views

Author

Vladeta Jovovic, Jan 31 2005

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, [1],
          `if`(n>i*(i+1)/2, [], zip((x, y)->x+y, b(n, i-1),
          `if`(i>n, [], [0, b(n-i, i-1)[]]), 0)))
        end:
    a:= proc(n) local l; l:= b(n$2);
          add(`if`(isprime(i), l[i+1]*i!, 0), i=2..nops(l)-1)
        end:
    seq(a(n), n=1..50);  # Alois P. Heinz, Nov 20 2012
  • Mathematica
    CoefficientList[ Series[ Sum[ Prime[k]!* x^(Prime[k]^2/2 + Prime[k]/2)/Product[1 - x^j, {j, Prime[k]}], {k, 44}], {x, 0, 44}], x] (* Robert G. Wilson v, Feb 04 2005 *)

Formula

G.f.: Sum(prime(k)!*x^(1/2*prime(k)^2+1/2*prime(k))/Product(1-x^j, j = 1 .. prime(k)), k = 1 .. infinity).

Extensions

More terms from Robert G. Wilson v, Feb 04 2005

A339434 Number of compositions (ordered partitions) of n into a prime number of distinct prime parts.

Original entry on oeis.org

0, 0, 0, 0, 0, 2, 0, 2, 2, 2, 8, 0, 8, 2, 8, 8, 10, 0, 16, 8, 16, 14, 16, 12, 18, 14, 22, 18, 136, 18, 138, 26, 22, 26, 258, 30, 266, 30, 266, 158, 492, 36, 506, 158, 510, 278, 744, 174, 748, 290, 758, 528, 990, 306, 1228, 668, 1116, 780, 6384, 678, 6630, 800, 1720, 1274
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 04 2020

Keywords

Examples

			a(10) = 8 because we have [7, 3], [3, 7], [5, 3, 2], [5, 2, 3], [3, 5, 2], [3, 2, 5], [2, 5, 3] and [2, 3, 5].
		

Crossrefs

Programs

  • Maple
    s:= proc(n) option remember; `if`(n<1, 0, ithprime(n)+s(n-1)) end:
    b:= proc(n, i, t) option remember; `if`(s(i)`if`(p>n, 0,
             b(n-p, i-1, t+1)))(ithprime(i))+b(n, i-1, t)))
        end:
    a:= n-> b(n, numtheory[pi](n), 0):
    seq(a(n), n=0..70);  # Alois P. Heinz, Dec 04 2020
  • Mathematica
    s[n_] := s[n] = If[n < 1, 0, Prime[n] + s[n - 1]];
    b[n_, i_, t_] := b[n, i, t] = If[s[i] < n, 0,
         If[n == 0, If[PrimeQ[t], t!, 0], Function[p, If[p > n, 0,
           b[n - p, i - 1, t + 1]]][Prime[i]] + b[n, i - 1, t]]];
    a[n_] := b[n, PrimePi[n], 0];
    Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Mar 01 2022, after Alois P. Heinz *)

A103197 Number of compositions of n into Fibonacci number of parts.

Original entry on oeis.org

1, 2, 4, 7, 12, 21, 37, 65, 115, 208, 386, 727, 1367, 2536, 4630, 8376, 15217, 28170, 53620, 104843, 208547, 416448, 824990, 1608138, 3071813, 5747106, 10561032, 19177849, 34734782, 63495907, 118601911, 228454377, 454988025, 932297291
Offset: 1

Views

Author

Vladeta Jovovic, Mar 18 2005

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[{1,2,4,Table[SeriesCoefficient[Sum[(x/(1-x))^Fibonacci[k],{k,2,n}],{x,0,n}],{n,4,35}]}] (* Vaclav Kotesovec, May 01 2014 *)

Formula

a(n) = Sum_{k=0..n} binomial(n-1, k-1)*A010056(k).
a(n) = Sum_{k>1} (x/(1-x))^Fibonacci(k).
Showing 1-7 of 7 results.