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-10 of 11 results. Next

A068307 From Goldbach problem: number of decompositions of n into a sum of three primes.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 1, 2, 1, 2, 2, 2, 1, 3, 2, 4, 2, 3, 2, 5, 2, 5, 3, 5, 3, 7, 3, 7, 2, 6, 3, 9, 2, 8, 4, 9, 4, 10, 2, 11, 3, 10, 4, 12, 3, 13, 4, 12, 5, 15, 4, 16, 3, 14, 5, 17, 3, 16, 4, 16, 6, 19, 3, 21, 5, 20, 6, 20, 2, 22, 5, 21, 6, 22, 5, 28, 5, 24, 7
Offset: 1

Views

Author

Naohiro Nomoto, Feb 24 2002

Keywords

Comments

For even n > 2, a(n) = A061358(n-2). - Reinhard Zumkeller, Aug 08 2009
Vinogradov proved that every sufficiently large odd number is the sum of three primes. - T. D. Noe, Mar 27 2013
The two Helfgott papers show that every odd number greater than 5 is the sum of three primes (this is the Odd Goldbach Conjecture). - T. D. Noe, May 14 2013, N. J. A. Sloane, May 18 2013

Examples

			a(6) = 1 because 6 = 2+2+2,
a(9) = 2 because 9 = 2+2+5 = 3+3+3,
a(15) = 3 because 15 = 2+2+11 = 3+5+7 = 5+5+5,
a(17) = 4 because 17 = 2+2+13 = 3+3+11 = 3+7+7 = 5+5+7.
- _Zak Seidov_, Jun 29 2017
		

Crossrefs

First occurrence: A139321. Records: A139322.
Column k=3 of A117278.

Programs

Formula

a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} A010051(i) * A010051(k) * A010051(n-i-k). - Wesley Ivan Hurt, Mar 26 2019
a(n) = [x^n y^3] Product_{k>=1} 1/(1 - y*x^prime(k)). - Ilya Gutkovskiy, Apr 18 2019

Extensions

More terms from Vladeta Jovovic, Mar 10 2002

A054860 Number of ways of writing 2n+1 as p + q + r where p, q, r are primes with p <= q <= r.

Original entry on oeis.org

0, 0, 0, 1, 2, 2, 2, 3, 4, 3, 5, 5, 5, 7, 7, 6, 9, 8, 9, 10, 11, 10, 12, 13, 12, 15, 16, 14, 17, 16, 16, 19, 21, 20, 20, 22, 21, 22, 28, 24, 25, 29, 27, 29, 33, 29, 33, 35, 34, 30, 38, 36, 35, 43, 38, 37, 47, 42, 43, 50, 46, 47, 53, 50, 45, 57, 54, 47, 62, 53, 49, 65, 59, 55, 68
Offset: 0

Views

Author

James Sellers, May 25 2000

Keywords

Comments

Every sufficiently large odd number is the sum of three primes (th. by Vinogradov, 1937). Goldbach's conjecture requires three ODD primes and then a(n) > 0 for n > 2 is weaker.
The unconditional theorem was proved by Helfgott (see link below). - T. D. Noe, May 15 2013

Examples

			7 = 2 + 2 + 3 so a(3) = 1;
9 = 2 + 2 + 5 = 3 + 3 + 3 so a(4) = 2;
11 = 2 + 2 + 7 = 3 + 3 + 5 so a(5) = 2.
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, appendix 3.
  • Wolfgang Schwarz, Einfuehrung in Methoden und Ergebnisse der Primzahltheorie, Bibliographisches Institut Mannheim, 1969, ch. 7.

Crossrefs

