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!)
A084143 Number of partitions of n into a sum of two or more consecutive primes. 9
0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 2, 0, 0, 1, 0, 2, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 2, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 2, 0, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,36

LINKS

T. D. Noe, Table of n, a(n) for n = 1..10000

Eric Weisstein's World of Mathematics, Prime Sums

FORMULA

G.f.: Sum_{i>=1} Sum_{j>=i+1} Product_{k=i..j} x^prime(k). - Emeric Deutsch, Mar 30 2006

EXAMPLE

a(36)=2 because we have 36 = 17 + 19 = 5 + 7 + 11 + 13.

MAPLE

g:=sum(sum(product(x^ithprime(k), k=i..j), j=i+1..25), i=1..25): gser:=series(g, x=0, 80): seq(coeff(gser, x, n), n=1..75); # Emeric Deutsch, Mar 30 2006

# alternative, R. J. Mathar, Aug 19 2020

A084143 := proc(n::integer)

    local a, k, i, spr ;

    a := 0 ;

    for k from 2 do

        if add(ithprime(i), i=1..k) > n then

            break;

        end if;

        for i from 1 do

            spr := add( ithprime(j), j=i..i+k-1) ;

            if spr > n then

                break;

            end if;

            if spr = n then

                a := a +1 ;

            end if;

        end do:

    end do:

    a ;

end proc:

MATHEMATICA

max = 25; gf = Sum[ Sum[ Product[ x^Prime[k], {k, i, j}], {j, i+1, max}], {i, 1, max}]; Rest[ CoefficientList[gf, x]][[1 ;; 75]] (* Jean-Fran├žois Alcover, Oct 23 2012, after Emeric Deutsch *)

CROSSREFS

Cf. A084146, A084147.

Sequence in context: A076544 A307377 A323882 * A025888 A145708 A138532

Adjacent sequences:  A084140 A084141 A084142 * A084144 A084145 A084146

KEYWORD

nonn

AUTHOR

Eric W. Weisstein, May 15 2003

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 March 4 11:25 EST 2021. Contains 341791 sequences. (Running on oeis4.)