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 31-40 of 58 results. Next

A083338 Number of partitions of odd numbers into three primes and of even numbers into two primes.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Apr 24 2003

Keywords

Comments

a(n) > 0 for all n iff Goldbach's conjectures hold.

Crossrefs

Programs

  • Mathematica
    f[n_] := Length@ IntegerPartitions[n, If[ OddQ@ n, {3}, {2}], Prime@ Range@ PrimePi@ n]; Array[f, 92] (* Robert G. Wilson v, Nov 28 2012 *)

Formula

a(n) = if n is even then A045917(n/2) else A054860((n-1)/2).
For even n: a(n) = A061358(n); for odd n: a(n) = A068307(n). - Antti Karttunen, Sep 14 2017

A137791 Number of ways to write n as sum of two positive numbers having no prime gaps in their factorization.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Feb 11 2008

Keywords

Examples

			a(20) = #{1+19,2+18,3+17,4+16,5+15,7+13,8+12,9+11} = 8;
a(21) = #{2+19,3+18,4+17,5+16,6+15,8+13,9+12} = 7;
a(22) = #{3+19,4+18,5+17,6+16,7+15,9+13,11+11} = 7;
a(23) = #{4+19,5+18,6+17,7+16,8+15,11+12} = 6;
a(24) = #{1+23,5+19,6+18,7+17,8+16,9+15,11+13,12+12} = 8.
		

Crossrefs

A180007 Number of Goldbach partitions of 6^n.

Original entry on oeis.org

1, 4, 13, 49, 161, 656, 2751, 12505, 58482, 280348, 1374563, 6864809
Offset: 1

Views

Author

Jonathan Vos Post, Aug 06 2010

Keywords

Comments

Number of ways of writing 6^n as the sum of two odd primes, when the order does not matter. Number of ways writing 6^n as unordered sums of 2 primes. This is to 6 as A006307 is to 2 and as A065577 is to 10. This is the 6th row of the array A[k,n] = Number of ways writing k^n as unordered sums of 2 primes.
A061358(4^n) starts 1, 2, 5, 8, 22, 53, 151, 435, for n=1,2,... (bisection of A006307). A061358(8^n) starts 1, 5, 11, 53, 244, 1314, 7471, (tri-section of A006307). A061358(10^n) = A065577(n). A061358(12^n) = 1, 11, 53, 348, 2523, 20564... A061358(14^n) = 2, 9, 50, 330, 2924, 27225,... - R. J. Mathar, Aug 07 2010

Examples

			a(1) = 1 because 6^1 = 6 = 3+3.
a(2) = 4 because 6^2 = 36 = 5+31 = 7+29 = 13+23 = 17+19.
a(3) = 13 because 6^3 = 216 = 5+211 = 17+199 = 19+197 = 23+193 = 37+179 = 43+173 = 53+163 = 59+157 = 67+149 = 79+137 = 89+127 = 103+113 = 107+109.
		

Crossrefs

Programs

  • Maple
    A061358 := proc(n) local a,p ; a := 0 ; p := nextprime(floor((n-1)/2)) ; while p <= n do if isprime(n-p) then a := a+1 ; end if; p := nextprime(p) ; end do ; return a; end proc:
    A180007 := proc(n) A061358(6^n) ; end proc:
    for n from 1 do printf("%d,\n",A180007(n)) ; end do:
    # R. J. Mathar, Aug 07 2010
  • Mathematica
    Table[Count[Sort@ IntegerPartitions[6^n, {2}], {u_, v_} /; And[PrimeQ@ u, u != 2, PrimeQ@ v]], {n, 6}] (* Michael De Vlieger, Jun 02 2015 *)
  • PARI
    a(n)=my(t=6^n,s); forprime(p=2,t\2, if(isprime(t-p), s++)); s \\ Charles R Greathouse IV, Jun 02 2015

Formula

a(n) = A061358(6^n) = A061358(A000400(n)).

Extensions

a(5) corrected, 4 terms added by R. J. Mathar, Aug 07 2010
a(10)-a(12) from Manfred Scheucher, Jun 01 2015

A307726 Number of partitions of n into 2 prime powers (not including 1).

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Apr 24 2019

Keywords

Examples

			a(10) = 3 because we have [8, 2], [7, 3] and [5, 5].
		

Crossrefs