Programs

  • Mathematica
    nn = 201; t = Table[0, {(nn + 1)/2}]; pMax = PrimePi[nn]; ps =
    Prime[Range[pMax]]; Do[n = ps[[i]] + ps[[j]] + ps[[k]]; If[n <= nn &&
    OddQ[n], t[[(n + 1)/2]]++], {i, pMax}, {j, i, pMax}, {k, j, pMax}]; t (* T. D. Noe, May 23 2017 *)
    f[n_] := Length@ IntegerPartitions[2n +1, {3}, Prime@ Range@ PrimePi[2n -3]]; Array[f, 75, 0] (* Robert G. Wilson v, Jun 30 2017 *)
  • PARI
    first(n)=my(v=vector(n)); forprime(r=3,2*n-3, v[r\2+2]++); forprime(p=3,(2*n+1)\3, forprime(q=p,(2*n+1-p)\2, forprime(r=q,2*n+1-p-q, v[(p+q+r)\2]++))); concat(0, v) \\ Charles R Greathouse IV, May 25 2017

A087916 Number of ordered ways to write 2n+1 as a sum of 3 odd primes.

Original entry on oeis.org

0, 0, 0, 0, 1, 3, 6, 7, 9, 12, 16, 18, 21, 27, 30, 30, 34, 36, 42, 46, 48, 48, 51, 63, 60, 64, 81, 75, 76, 87, 87, 90, 102, 105, 97, 117, 114, 105, 144, 129, 126, 159, 141, 145, 177, 162, 160, 195, 186, 153, 207, 201, 171, 237, 210, 187, 255, 234, 222, 279
Offset: 0

Views

Author

Ralf Stephan, Oct 18 2003

Keywords

Crossrefs

Cf. A007963 (unordered), A068307 (with 2).
Cf. A087917.

Programs

  • Mathematica
    nn = 100; lim = 2*nn + 17; ps = Prime[Range[2, nn + 1]]; t = Table[0, {lim}]; Do[s = i + j + k; If[s <= lim, t[[s]]++], {i, ps}, {j, ps}, {k, ps}]; Take[t, {1, lim, 2}] (* T. D. Noe, Apr 10 2014 *)
  • PARI
    for(n=0, 100, t=2*n+1; c=0; for(k=2, t, for(l=2, t, for(m=2, t, tt=prime(k)+prime(l)+prime(m); if(tt>2*n+1, break); if(tt==2*n+1, c=c+1)))); print1(c", "))

Extensions

Leading zeros added by T. D. Noe, Apr 10 2014

A294294 Conjecturally, all odd numbers greater than a(n) can be represented in more ways by the sum of 3 odd primes p+q+r with p<=q<=r than a(n).

Original entry on oeis.org

7, 11, 15, 19, 23, 25, 31, 35, 37, 43, 45, 49, 55, 61, 63, 69, 75, 79, 81, 85, 87, 91, 99, 105, 111, 117, 129, 135, 141, 147, 159, 165, 171, 177, 195, 201, 207, 219, 225, 231, 237, 255, 261, 267, 279, 285, 291, 297, 309, 315, 321, 339, 345, 351
Offset: 1

Views

Author

Hugo Pfoertner, Oct 27 2017

Keywords

Comments

The sequence provides numerical evidence of the validity of the ternary Goldbach conjecture, i.e. that every odd number >5 can be written as the sum of 3 primes, now proved by A. Helfgott.
The corresponding minimum numbers of representations are provided in A294295.
Empirically, mod(a(n),6) = 3 for all a(n) > 91 and mod(a(n),30) = 15 for all a(n) > 1281.

Examples

			a(1)=7 because all odd numbers > 7 have more representations by sums of 3 odd primes than 7, which has no such representation (A294295(1)=0).
a(2)=11, because all odd numbers > 11 have at least 2 representations p+q+r, e.g. 13=3+3+7=5+5+3 whereas 11=3+3+5 and 9=3+3+3 only have A294295(2)=1 representation.
		

References

  • For references and links see A007963.

Crossrefs

Formula

A007963(k) > A007963((a(n)-1)/2) for all k > (a(n)-1)/2.

A294357 Smallest odd number that can be expressed in more ways by sums of 3 odd primes p+q+r with p <= q <= r than any smaller odd number.

Original entry on oeis.org

9, 13, 17, 21, 25, 27, 29, 33, 37, 39, 45, 47, 51, 53, 63, 65, 71, 77, 83, 89, 95, 101, 107, 113, 119, 125, 131, 137, 143, 149, 161, 167, 173, 185, 191, 197, 203, 209, 215, 221, 227, 233, 239, 245, 247, 251, 257, 269, 277, 281, 287, 293, 299
Offset: 1

