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 51-60 of 109 results. Next

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 *)

A187619 Sum of the differences of the parts in each Goldbach partition of 2n, A187129(n) - A185297(n).

Original entry on oeis.org

0, 0, 2, 4, 2, 8, 16, 12, 20, 28, 26, 32, 24, 28, 32, 64, 60, 24, 58, 72, 86, 88, 122, 116, 78, 128, 98, 108, 144, 80, 202, 204, 60, 184, 216, 188, 226, 292, 168, 196, 316, 260, 168, 376, 236, 216, 334, 120, 304, 408, 278, 340, 472, 392, 454, 604, 452, 372, 724, 216, 330, 580, 162, 472, 542, 392, 366, 540, 470, 592, 838, 384, 390, 828
Offset: 2

Views

Author

N. J. A. Sloane, Mar 12 2011

Keywords

Crossrefs

Cf. A226237 (Sum of sums), A045917.

Programs

  • Maple
    with(numtheory):
    A279725:=n->2*add( (pi(i)-pi(i-1)) * (pi(2*n-i)-pi(2*n-i-1)) * (n-i), i=3..n):
    seq(A279725(n), n=1..100); # Wesley Ivan Hurt, Dec 17 2016
  • Mathematica
    Table[2 Sum[(n - i) Floor[2/PrimeOmega[2 n*i - i^2]], {i, 2, n}], {n, 2, 100}] (* Wesley Ivan Hurt, Dec 20 2013 *)

Formula

a(n) = 2 * Sum_{i=2..n} (n-i) * A064911(2*n*i-i^2). - Wesley Ivan Hurt, Dec 20 2013
a(n) = 2 * Sum_{i=3..n} c(i) * c(2*n-i) * (n-i), where c = A010051. - Wesley Ivan Hurt, Dec 17 2016

Extensions

More descriptive name by Wesley Ivan Hurt, Dec 20 2013

A214154 Number of ways to represent 2n as the sum of two distinct k-almost primes: #{mA001222(m)=A001222(2n-m)}.

Original entry on oeis.org

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

Views

Author

Juri-Stepan Gerasimov, Jul 05 2012

Keywords

Comments

Number of ways to represent 2n as the sum of two distinct numbers with the same number of prime divisors (counted with multiplicity).

Examples

			a(10)=4 because 2*10 = 3(1-almost prime) + 17(1-almost prime) = 6(2-almost prime) + 14(2-almost prime) = 7(1-almost prime) + 13(1-almost prime) = 8(3-almost prime) + 12(3-almost prime).
		

Crossrefs

Programs

  • Maple
    iskalmos := proc(n,k)
            numtheory[bigomega](n) = k ;
    end proc:
    sumDistKalmost := proc(n,k)
            a := 0 ;
            for i from 0 to n/2 do
                    if iskalmos(i,k) and iskalmos(n-i,k) and i <> n-i then
                            a := a+1 ;
                    end if;
            end do:
            return a;
    end proc:
    A214154 := proc(n)
            a := 0 ;
            for k from 1 do
                    if 2^k > n then
                            break;
                    end if;
                    a := a+sumDistKalmost(2*n,k) ;
            end do:
            return a;
    end proc: # R. J. Mathar, Jul 05 2012
    A214154 := n->add(`if`(numtheory[bigomega](m)=numtheory[bigomega](2*n-m),1,0), m=2..n-1); # M. F. Hasler, Jul 21 2012
  • PARI
    A214154(n)=sum(m=2,n-1,bigomega(m)==bigomega(2*n-m)) \\ - M. F. Hasler, Jul 21 2012

A235187 Number of ordered ways to write 2*n = p + q with p, q and prime(p) + q - 1 all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 04 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 2.
(ii) Any integer n > 4 can be written as p + q with q > 0 such that p and p - 1 + prime(q) are both prime.
(iii) Each integer n > 7 can be written as p + q with q > 0 such that prime(p) + sigma(q) is prime, where sigma(q) denotes the sum of all positive divisors of q.
Clearly, part (i) is stronger than Goldbach's conjecture.

Examples

			 a(7) = 1 since 2*7 = 7 + 7 with 7 and prime(7) + 7 - 1 = 17 + 6 = 23 both prime.
a(14) = 1 since 2*14 = 11 + 17 with 11, 17 and prime(11) + 16 = 47 all prime.
a(92) = 1 since 2*92 = 47 + 137 with 47, 137 and prime(47) + 136 = 347 all prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[2n-Prime[k]]&&PrimeQ[Prime[Prime[k]]+2n-Prime[k]-1],1,0],{k,1,PrimePi[2n-1]}]
    Table[a[n],{n,1,100}]

A243485 Sum of all the products formed by multiplying the corresponding smaller and larger parts of the Goldbach partitions of n.

Original entry on oeis.org