Programs

  • Maple
    # note that this requires A246655 to be pre-computed
    f:= proc(n, k, pmax) option remember;
      local t, p, j;
      if n = 0 then return `if`(k=0, 1, 0) fi;
      if k = 0 then return 0 fi;
      if n > k*pmax then return 0 fi;
      t:= 0:
      for p in A246655 do
        if p > pmax then return t fi;
        t:= t + add(procname(n-j*p, k-j, min(p-1, n-j*p)), j=1..min(k, floor(n/p)))
      od;
      t
    end proc:
    map(f, [$0..100]); # Robert Israel, Apr 29 2019
  • Mathematica
    Array[Count[IntegerPartitions[#, {2}], _?(AllTrue[#, PrimePowerQ] &)] &, 101, 0]

Formula

a(n) = [x^n y^2] Product_{k>=1} 1/(1 - y*x^A246655(k)).

A347552 Number of partitions of n into at most 2 prime parts.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Sep 08 2021

Keywords

Crossrefs

Formula

a(n) = Sum_{k=1..2} A117278(n,k) for n >= 2. - Alois P. Heinz, Sep 08 2021

A113631 Number of distinct representations of (2n)^2 as the sum of two primes.

Original entry on oeis.org

0, 1, 2, 4, 5, 6, 11, 9, 8, 20, 14, 14, 26, 17, 18, 48, 22, 22, 49, 28, 36, 69, 33, 37, 68, 47, 43, 83, 49, 47, 125, 50, 53, 118, 56, 94, 126, 63, 63, 153, 98, 71, 186, 79, 94, 230, 89, 91, 197, 127, 127, 215, 112, 105, 220, 172, 147
Offset: 0

Views

Author

Jonathan Vos Post, Mar 31 2006

Keywords

Comments

From Halberstam and Richert: A045917(2n)<(8+0(1))*c(n)*n/log(n)^2 where c(n)=prod(p>2,(1-1/(p-1)^2))*prod(p|n,p>2,(p-1)/(p-2)). Hence a(n) = A045917(2n) < (8+0(1))*c(2n)*2n/log(2n)^2 where c(k)=prod(p>2,(1-1/(p-1)^2))*prod(p|k,p>2,(p-1)/(p-2)). See also: A045917 From Goldbach problem: number of decompositions of 2n into unordered sums of two primes. A016742 Even squares: (2n)^2.
a(n)=A061358(4n^2). - Emeric Deutsch, Apr 03 2006

Examples

			a(1) = 1 because (2*1)^2 = 4 = 2 + 2 uniquely.
a(2) = 2 because (2*2)^2 = 16 = 3 + 13 = 5 + 11.
a(3) = 4 because (2*3)^2 = 36 = 5 + 31 = 7 + 29 = 13 + 23 = 17 + 19.
a(4) = 5 because (2*4)^2 = 64 = 3 + 61 = 5 + 59 = 11 + 53 = 17 + 47 = 23 + 41.
a(5) = 6 because (2*5)^2 = 100 = 3 + 97 = 11 + 89 = 17 + 83 = 29 + 71 = 41 + 59 = 47 + 53.
a(6) = 11 because (2*6)^2 = 144 = 5 + 139 = 7 + 137 = 13 + 131 = 17 + 127 = 31 + 113 = 37 + 107 = 41 + 103 = 43 + 101 = 47 + 97 = 61 + 83 = 71 + 73.
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 2nd ed., 1994, p. 99.
  • H. Halberstam and H. E. Richert, 1974, "Sieve methods", Academic press, London, New York, San Francisco.

Crossrefs

Programs

  • Magma
    [#RestrictedPartitions(4*n^2,2,{p:p in PrimesUpTo(20000)}):n in [0..56] ] // Marius A. Burtea, Jan 19 2019
  • Maple
    g:=sum(sum(x^(ithprime(i)+ithprime(j)),i=1..j),j=1..1500): gser:=series(g,x=0,12560): 0,seq(coeff(gser,x^(4*n^2)),n=1..56); # Emeric Deutsch, Apr 03 2006

Formula

a(n) = A045917(2n). a(n) = #{p(i) + p(j) = A016742(n) for p(k) = A000040(k) and i >= j}. a(n) = #{p(i) + p(j) = (2*n)^2 for p(k) = A000040(k) and i >= j}.

Extensions

Corrected and extended by Emeric Deutsch, Apr 03 2006

A156642 Number of decompositions of 4n+2 into unordered sums of two primes of the form 4k+3.

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, Feb 12 2009

Keywords

Comments

Conjecture. For n >= 1, a(n) > 0. This conjecture does not follow from the validity of the Goldbach binary conjecture because numbers of the form 4n+2, generally speaking, also have decompositions into sums of two primes of the form 4k+1.

Examples

			From _Lei Zhou_, Mar 19 2013: (Start)
n=1: 4n+2=6, 6=3+3; this is the only case that matches the definition, so a(1)=1;
n=3: 4n+2=14, 14=3+11=7+7; two instances found, so a(3)=2. (End)
		

Crossrefs

Programs

  • Mathematica
    Table[m = 4*n + 2; p1 = m + 1; ct = 0; While[p1 = p1 - 4; p2 = m - p1; p1 >= p2, If[PrimeQ[p1] && PrimeQ[p2], ct++]]; ct, {n, 1, 100}] (* Lei Zhou, Mar 19 2013 *)

A002126 Number of solutions to n=p+q where p and q are primes or zero.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Arises in studying the Goldbach conjecture.

References

  • P. A. MacMahon, Properties of prime numbers deduced from the calculus of symmetric functions, Proc. London Math. Soc., 23 (1923), 290-316. [Coll. Papers, Vol. II, pp. 354-382] [The sequence N_{n,2}]
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • PARI
    (a(n) = sum(k=0, n, zp(k)*zp(n-k))); {zp(n) = if( n==0, 1, isprime(n))}; /* Michael Somos, Jul 26 1999 */

Formula

G.f.: (1 + Sum_i x^prime(i))^2. [Corrected by T. D. Noe, Dec 05 2006]

Extensions

a(54) corrected by Paul Zimmermann, Mar 15 1996
Better description from Michael Somos, Jul 26 1999

A062302 Number of ways writing n-th prime as a sum of a prime and a nonprime.

Original entry on oeis.org

0, 1, 0, 1, 4, 3, 6, 5, 8, 9, 8, 11, 12, 11, 14, 15, 16, 15, 18, 19, 18, 21, 22, 23, 24, 25, 24, 27, 26, 29, 30, 31, 32, 31, 34, 33, 36, 37, 38, 39, 40, 39, 42, 41, 44, 43, 46, 47, 48, 47, 50, 51, 50, 53, 54, 55, 56, 55, 58, 59, 58, 61, 62, 63, 62, 65, 66, 67, 68, 67, 70, 71, 72
Offset: 1

Views

Author

Labos Elemer, Jul 05 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Table[c = 0; Do[i = Prime[k]; If[i + j == Prime[n] && ! PrimeQ[j], c = c + 1], {k, n - 1}, {j, Prime[n] - 1}]; c, {n, 73}] (* Jayanta Basu, Apr 22 2013 *)
    nn = 100; mx = Prime[nn]; ps = Prime[Range[nn]]; notPs = Complement[Range[mx], ps]; t2 = Table[0, {Range[mx]}]; Do[s = i + j; If[s <= mx, t2[[s]]++], {i, ps}, {j, notPs}];  t2[[ps]] (* T. D. Noe, Apr 23 2013 *)

Formula

a(n) = A062602(A000040(n)) = number of [nonprime+prime] partitions of prime(n)

A062305 Number of ways writing 2^n as a sum of a prime and a nonprime.

Original entry on oeis.org

0, 0, 1, 2, 2, 7, 8, 25, 38, 75, 128, 259, 458, 876, 1598, 3024, 5672, 10753, 20372, 38656, 73547, 140669, 268537, 514307, 986379, 1896755, 3650109, 7036061, 13580371, 26241380, 50765806, 98317489, 190597373, 369832498, 718266991, 1396138085, 2715823187, 5287080080
Offset: 0

Views

Author

Labos Elemer, Jul 05 2001

Keywords

Examples

			For n = 5: 2^5 = 32 = 31+1 = 2+30 = 5+27 = 7+25 = 11+21 = 17+15 = 23+9 so a(5) = 7.
		

Crossrefs

Programs

  • PARI
    a(n) = {my(c = 0, m = 1 << n); forprime(p = 2, m-1, if(!isprime(m - p), c++)); c;} \\ Amiram Eldar, Jul 17 2024

Formula

a(n) = A062602(2^n) = number of prime+nonprime partitions of 2^n.
a(n) = 2^(n-1) - A006307(n) - A062306(n) for n >= 1. - Amiram Eldar, Jul 17 2024

Extensions

More terms from Dean Hickerson, Jul 23 2001
a(28)-a(32) from Sean A. Irvine, Mar 25 2023
a(33)-a(37) from Amiram Eldar, Jul 17 2024
Previous Showing 31-40 of 58 results. Next