Views

Author

Hugo Pfoertner, Oct 29 2017

Keywords

Comments

Position of n-th record in A007963 converted to actual odd number for which the record is achieved.
The corresponding records of numbers of representations are provided in A294358.
Empirically mod(a(n),6) = 5 for all a(n) > 63 and mod(a(n),30) != 5 for all a(n) > 425.

Crossrefs

Formula

a(1)=9 because 9 = 3+3+3 is the smallest number that can be represented as sum of 3 odd primes.
a(13)=51 because A007963(25) = A007963((51-1)/2) = 14 is the 13th record in A007963.

A294358 Number of ways to write A294357(n) as a sum of 3 odd primes p+q+r, with p>=q>=r.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 21, 27, 28, 33, 35, 37, 42, 46, 50, 53, 56, 62, 64, 68, 76, 77, 89, 91, 95, 101, 106, 110, 115, 122, 124, 129, 132, 133, 134, 142, 154, 157, 160, 170, 175, 186, 187, 190, 197, 209, 210, 212
Offset: 1

Views

Author

Hugo Pfoertner, Oct 29 2017

Keywords

Comments

Records in A007963.

Crossrefs

Formula

a(n) = A007963((A294357(n)-1)/2).

A288574 Total number of distinct primes in all representations of 2*n+1 as a sum of 3 odd primes.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 4, 4, 6, 7, 9, 10, 12, 15, 17, 16, 19, 19, 23, 25, 26, 26, 28, 33, 32, 35, 43, 39, 41, 45, 45, 48, 54, 55, 52, 60, 59, 56, 75, 67, 67, 81, 74, 76, 92, 83, 85, 100, 96, 81, 106, 103, 91, 121, 108, 98, 131, 120, 116, 143, 133, 129, 151, 144, 124, 163
Offset: 0

Views

Author

Keywords

Comments

That is, a representation 2n+1 = p+p+p counts as 1, as p+p+q counts as 2, and p+q+r counts as 3. If each representation is counted once, we simply get A007963.

Crossrefs

A288573 appears to be an erroneous version of this sequence.

