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 21-30 of 58 results. Next

A067187 Numbers that can be expressed as the sum of two primes in exactly one way.

Original entry on oeis.org

4, 5, 6, 7, 8, 9, 12, 13, 15, 19, 21, 25, 31, 33, 39, 43, 45, 49, 55, 61, 63, 69, 73, 75, 81, 85, 91, 99, 103, 105, 109, 111, 115, 129, 133, 139, 141, 151, 153, 159, 165, 169, 175, 181, 183, 193, 195, 199, 201, 213, 225, 229, 231, 235, 241, 243, 253, 259, 265, 271
Offset: 1

Views

Author

Amarnath Murthy, Jan 10 2002

Keywords

Comments

All primes + 2 are terms of this sequence. Is 12 the last even term? - Frank Ellermann, Jan 17 2002
A048974, A052147, A067187 and A088685 are very similar after dropping terms less than 13. - Eric W. Weisstein, Oct 10 2003
Values of n such that A061358(n)=1. - Emeric Deutsch, Apr 03 2006

Examples

			4 is a term as 4 = 2+2, 15 is a term as 15 = 13+2.
		

Crossrefs

Subsequence of A014091.
Numbers that can be expressed as the sum of two primes in k ways for k=0..10: A014092 (k=0), this sequence (k=1), A067188 (k=2), A067189 (k=3), A067190 (k=4), A067191 (k=5), A066722 (k=6), A352229 (k=7), A352230 (k=8), A352231 (k=9), A352233 (k=10).