0, 0, 0, 4, 6, 9, 10, 15, 14, 46, 0, 35, 22, 82, 26, 94, 0, 142, 34, 142, 38, 263, 0, 357, 46, 371, 0, 302, 0, 591, 58, 334, 62, 780, 0, 980, 0, 578, 74, 821, 0, 1340, 82, 785, 86, 1356, 0, 1987, 94, 1512, 0, 1353, 0, 2677, 106, 1421, 0, 2320, 0, 4242, 118
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 05 2014

Keywords

Comments

a(n) is even for odd n.
If Goldbach's conjecture is true, a(n) > 0 for all even n > 2.
Sum of the areas of the distinct rectangles with prime length and width such that L + W = n, W <= L. For example, a(16) = 94; the two rectangles are 3 X 13 and 5 X 11, and the sum of their areas is 3*13 + 5*11 = 94. - Wesley Ivan Hurt, Oct 28 2017

Crossrefs

Programs

  • Maple
    with(numtheory): A243485:=n->add(i*(n-i)*(pi(i)-pi(i-1))*(pi(n-i)-pi(n-i-1)), i=1..floor(n/2)): seq(A243485(n), n=1..100); # Wesley Ivan Hurt, Oct 29 2017
  • Mathematica
    Table[Sum[i*(n - i)*Floor[2/PrimeOmega[i (n - i)]], {i, 2, n/2}], {n,
      50}]

Formula

a(n) = Sum_{i=2..n/2} i*(n-i) * A064911(i*(n-i)).
a(n) = Sum_{i=1..floor(n/2)} i * (n-i) * A010051(i) * A010051(n-i). - Wesley Ivan Hurt, Oct 29 2017

A276034 a(n) is the number of decompositions of 2n into an unordered sum of two primes in A274987.

Original entry on oeis.org

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

Views

Author

Lei Zhou, Nov 15 2016

Keywords

Comments

The two primes are allowed to be the same.
It is conjectured that the primes in A274987 (a subset of all primes) are sufficient to decomposite even numbers into two primes in A274987 when n > 958.
This sequence provides a very tight alternative of the Goldbach conjecture for all positive integers, in which indices of zero terms form a complete sequence {1, 2, 16, 26, 64, 97, 107, 122, 146, 167, 194, 391, 451, 496, 707, 856, 958}.
There is no more zero terms of a(n) tested up to n = 100000.

Examples

			A274987 = {3, 5, 7, 11, 13, 17, 23, 31, 37, 53, 59, 61, 73, 79, 83, 89, 101, 103, 109, ...}.
For n=3, 2n=6 = 3+3, one case of decomposition, so a(3)=1;
for n=4, 2n=8 = 3+5, one case of decomposition, so a(4)=1;
...
for n=17, 2n=34 = 3+31 = 11+23 = 17+17, three cases of decompositions, so a(17)=3.
		

Crossrefs

Programs

  • Mathematica
    p = 3; sp = {p}; a = Table[m = 2*n; l = Length[sp]; While[sp[[l]] < m, While[p = NextPrime[p]; cp = 2*3^(Floor[Log[3, 2*p - 1]]) - p; ! PrimeQ[cp]]; AppendTo[sp, p]; l++]; ct = 0; Do[If[(2*sp[[i]] <= m) && (MemberQ[sp, m - sp[[i]]]), ct++], {i, 1, l}]; ct, {n, 1, 87}]

A276520 a(n) is the number of decompositions of n into unordered form p + c*q, where p, q are terms of A274987, c=1 for even n-s and c=2 for odd n-s.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 1, 1, 2, 1, 1, 2, 2, 1, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 3, 2, 2, 0, 3, 3, 1, 2, 4, 1, 3, 2, 2, 2, 2, 2, 3, 1, 2, 2, 2, 1, 3, 0, 2, 2, 0, 1, 3, 1, 3, 2, 0, 2, 3, 3, 3, 3, 3, 2, 3, 2, 2, 2, 2, 2, 3, 3, 2, 2, 4, 1, 2, 2, 3, 4, 4, 3, 4
Offset: 1

Views

Author

Lei Zhou, Nov 11 2016

Keywords

Comments

p=q is allowed.
It is conjectured that the primes p, q in A274987 (a subset of all primes) are sufficient to decomposite all numbers into p and c*q (c=1 when n is even, 2 when c is odd) when n > 2551.
This sequence provides a very tight alternative of the Goldbach conjecture for all positive integers, in which indices of zero terms form a complete sequence {1, 2, 3, 4, 5, 7, 32, 52, 55, 61, 128, 194, 214, 244, 292, 334, 388, 782, 902, 992, 1414, 1571, 1712, 1916, 2551}.
There are no more zero terms of a(n) up to n = 100000.

Examples

			A274987 = {3, 5, 7, 11, 13, 17, 23, 31, 37, 53, 59, 61, 73, 79, 83, 89, 101, 103, 109, ...}
For n=6, 6 = 3+3, one case of decomposition, so a(6)=1;
For n=7, 7 < 3+2*3=9, no eligible case could be found, so a(7)=0;
...
For n=17, 17 = 3+2*7 = 7+2*5 = 11+2*3, three cases of decompositions, so a(17)=3.
		