Programs

  • Maple
    A288574 := proc(n)
        local a, i, j, k, p, q, r,pqr ;
        a := 0 ;
        for i from 2 do
            p := ithprime(i) ;
            for j from i do
                q := ithprime(j) ;
                for k from j do
                    r := ithprime(k) ;
                    if p+q+r = 2*n+1 then
                        pqr := {p,q,r} ;
                        a := a+nops(pqr) ;
                    elif p+q+r > 2*n+1 then
                        break;
                    end if;
                end do:
                if p+2*q > 2*n+1 then
                    break;
                end if;
            end do:
            if 3*p > 2*n+1 then
                break;
            end if;
        end do:
        return a;
    end proc:
    seq(A288574(n),n=0..80) ; # R. J. Mathar, Jun 29 2017
  • Mathematica
    Table[x = 2 n + 1; max = PrimePi[x]; Total[Length /@ Tally /@ DeleteDuplicates[Sort /@ Select[Tuples[Range[2, max], 3], Prime[#[[1]]] + Prime[#[[2]]] + Prime[#[[3]]] == x &]]], {n, 0, 100}] (* Robert Price, Apr 22 2025 *)
  • PARI
    a(n)={my(p,q,r,cnt);n=2*n+1;
    forprime(p=3,n\3,forprime(q=p,(n-p)\2,
    if(isprime(r=n-p-q), cnt+=if(p===q&&p==r,1,if(p==q||q==r,2,3)))));cnt}
    \\ Franklin T. Adams-Watters, Jun 28 2017
    
  • Python
    from sympy import primerange, isprime
    def a(n):
        n=2*n + 1
        c=0
        for p in primerange(3, n//3 + 1):
            for q in primerange(p, (n - p)//2 + 1):
                r=n - p - q
                if isprime(r): c+=1 if p==q and p==r else 2 if p==q or q==r else 3
        return c
    print([a(n) for n in range(66)]) # Indranil Ghosh, Jun 29 2017

A294295 Number of ways to write A294294(n) as a sum of 3 odd primes p+q+r, with p>=q>=r.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 14, 16, 18, 20, 21, 24, 25, 27, 28, 29, 30, 34, 36, 42, 45, 46, 48, 55, 58, 60, 64, 68, 72, 81, 85, 88, 90, 93, 101, 107, 110, 119, 122, 128, 134, 142, 143, 145, 150, 161, 162, 169, 179, 181, 195, 196, 215
Offset: 1

Views

Author

Hugo Pfoertner, Oct 28 2017

Keywords

Crossrefs

Formula

a(n) = A007963((A294294(n)-1)/2).

A190353 Goldbach conjecture: number of decompositions of n into an unordered sum of two odd primes (if n even) or three odd primes (if n odd).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 1, 1, 2, 1, 1, 2, 2, 2, 2, 3, 2, 3, 2, 4, 3, 4, 3, 5, 3, 6, 2, 7, 3, 6, 2, 8, 4, 7, 4, 9, 2, 10, 3, 10, 4, 10, 3, 11, 4, 12, 5, 12, 4, 14, 3, 16, 5, 14, 3, 16, 4, 16, 6, 16, 3, 18, 5, 20, 6, 20, 2, 20, 5, 21, 6, 21, 5, 21, 5, 27, 7, 24
Offset: 1

Views

Author

Daniel Forgues, May 09 2011

Keywords

Comments

This sequence differs from A083338 because A083338 allows 2 as a prime.

Crossrefs

Formula

a(2n) = A002375(n) and a(2n+1) = A007963(n).

A112418 Primes which have a prime number of partitions into five distinct primes.

Original entry on oeis.org

53, 59, 67, 83, 113, 151, 157, 211, 239, 601, 809, 821, 881, 971, 1237, 1297, 1427, 1669, 1759, 1973, 2069, 2129, 2243, 2333, 2659, 2677, 2719, 2789, 2803, 2999, 3329, 3613, 3623, 3769, 3797, 4001, 4451
Offset: 1

Views

Author

Keywords

Comments

The corresponding numbers of partitions are 2,5,11,29,109,331,379,1091...

Examples

			53 is there because there are 2 partitions of 53 (3+7+11+13+19, 5+7+11+13+17) and 2 is prime.
		

Crossrefs

Programs

  • Maple
    part5_prime:=proc(N) s:=1; for n from 2 to N do cont:=0; for i from 1 to n-5 do for j from i+1 to n-4 do for k from j+1 to n-3 do for l from k+1 to n-2 do for m from l+1 to n-1 do if(ithprime(n)= ithprime(i)+ithprime(j)+ithprime(k)+ithprime(l)+ithprime(m) then cont:=cont+1; fi; od; od; od; od; od; if (isprime(cont)=true) then a[s]:=ithprime(n); s:=s+1; fi; od; end:
  • PARI
    has(n)=my(t,Q,R,S);forprime(p=n\5+1,n-26, Q=n-p; forprime(q=Q\4+1,min(p-1,Q-15), R=Q-q; forprime(r=R\3+1,min(q-1,R-8), S=R-r; forprime(s=S-r+1,(S-1)\2, isprime(S-s) && t++)))); isprime(t)
    select(has, primes(100)) \\ Charles R Greathouse IV, Apr 22 2015
    
  • PARI
    list(lim)=my(v=vectorsmall(precprime(lim)),u=List(),Q,R,S); forprime(p=13,#v-26, Q=#v-p; forprime(q=11,min(p-1,Q-15), R=Q-q; forprime(r=7,min(q-1,R-8), S=R-r; forprime(s=5,min(S-2,r-1), forprime(t=3,min(S-s,s-1), v[p+q+r+s+t]++))))); forprime(p=2,lim, if(isprime(v[p]), listput(u,p))); Set(u) \\ Charles R Greathouse IV, Apr 22 2015

Extensions

Edited by Don Reble, Jan 26 2006
a(31)-a(37) from Charles R Greathouse IV, Apr 22 2015
Showing 1-10 of 11 results. Next