Programs

  • Maple
    g:=sum(sum(x^(ithprime(i)+ithprime(j)),i=1..j),j=1..80): gser:=series(g,x=0,280): a:=proc(n) if coeff(gser,x^n)=1 then n else fi end: seq(a(n),n=1..272); # Emeric Deutsch, Apr 03 2006
  • Mathematica
    cQ[n_]:=Module[{c=0},Do[If[PrimeQ[n-i]&&PrimeQ[i],c++],{i,2,n/2}]; c==1]; Select[Range[4,271],cQ[#]&] (* Jayanta Basu, May 22 2013 *)
    y = Select[Flatten@Table[Prime[i] + Prime[j], {i, 60}, {j, 1, i}], # < Prime[60] &]; Select[Union[y], Count[y, #] == 1 &] (* Robert Price, Apr 21 2025 *)

Extensions

Edited by Frank Ellermann, Jan 17 2002

A062602 Number of ways of writing n = p+c with p prime and c nonprime (1 or a composite number).

Original entry on oeis.org

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

Views

Author

Labos Elemer, Jul 04 2001

Keywords

Examples

			n = 22 has floor(n/2) = 11 partitions of form n = a + b; 3 partitions are of prime + prime [3 + 19 = 5 + 17 = 11 + 11], 3 partitions are of prime + nonprime [2 + 20 = 7 + 15 = 13 + 9], 5 partitions are nonprime + nonprime [1 + 21 = 4 + 18 = 6 + 16 = 8 + 14 = 10 + 12]. So a(22) = 3.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[Floor[n/2]], (PrimeQ[#] && Not[PrimeQ[n - #]]) || (Not[PrimeQ[#]] && PrimeQ[n - #]) &]], {n, 80}] (* Alonso del Arte, Apr 21 2013 *)
    Table[Length[Select[IntegerPartitions[n,{2}],AnyTrue[#,PrimeQ] && !AllTrue[ #,PrimeQ]&]],{n,90}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 19 2020 *)

Formula

a(n+1) = SUM(A010051(k)*A005171(n-k+1): 1<=k<=n). [From Reinhard Zumkeller, Nov 05 2009]
a(n) + A061358(n) + A062610(n) = A004526(n). - R. J. Mathar, Sep 10 2021

A100949 Number of partitions of n into a prime and a semiprime.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Nov 23 2004

Keywords

Comments

Marnell conjectures that a(n) > 0 for n > 10 after analyzing "many thousands of whole numbers". I find no exceptions below 100 million. - Charles R Greathouse IV, May 04 2010

Examples

			a(21) = #{7+2*7, 11+2*5, 17+2*2} = 3.
		

References

  • Geoffrey R. Marnell, "Ten Prime Conjectures", Journal of Recreational Mathematics 33:3 (2004-2005), pp. 193-196.

Crossrefs

Programs

  • Haskell
    a100949 n = sum $ map (a010051 . (n -)) $ takeWhile (< n) a001358_list
    -- Reinhard Zumkeller, Jun 26 2013
  • Mathematica
    Table[Count[Sort/@(PrimeOmega/@IntegerPartitions[n,{2}]),{1,2}],{n,110}] (* Harvey P. Dale, Mar 25 2018 *)
  • PARI
    list(lim)=my(p=primes(primepi(lim)),sp=select(n->bigomega(n)==2, vector(lim\1,i,i)),x=O('x^(lim\1+1))+'x); concat([0,0,0,0,0], Vec(sum(i=1,#p,x^p[i])*sum(i=1,#sp,x^sp[i]))) \\ Charles R Greathouse IV, Jun 14 2013
    

Formula

A100951(n) <= A100950(n) <= a(n) <= min(A000720(n), A072000(n)).
a(n) = Sum_{i=1..floor(n/2)} A010051(i) * A064911(n-i) + A010051(n-i) * A064911(i). - Wesley Ivan Hurt, May 02 2019

A341945 Number of partitions of n into 2 primes (counting 1 as a prime).

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Feb 24 2021

Keywords

Comments

Number of partitions of n into 2 noncomposite numbers, A008578. - Antti Karttunen, Dec 13 2021

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; series(`if`(n=0, 1,
         `if`(i<0, 0, (p-> `if`(p>n, 0, x*b(n-p, i)))(
         `if`(i=0, 1, ithprime(i)))+b(n, i-1))), x, 3)
        end:
    a:= n-> coeff(b(n, numtheory[pi](n)), x, 2):
    seq(a(n), n=2..90);  # Alois P. Heinz, Feb 24 2021
  • Mathematica
    a[n_] := If[2 == n, 1, Module[{s = 0}, For[p = 2, True, p = NextPrime[p], If[p > n-p, Return[s + Boole[PrimeQ[n-1]]], s += Boole[PrimeQ[n-p]]]]]];
    Table[a[n], {n, 2, 100}] (* Jean-François Alcover, Jan 03 2022, after Antti Karttunen *)
  • PARI
    A341945(n) = if(2==n,1,my(s=0); forprime(p=2,,if(p>(n-p), return(s+isprime(n-1)), s += isprime(n-p)))); \\ Antti Karttunen, Dec 13 2021

A071335 Number of partitions of n into sum of at most three primes.

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 3, 2, 3, 3, 3, 3, 4, 3, 4, 4, 5, 4, 5, 4, 6, 5, 6, 6, 6, 6, 7, 5, 8, 5, 8, 5, 10, 6, 8, 8, 10, 6, 11, 5, 12, 7, 12, 7, 13, 7, 14, 9, 13, 9, 15, 7, 17, 8, 15, 8, 17, 7, 17, 10, 18, 9, 20, 8, 21, 11, 21, 8, 21, 7, 23, 11, 23, 11, 23, 10, 28, 12, 25, 11, 26
Offset: 1

Views

Author

Reinhard Zumkeller, May 19 2002

Keywords

Comments

a(n) = A010051(n) + A061358(n) + A068307(n). [From Reinhard Zumkeller, Aug 08 2009]

Examples

			a(21)=6 as 21 = 2+19 = 2+2+17 = 3+5+13 = 3+7+11 = 5+5+11 = 7+7+7.
		

Crossrefs

Programs

  • Mathematica
    goldbachcount[p1_] := (parts=IntegerPartitions[p1, 3]; count=0; n=1;
      While[n<=Length[parts], If[Intersection[Flatten[PrimeQ[parts[[n]]]]][[1]]==True, count++]; n++]; count); Table[goldbachcount[i], {i, 1, 100}] (* Frank M Jackson, Mar 25 2013 *)
    Table[Length[Select[IntegerPartitions[n,3],AllTrue[#,PrimeQ]&]],{n,90}] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Oct 21 2016 *)

A352231 Numbers that can be expressed as the sum of two primes in exactly 9 ways.

Original entry on oeis.org

90, 132, 170, 196, 202, 220, 230, 236, 238, 244, 250, 254, 262, 268, 302, 314, 338, 346, 356, 388, 428, 458, 488
Offset: 1

Views

Author

Wesley Ivan Hurt, Mar 08 2022

Keywords

Examples

			90 = 7+83 = 11+79 = 17+73 = 19+71 = 23+67 = 29+61 = 31+59 = 37+53 = 43+47.
		

Crossrefs

Numbers that can be expressed as the sum of two primes in k ways for k=0..10: A014092 (k=0), A067187 (k=1), A067188 (k=2), A067189 (k=3), A067190 (k=4), A067191 (k=5), A066722 (k=6), A352229 (k=7), A352230 (k=8), this sequence (k=9), A352233 (k=10).

Programs

Formula

A061358(a(n)) = 9. - Alois P. Heinz, Mar 08 2022

A006307 Number of ways writing 2^n as unordered sums of 2 primes.

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 5, 3, 8, 11, 22, 25, 53, 76, 151, 244, 435, 749, 1314, 2367, 4239, 7471, 13705, 24928, 45746, 83467, 153850, 283746, 525236, 975685, 1817111, 3390038, 6341424, 11891654, 22336060, 42034097, 79287664, 149711134, 283277225, 536710100, 1018369893
Offset: 0

Views

Author

Keywords

Examples

			n = 5: 2^5 = 32 = 3+29 = 13+19 so a(5) = 2.
		

References

  • Bohman, Jan and Froberg, Carl-Erik; Numerical results on the Goldbach conjecture. Nordisk Tidskr. Informationsbehandling (BIT) 15 (1975), no. 3, 239-243.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    a:=proc(n) local c,k; c:=0: for k from 1 to floor((n-1)/2) do if isprime(2*k+1)=true and isprime(2*n-2*k-1)=true then c:=c+1 else c:=c fi od end: 0,0,1,seq(a(2*2^n),n=1..15); # Emeric Deutsch, Sep 22 2004
  • PARI
    a(n)=my(N=2^n,s); forprime(q=2, N\2, s+=isprime(N-q)); s \\ Charles R Greathouse IV, Mar 02 2015

Formula

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

Extensions

More terms from David W. Wilson
a(28)-a(35) from Ray Chandler, Feb 21 2004
a(36)=79287664 and a(37)=149711134 from Ray Chandler, Apr 10 2005
a(38)-a(40) from Russ Cox, Nov 04 2006

A065577 Number of Goldbach partitions of 10^n.

Original entry on oeis.org

2, 6, 28, 127, 810, 5402, 38807, 291400, 2274205, 18200488, 149091160, 1243722370, 10533150855, 90350630388
Offset: 1

Views

Author

Robert G. Wilson v, Dec 01 2001

Keywords

Comments

Number of ways of writing 10^n as the sum of two odd primes, when the order does not matter.

Examples

			a(1)=2 because 10 = 3+7 = 5+5;
a(2)=6 because 100 = 3+97 = 11+89 = 17+83 = 29+71 = 41+59 = 47+53; ...
		

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; f[n_] := Block[{c = 0, lmt = n/2, p = 3}, While[p <= lmt, If[ PrimeQ[n - p], c++ ]; p = NextPrim@p]; c]; Array[f, 10] (* Robert G. Wilson v, Nov 01 2006 *)
    a[n]:=Length[Select[n - Prime[Range[PrimePi[n/2]]], PrimeQ]]; Table[a[n],{n, 10^3, 10^3}] (* Luciano Ancora, Mar 16 2015 *)

Formula

a(n) = A061358(10^n).

Extensions

a(9) from Zak Seidov Nov 01 2006
a(10) from R. J. Mathar and David W. Wilson, Nov 02 2006
a(11) from David W. Wilson and Russ Cox, Nov 03 2006
a(12) from Russ Cox, Nov 04 2006
a(13) from Donovan Johnson, Nov 16 2009
a(14) from Huang Yuanbing (bailuzhou(AT)163.com), Dec 24 2009

A062301 Number of ways writing n-th prime as a sum of two primes.

Original entry on oeis.org

0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Labos Elemer, Jul 05 2001

Keywords

Comments

a(n) = 1 if and only if n is in A006512. - Robert Israel, Apr 04 2018

Crossrefs

Programs

  • GAP
    P:=Filtered([1..1000],IsPrime);; a:=List(List(List(P, i -> Partitions(i,2)), k -> Filtered(k, i -> IsPrime(i[1]) and IsPrime(i[2]))),Length); # Muniru A Asiru, Apr 05 2018
  • Maple
    a:= n-> `if`(isprime(ithprime(n)-2), 1, 0):
    seq(a(n), n=1..105);  # Alois P. Heinz, Oct 02 2020
  • Mathematica
    Table[Sum[(PrimePi[Prime[n] - i] - PrimePi[Prime[n] - i - 1]) (PrimePi[i] - PrimePi[i - 1]), {i, Floor[Prime[n]/2]}], {n, 100}] (* Wesley Ivan Hurt, Apr 04 2018 *)
  • PARI
    a(n) = isprime(prime(n) - 2) \\ David A. Corneth, Apr 04 2018
    

Extensions

Offset changed to 1 by David A. Corneth, Apr 04 2018

A062311 Number of ways writing n! as a sum of two primes.

Original entry on oeis.org

0, 0, 0, 1, 3, 12, 39, 184, 951, 5531, 38713, 346207, 3130812, 34444964, 382437428, 4637235145
Offset: 0

Views

Author

Labos Elemer, Jul 05 2001

Keywords

Comments

Number of unordered pairs of primes (p,q) such that n! = p + q.

Examples

			n = 4: 4! = 24 = 5+19 = 7+17 = 11+13 so a(4) = 3.
		

Crossrefs

Cf. A061358, A000142. See A140088 for a variant.

Formula

In other words, a(n) = A061358(n!) = number of prime+prime partitions of n!.

Extensions

a(9)-a(12) from Hans Havermann, Apr 29 2008
a(13) from Graeme McRae, May 02 2008
a(14)-a(15) from Hans Havermann, Dec 21 2008
Previous Showing 21-30 of 58 results. Next