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 41-50 of 58 results. Next

A062306 Number of ways writing 2^n as a sum of two nonprime numbers.

Original entry on oeis.org

1, 0, 1, 4, 7, 19, 36, 82, 170, 362, 740, 1537, 3144, 6443, 13116, 26661, 54034, 109386, 221121, 446502, 900436, 1814910, 3655069, 7356483, 14796994, 29750473, 59789057, 120112121, 241218391, 484287995, 972034297, 1950544851, 3913243144, 7849331541, 15741697002
Offset: 1

Views

Author

Labos Elemer, Jul 05 2001

Keywords

Examples

			For n = 5: 2^5 = 32 = 4+28 = 6+26 = 8+24 = 10+22 = 12+20 = 14+18 = 16+16, so a(5) = 7.
		

Crossrefs

Formula

a(n) = A062610(2^n) = number of nonprime+nonprime partitions of 2^n.
a(n) = 2^(n-1) - A006307(n) - A062305(n). - 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(35) from Amiram Eldar, Jul 17 2024

A079055 Numbers of prime pairs (p,q), p<=q, such that (p+q) divides n.

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Feb 02 2003

Keywords

Crossrefs

Cf. A061358.

Programs

  • Maple
    N:= 100: # for a(1)..a(N)
    P:= select(isprime,[2,seq(i,i=3..N,2)]): nP:= nops(P):
    V:= Vector(N):
    for i from 1 to nP do
      for j from i to nP do
        v:= P[i]+P[j];
        J:= [seq(t,t=v..N,v)];
        V[J]:= V[J] +~ 1
    od od:
    convert(V,list); # Robert Israel, Oct 17 2023
  • PARI
    a(n)=sum(i=1,n,sum(j=1,i,if(n%(prime(i)+prime(j)),0,1)))

Formula

a(n) = Sum_{d|n} A061358(d). - Robert Israel, Oct 17 2023

A295629 Number of partitions of n into two parts such that not both are prime.

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Nov 24 2017

Keywords

Examples

			a(8) = 3; the partitions of 8 into two parts are (7,1), (6,2), (5,3) and (4,4). Since the parts in (7,1), (6,2) and (4,4) are not both prime, a(8) = 3.
a(11) = 5; the partitions of 11 into two parts are (10,1), (9,2), (8,3), (7,4) and (6,5). All of these have parts that are not both prime, so a(11) = 5.
		

Crossrefs

