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.

Previous Showing 11-13 of 13 results.

A226743 Number of alternating sums of consecutive primes with result 2n-1.

Original entry on oeis.org

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

Views

Author

Ralf Stephan, Sep 01 2013

Keywords

Comments

Since A008347 has no duplicate values, a(n) must be finite. This is not true for even results of the sum.
Sums of a single term are not included. - Robert Israel, Feb 06 2025

Examples

			n=5: 11-7+5=2*5-1, 13-11+7=2*5-1, 19-17+13-11+7-5+3=2*5-1, so a(5)=3.
		

Crossrefs

Cf. A084143.

Programs

  • Maple
    N:= 100: M:= 2*N-1: # for a(1)..a(N)
    p:= 1: b:= 0: B:= NULL:
    for i from 1 do
      p:= nextprime(p);
      b:= b + (-1)^i*p;
      B:= B,b;
      if b > M then nB:= i; break fi;
    od:
    V:= Vector(M):
    for j from 2 to nB by 2 while B[j] <= M do V[B[j]]:= 1 od:
    for i from 1 to nB do
      for j from i+3 to nB by 2 do
        r:= abs(B[j]-B[i]);
        if r <= M then V[r]:= V[r]+1 else break fi;
    od od:
    seq(V[i],i=1..M,2); # Robert Israel, Feb 06 2025
  • PARI
    vb=vecsmall(500);for(k=2,1000,forstep(l=k-1,1,-1,t=sum(i=l,k,prime(i)*(-1)^(k-i));if(t<500,vb[t]=vb[t]+1)))

A282906 Expansion of 1/(1 - Sum_{j>=1} x^(Sum_{i=1..j} prime(i))).

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 1, 2, 1, 3, 3, 4, 6, 5, 10, 9, 15, 18, 21, 32, 33, 52, 58, 79, 102, 122, 172, 201, 277, 341, 438, 575, 707, 947, 1169, 1530, 1949, 2474, 3228, 4046, 5281, 6678, 8594, 11035, 14025, 18142, 23015, 29681, 37888, 48512, 62319, 79456, 102230, 130456, 167418, 214356, 274221, 351904, 449700, 577024, 738150
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 24 2017

Keywords

Comments

Number of compositions (ordered partitions) of n into partial sums of primes (A007504).
Conjecture: every number > 3 is the sum of at most 5 partial sums of primes.

Examples

			a(11) = 4 because we have [5, 2, 2, 2], [2, 5, 2, 2], [2, 2, 5, 2] and [2, 2, 2, 5].
		

Crossrefs

Programs

  • Mathematica
    nmax = 60; CoefficientList[Series[1/(1 - Sum[x^Sum[Prime[i], {i, 1, j}], {j, 1, nmax}]), {x, 0, nmax}], x]

Formula

G.f.: 1/(1 - Sum_{j>=1} x^(Sum_{i=1..j} prime(i))).

A086834 Smallest prime that is the smallest of at least two consecutive primes with sum=n; a(n)=0 if no consecutive primes with sum=n exist.

Original entry on oeis.org

0, 0, 0, 0, 2, 0, 0, 3, 0, 2, 0, 5, 0, 0, 3, 0, 2, 7, 0, 0, 0, 0, 5, 11, 0, 3, 0, 2, 0, 13, 7, 0, 0, 0, 0, 5, 0, 0, 3, 0, 2, 19, 0, 0, 0, 0, 0, 7, 13, 0, 0, 23, 5, 0, 0, 3, 0, 2, 17, 11, 0, 0, 0, 0, 0, 0, 7, 31, 0, 0, 19, 5, 0, 0, 3, 0, 2, 37, 0, 0, 0, 0, 11, 41, 0, 0, 0, 17, 0, 7, 0, 0, 0, 0, 5, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 08 2003

Keywords

Comments

a(n) = 0 iff A084143(n) = 0.

Examples

			n = 72 = 5+7+11+13+17+19 = 13+17+19+23, as 5<13: a(72) = 5.
		
Previous Showing 11-13 of 13 results.