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

A024941 Number of partitions of n into distinct primes of the form 4k + 1.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(0) = 1 corresponds to the empty partition {}.

Examples

			a(41) = 1 since it can be expressed as a sum of primes of the form 4k + 1 in only one way: a trivial partition containing just itself.
a(42) = 2 since 42 = 5 + 37 = 13 + 29.
Although 43 = 2 * 13 + 17 = 6 * 5 + 13, none of those consist of distinct primes only. Hence a(43) = 0.
		

Crossrefs

Cf. A024942 (4k - 1).

Programs

  • Mathematica
    searchMax = 120; primes4kp1 = Select[4Range[Floor[searchMax/4]] + 1, PrimeQ]; Table[Length[Select[IntegerPartitions[n, All, primes4kp1], DuplicateFreeQ]], {n, 0, searchMax}] (* Alonso del Arte, Apr 17 2019 *)
  • PARI
    { my(V=select(x->x%4==1,primes(40))); my(x='x+O('x^V[#V])); Vec(prod(k=1,#V,1+x^V[k])) } \\ Joerg Arndt, Apr 19 2019

Extensions

Definition clarified by Felix Fröhlich, Apr 17 2019
a(0) = 1 prepended by Joerg Arndt, Apr 19 2019

A385234 a(n) is the number of partitions of n into primes of the form 4*k + 1.

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 2, 1, 3, 2, 2, 3, 2, 3, 2, 3, 4, 2, 3, 3, 4, 5, 3, 5, 4, 5, 5, 5, 6, 5, 6, 5, 7, 7, 6, 8, 7, 9, 8, 8, 11, 8, 11, 10, 10, 13, 9, 14, 12, 13, 15, 12, 17
Offset: 0

Views

Author

Felix Huber, Jul 06 2025

Keywords

Comments

a(0) = 1 corresponds to the empty partition {}.

Examples

			The a(53) = 3 partitions of 53 into primes of the form 4*k + 1 are [53], [5, 5, 13, 13, 17] and [5, 5, 5, 5, 5, 5, 5, 5, 13].
		

Crossrefs

Programs

  • Maple
    with(gfun):
    A385234:=proc(N) # To get the first N terms.
        local f,i,g,h,n;
        f:=select(x->x mod 4=1,[seq(ithprime(i),i=1..NumberTheory:-pi(N))]);
        g:=mul(1/(1-q^f[n]),n=1..nops(f)):
        h:=series(g,q,N):
        return op(seriestolist(h));
    end proc;
    A385234(84);
  • Mathematica
    A385234[N_]:=Module[{f, g},f = Select[Prime[Range[PrimePi[N]]], Mod[#, 4] == 1 &]; g = Product[1/(1 - q^f[[n]]),{n, 1, Length[f]}];CoefficientList[Series[g, {q, 0, N}], q]];A385234[83]
    (* James C. McMahon, Jul 11 2025 *)

Formula

G.f.: 1 / Product_{k>=1} (1-x^A002144(k)).
a(n) + A385235(n) <= A000607(n) for n >= 1.
a(n) >= A024941(n).

A385235 a(n) is the number of partitions of n into primes of the form 4*k + 3.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 3, 5, 5, 5, 6, 6, 7, 7, 7, 8, 9, 9, 9, 11, 11, 12, 13, 14, 15, 15, 17, 17, 19, 20, 20, 23, 24, 25, 26, 29, 30, 30, 34, 35, 37, 39, 41, 44, 46, 49, 51, 55, 57, 59, 64, 66, 70, 73, 77
Offset: 0

Views

Author

Felix Huber, Jul 06 2025

Keywords

Comments

a(0) = 1 corresponds to the empty partition {}.

Examples

			The a(14) = 2 partitions of 14 into primes of the form 4*k + 3 are [3, 11] and [7, 7].
The a(23) = 3 partitions of 23 into primes of the form 4*k + 3 are [23], [3, 3, 3, 3, 11] and [3, 3, 3, 7, 7].
		

Crossrefs

Programs

  • Maple
    with(gfun):
    A385235:=proc(N) # To get the first N terms.
        local f,i,g,h,n;
        f:=select(x->x mod 4=3,[seq(ithprime(i),i=1..NumberTheory:-pi(N))]);
        g:=mul(1/(1-q^f[n]),n=1..nops(f)):
        h:=series(g,q,N):
        return op(seriestolist(h));
    end proc;
    A385235(76);

Formula

G.f.: 1 / Product_{k>=1} (1-x^A002145(k)).
a(n) + A385234(n) <= A000607(n) for n >= 1.
a(n) >= A024942(n).
Showing 1-3 of 3 results.