Programs

  • Maple
    N:= 1000: # to get a(1)..a(N)
    P:= select(isprime, [2,seq(i,i=3..N,2)]):
    A:= Vector(N,t -> floor(t/2)):
    for i from 1 to nops(P) do
      for j from i to nops(P) do
        m:= P[i]+P[j];
        if m > N then break fi;
        A[m]:= A[m]-1;
    od od:
    convert(A,list); # Robert Israel, Dec 07 2017
  • Mathematica
    Table[Sum[1 - (PrimePi[i] - PrimePi[i - 1]) (PrimePi[n - i] - PrimePi[n - i - 1]), {i, Floor[n/2]}], {n, 80}]
    Table[Total[If[AllTrue[#,PrimeQ],0,1]&/@IntegerPartitions[n,{2}]],{n,70}] (* Harvey P. Dale, Jan 17 2024 *)
  • PARI
    a(n) = sum(i=1, floor(n/2), 1 - isprime(i)*isprime(n-i)) \\ Iain Fox, Dec 06 2017

Formula

a(n) = Sum_{i=1..floor(n/2)} 1 - c(i) * c(n-i), where c = A010051.
a(n) = A004526(n) - A061358(n).

A062303 Number of ways writing the n-th prime as a sum of two nonprimes.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 2, 3, 3, 5, 6, 7, 8, 9, 9, 11, 13, 14, 15, 16, 17, 18, 19, 21, 24, 25, 26, 26, 27, 27, 33, 34, 36, 37, 40, 41, 42, 44, 45, 47, 49, 50, 53, 54, 54, 55, 59, 64, 65, 66, 66, 68, 69, 72, 74, 76, 78, 79, 80, 81, 82, 85, 91, 92, 93, 93, 99, 101, 105, 106, 106, 108
Offset: 1

Views

Author

Labos Elemer, Jul 05 2001

Keywords

Examples

			n=10,p(10)=29 has 14 partitions of form a+b=29; 1+28=4+25=8+21=9+20=14+15 are the 5 relevant partitions, so a(10)=5.
		

Crossrefs

Programs

  • Mathematica
    Table[c = 0; Do[If[i + j == Prime[n] && ! PrimeQ[i] && ! PrimeQ[j], c = c + 1], {i, Prime[n] - 1}, {j, i}]; c, {n, 72}] (* Jayanta Basu, Apr 22 2013 *)
    cnpQ[{a_,b_}]:=(!PrimeQ[a]&&CompositeQ[b])||(!PrimeQ[b]&&CompositeQ[a]); Join[{1},Table[Length[Select[IntegerPartitions[Prime[n],{2}],cnpQ]],{n,2,80}]] (* Harvey P. Dale, Sep 30 2018 *)

Formula

A062610(A000040(n)) = number of [nonprime+composite] partitions of p(n).

Extensions

Offset and name corrected by Sean A. Irvine, Mar 25 2023

A180041 Number of Goldbach partitions of (2n)^n.

Original entry on oeis.org

0, 2, 13, 53, 810, 20564, 274904, 6341424, 419586990
Offset: 1

Views

Author

Jonathan Vos Post, Aug 07 2010

Keywords

Comments

This is the main diagonal of the array mentioned in A180007, only considering even rows (as odd numbers cannot be the sums of two odd primes), namely A(2n, n) = number of ways of writing (2n)^n as the sum of two odd primes, when the order does not matter.

Examples

			a(1) = 0 because 2*1 = 2 is too small to be the sum of two primes.
a(2) = 2 because 4^2 = 16 = 3+13 = 5+11.
a(3) = 13 because 6^3 = 216 and A180007(3) = Number of Goldbach partitions of 6^3 = 13.
a(4) = 53 because 8^4 = 2^12 and A006307(12) = Number of ways writing 2^12 as unordered sums of 2 primes.
		

Crossrefs

Programs

  • Maple
    A180041 := proc(n) local a,m,p: if(n=1)then return 0:fi: a:=0: m:=(2*n)^n: p:=prevprime(ceil((m-1)/2)): while p > 2 do if isprime(m-p) then a:=a+1: fi: p := prevprime(p): od: return a: end: seq(A180041(n),n=1..5); # Nathaniel Johnston, May 08 2011
  • Mathematica
    f[n_] := Block[{c = 0, p = 3, m = (2 n)^n}, lmt = Floor[m/2] + 1; While[p < lmt, If[ PrimeQ[m - p], c++ ]; p = NextPrime@p]; c]; Do[ Print[{n, f@n // Timing}], {n, 8}] (* Robert G. Wilson v, Aug 10 2010 *)

Formula

a(n) = A061358((2*n)^n) = A061358(A062971(n)).

Extensions

a(6)-a(8) from Robert G. Wilson v, Aug 10 2010
a(9) from Giovanni Resta, Apr 15 2019

A195295 Number of Goldbach partitions of 4^n.

Original entry on oeis.org

0, 1, 2, 5, 8, 22, 53, 151, 435, 1314, 4239, 13705, 45746, 153850, 525236, 1817111, 6341424, 22336060, 79287664, 283277225, 1018369893
Offset: 0

Views

Author

Kausthub Gudipati, Sep 16 2011

Keywords

Comments

Bisection of A006307.

Crossrefs

A269801 Total sum of the divisors of the primes p,q such that n=p+q and p>=q.

Original entry on oeis.org

0, 0, 0, 0, 6, 7, 8, 9, 10, 11, 24, 0, 14, 15, 32, 17, 36, 0, 40, 21, 44, 23, 72, 0, 78, 27, 84, 0, 60, 0, 96, 33, 68, 35, 144, 0, 152, 0, 80, 41, 126, 0, 176, 45, 138, 47, 192, 0, 250, 51, 208, 0, 162, 0, 280, 57, 174, 0, 240, 0, 372, 63, 192, 65, 330, 0
Offset: 0

Views

Author

Wesley Ivan Hurt, Mar 05 2016

Keywords

Examples

			a(5) = 7; Since 5 can be expressed in one way as the sum of the two primes 2 and 3, we add the sum of their divisors separately: sigma(2) + sigma(3) = 3 + 4 = 7.
a(10) = 24; Since 10 can be expressed in two ways as the sum of two primes, we add the sum of the divisors of each prime p and q: 10 = 3+7 = 5+5, so sigma(3) + sigma(7) + sigma(5) + sigma(5) = 4 + 8 + 6 + 6 = 24.
		

Crossrefs

Cf. A000203 (sigma), A010051, A014092, A061358.

Programs

  • Maple
    with(numtheory): A269801:=n->(n+2)*sum((pi(i)-pi(i-1))*(pi(n-i)-pi(n-i-1)), i=2..floor(n/2)): seq(A269801(n), n=0..100);
  • Mathematica
    Table[(n+2) Sum[(PrimePi[i] - PrimePi[i - 1]) (PrimePi[n - i] - PrimePi[n - i - 1]), {i, 2, Floor[n/2]}], {n, 0, 80}]
  • PARI
    a(n) = sum(i=0, n\2, if (isprime(i) && isprime(n-i), sigma(i)+sigma(n-i))); \\ Michel Marcus, Mar 05 2016

Formula

a(n) = (n+2) * A061358(n).
a(n) = (n+2) * Sum_{i=2..floor(n/2)} A010051(i) * A010051(n-i).
a(n) = Sum_{i=2..floor(n/2)} (A000203(i) + A000203(n-i)) * A010051(i) * A010051(n-i).

A347422 Numbers k such that the product of the number of divisors of k and the number of pairs of primes summing to k is k itself.

Original entry on oeis.org

24, 36, 72, 1056, 1176, 11232, 226080
Offset: 1

Views

Author

Anudeex Shetty and Nivesh Raj, Sep 02 2021

Keywords

Comments

All terms are even.
a(8) >= 3.5*10^6. - David A. Corneth, Sep 02 2021
a(8) >= 5*10^6. - Michel Marcus, Sep 10 2021
a(8) > 2.5*10^8. - Martin Ehrenstein, Sep 23 2021

Examples

			For 24, the number of divisors is 8 (1, 2, 3, 4, 6, 8, 12, 24), the number of pairs of prime numbers summing to 24 is 3: (5, 19), (7, 17), (11, 13), and 3*8=24, so 24 is a term.
Similarly, for 226080, the number of divisors is 72, and the number of pairs of prime numbers summing to 226080 is 3140. And 72*3140 = 226080, so 226080 is a term.
		

Crossrefs

Subsequence of A033950.

Programs

  • Mathematica
    Select[Range[12000], IntegerQ[(r = #/DivisorSigma[0, #])] && r == Length @ IntegerPartitions[#, {2}, Select[Range[#], PrimeQ]] &] (* Amiram Eldar, Sep 02 2021 *)
  • PARI
    f(n) = my(s); forprime(q=2, n\2, s+=isprime(n-q)); s; \\ A061358
    isok(k) = my(x = k/numdiv(k)); (denominator(x)==1) && (f(k) == x); \\ Michel Marcus, Sep 10 2021

A350865 Sum of the larger parts in the partitions of n into two prime parts.

Original entry on oeis.org

0, 0, 0, 0, 2, 3, 3, 5, 5, 7, 12, 0, 7, 11, 18, 13, 24, 0, 24, 17, 30, 19, 47, 0, 49, 23, 55, 0, 40, 0, 59, 29, 48, 31, 100, 0, 102, 0, 50, 37, 89, 0, 120, 41, 109, 43, 136, 0, 181, 47, 158, 0, 117, 0, 199, 53, 133, 0, 170, 0, 252, 59, 133, 61, 261, 0, 300, 0, 98, 67, 267, 0
Offset: 0

Views

Author

Wesley Ivan Hurt, Jan 19 2022

Keywords

Examples

			a(10) = 12; The partitions of 10 into two prime parts are (7,3) and (5,5). The sum of the larger parts of these partitions is then 7+5 = 12.
		

Crossrefs

Cf. A010051, A061358, A339399, A350866, A350883 (smaller parts).

Programs

  • PARI
    a(n) = sum(k=1, n\2, if (isprime(k) && isprime(n-k), n-k)); \\ Michel Marcus, Jan 21 2022

Formula

a(n) = Sum_{k=1..floor(n/2)} c(k) * c(n-k) * (n-k), where c = A010051.
a(n) = Sum_{k=floor((n-1)^2/4)+1..floor(n^2/4)} c(2k-1) * c(2k) * A339399(2k), where c = A350866.

A100699 Number of ways to partition n into two squarefree numbers that are not prime.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Dec 09 2004

Keywords

Comments

a(n) <= A071068(n).

Examples

			a(36) = #{1+35, 6+30, 10+26, 14+22, 15+21} = 5.
		

Crossrefs

Previous Showing 41-50 of 58 results. Next