login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A317682 Number of partitions of n into a prime and two distinct squares. 4
0, 0, 0, 1, 1, 0, 2, 2, 2, 1, 1, 2, 4, 1, 2, 3, 3, 2, 4, 2, 4, 3, 4, 4, 4, 1, 2, 6, 6, 3, 5, 3, 6, 5, 3, 2, 7, 3, 5, 7, 4, 4, 8, 5, 6, 5, 5, 7, 9, 3, 4, 6, 7, 6, 9, 5, 8, 9, 6, 4, 9, 3, 6, 11, 6, 5, 10, 7, 10, 8, 8, 8, 12, 5, 5, 8, 10, 9, 11, 6, 7 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,7

COMMENTS

As in A025435, zero is a valid square here.

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..20000

FORMULA

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

EXAMPLE

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

MAPLE

A317682 := proc(n)

    a := 0 ;

    p := 2;

    while p < n do

        a := a+A025435(n-p);

        p := nextprime(p) ;

    end do:

    a ;

end proc:

MATHEMATICA

A025435[n_] := Length[ PowersRepresentations[n, 2, 2]] - Boole[ IntegerQ[ Sqrt[2n]]];

a[n_] := Module[{s = 0, p}, For[p = 2, p <= n-1, p = NextPrime[p], s += A025435[n-p]]; s];

a /@ Range[0, 100] (* Jean-François Alcover, Apr 07 2020 *)

PROG

(PARI) A317682(n, s=0)={forprime(p=2, n-1, s+=A025435(n-p)); s} \\ M. F. Hasler, Aug 05 2018

CROSSREFS

Cf. A025435, A317683 - A317685.

Sequence in context: A334486 A171412 A248213 * A216651 A071338 A078826

Adjacent sequences:  A317679 A317680 A317681 * A317683 A317684 A317685

KEYWORD

nonn,easy

AUTHOR

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

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 13 11:17 EDT 2021. Contains 344990 sequences. (Running on oeis4.)