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.

A317685 Number of partitions of n into a prime and two positive squares.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 0, 2, 1, 1, 2, 1, 2, 3, 0, 4, 2, 1, 2, 3, 3, 4, 3, 3, 3, 4, 1, 4, 4, 3, 3, 6, 3, 4, 4, 2, 6, 6, 1, 8, 3, 3, 6, 6, 4, 6, 4, 5, 7, 6, 3, 6, 6, 5, 6, 9, 5, 8, 6, 3, 7, 8, 2, 12, 6, 4, 7, 7, 6, 10, 7, 7, 9, 7, 5, 9, 9, 7, 9, 10, 4
Offset: 0

Views

Author

R. J. Mathar, Michel Marcus, Aug 04 2018

Keywords

Comments

As in A025426, the two squares do not need to be distinct.

Examples

			a(7) = 2 counts 7 = 5 + 1^2 + 1^2 = 2 + 1^2 + 2^2.
		

Crossrefs

Programs

  • Maple
    A317685 := proc(n)
        a := 0 ;
        p := 2;
        while p <= n do
            a := a+A025426(n-p);
            p := nextprime(p) ;
        end do:
        a ;
    end proc:
  • Mathematica
    p2sQ[{a_,b_,c_}]:=PrimeQ[a]&&AllTrue[{Sqrt[b],Sqrt[c]},IntegerQ]||PrimeQ[b] && AllTrue[{Sqrt[c],Sqrt[a]},IntegerQ]||PrimeQ[c]&&AllTrue[{Sqrt[b],Sqrt[a]},IntegerQ]; Table[Count[IntegerPartitions[n,{3}],?(p2sQ[#]&)],{n,0,80}] (* _Harvey P. Dale, Mar 10 2023 *)

Formula

a(n) = Sum_{primes p} A025426(n-p).

A317683 Number of partitions of n into a prime and two distinct positive squares.

Original entry on oeis.org

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

Views

Author

R. J. Mathar, Michel Marcus, Aug 04 2018

Keywords

Comments

As in A025441, the two squares must be distinct and positive.

Examples

			a(12)=2 counts 12 = 7 +1^2 +2^2 = 2 + 1^2 +3^2.
		

Crossrefs

Programs

Formula

a(n) = Sum_{primes p} A025441(n-p).

A317684 Number of partitions of n into a prime and two squares.

Original entry on oeis.org

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

Views

Author

R. J. Mathar, Michel Marcus, Aug 04 2018

Keywords

Comments

As in A000161, the squares may be zero and do not need to be distinct.

Examples

			a(11) = 4 counts 11 = 11+0^2+0^2 = 7+0^2+2^2 = 2+0^2+3^2 = 3+2^2+2^2.
		

Crossrefs

Programs

  • Maple
    A317684 := proc(n)
        a := 0 ;
        p := 2;
        while p <= n do
            a := a+A000161(n-p);
            p := nextprime(p) ;
        end do:
        a ;
    end proc:

Formula

a(n) = Sum_{primes p} A000161(n-p).
Showing 1-3 of 3 results.