Crossrefs

Programs

  • Mathematica
    p = 3; sp = {p}; Table[l = Length[sp]; While[sp[[l]] < n, While[p = NextPrime[p]; cp = 2*3^(Floor[Log[3, 2*p - 1]]) - p; ! PrimeQ[cp]]; AppendTo[sp, p]; l++]; c = 2 - Mod[n + 1, 2]; ct = 0; Do[If[MemberQ[sp, n - c*sp[[i]]], If[c == 1, If[(2*sp[[i]]) <= n, ct++], ct++]], {i, 1, l}]; ct, {n, 1, 87}]

A276825 Number of ways to write n as x^3 + P_2, where x and P_2 are positive integers with P_2 a product of at most two primes.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 2, 3, 2, 2, 2, 3, 1, 2, 2, 2, 2, 2, 2, 3, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 1, 3, 4, 2, 3, 2, 4, 1, 1, 3, 3, 3, 1, 2, 3, 2, 2
Offset: 1

Views

Author

Zhi-Wei Sun, Sep 19 2016

Keywords

Comments

Conjecture: Any integer n > 1 can be written as x^3 + P_2, where x and P_2 are positive integers with P_2 a product of at most two primes.
We have verified this for n up to 10^8, and we guess that a(n) > 1 for all n > 3275.
It seems that any integer n > 1 also can be written as x^2 + P_2, where x and P_2 are positive integers with P_2 a product of at most two primes. Goldbach's conjecture implies that for each integer n > 1 we can write 2*n as p + q with p <= n and q >= n both prime, and hence n^2 - (n-p)^2 = p*(2n-p) = p*q is a product of two primes. In 1923 Hardy and Littlewood conjectured that if an integer n is large enough and not a square then it can be written as the sum of a prime and a square.

Examples

			a(7) = 1 since 7 = 1^3 + 2*3 with 2 and 3 both prime.
a(17) = 1 since 17 = 2^3 + 3^2 with 3 prime.
a(28) = 1 since 28 = 3^3 + 1.
a(76) = 1 since 76 = 3^3 + 7^2 with 7 prime.
a(995) = 1 since 995 = 6^3 + 19*41 with 19 and 41 both prime.
a(1072) = 1 since 1072 = 5^3 + 947 with 947 prime.
a(1252) = 1 since 1252 = 9^3 + 523 with 523 prime.
a(1574) = 1 since 1574 = 7^3 + 1231 with 1231 prime.
a(1637) = 1 since 1637 = 7^3 + 2*647 with 2 and 647 both prime.
a(2458) = 1 since 2458 = 5^3 + 2333 with 2333 prime.
a(2647) = 1 since 2647 = 12^3 + 919 with 919 prime.
a(2752) = 1 since 2752 = 5^3 + 37*71 with 37 and 71 both prime.
a(2764) = 1 since 2764 = 11^3 + 1433 with 1433 prime.
a(3275) = 1 since 3275 = 1^3 + 2*1637 with 2 and 1637 both prime.
		

Crossrefs

Programs

  • Mathematica
    P2[n_]:=P2[n]=PrimeQ[Sqrt[n]]||(SquareFreeQ[n]&&Length[FactorInteger[n]]<=2)
    Do[r=0;Do[If[P2[n-k^3],r=r+1],{k,1,(n-1)^(1/3)}];Print[n," ",r];Continue,{n,1,80}]

A337568 Product of all the parts in the Goldbach partitions (p,q) of 2n such that p + q = 2n, p <= q, and p,q prime (or 1 if no Goldbach partition of 2n exists).

Original entry on oeis.org

1, 4, 9, 15, 525, 35, 1617, 2145, 5005, 4641, 586245, 1616615, 1550913, 21505, 7436429, 21489, 985982745, 3038795305, 78337, 13844919, 10393190665, 12838371, 6896776665, 7292509103495, 12023917269, 70691995, 37198413949697, 62483343, 80309179885, 98755025688454681, 138969249
Offset: 1

Views

Author

Wesley Ivan Hurt, Sep 29 2020

Keywords

Examples

			a(9) = 5005; 2*9 = 18 has Goldbach partitions (13,5) and (11,7). The product of all the parts is 13 * 5 * 11 * 7 = 5005.
		

Crossrefs

Cf. A010051, A045917, A238711, A362640 (product of the larger primes q), A362641 (product of the smaller primes p).

Programs

  • Mathematica
    Table[Product[(i*(2 n - i))^((PrimePi[i] - PrimePi[i - 1]) (PrimePi[2 n - i] - PrimePi[2 n - i - 1])), {i, n}], {n, 40}]

Formula

a(n) = Product_{i=1..n} (i*(2*n-i))^(c(i)*c(2*n-i)), where c is the prime characteristic (A010051).
a(n) = A362640(n) * A362641(n).
Previous Showing 51-60 of 109 results. Next