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 20 results. Next

A006512 Greater of twin primes.

Original entry on oeis.org

5, 7, 13, 19, 31, 43, 61, 73, 103, 109, 139, 151, 181, 193, 199, 229, 241, 271, 283, 313, 349, 421, 433, 463, 523, 571, 601, 619, 643, 661, 811, 823, 829, 859, 883, 1021, 1033, 1051, 1063, 1093, 1153, 1231, 1279, 1291, 1303, 1321, 1429, 1453, 1483, 1489, 1609
Offset: 1

Views

Author

Keywords

Comments

Also primes that are the sum of two primes (which is possible only if 2 is one of the primes). - Cino Hilliard, Jul 02 2004, edited by M. F. Hasler, Nov 14 2019
The set of greater of twin primes larger than five is a proper subset of the set of primes of the form 3n + 1 (A002476). - Paul Muljadi, Jun 05 2008
Smallest prime > n-th isolated composite. - Juri-Stepan Gerasimov, Nov 07 2009
Subsequence of A175075. Union of a(n) and sequence A175080 is A175075. - Jaroslav Krizek, Jan 30 2010
A164292(a(n))=1; A010051(a(n)+2)=0 for n > 1. - Reinhard Zumkeller, Mar 29 2010
Omega(n) = Omega(n-2); d(n) = d(n-2). - Juri-Stepan Gerasimov, Sep 19 2010
Aside from the first term, all subsequent terms have digital root 1, 4, or 7. - J. W. Helkenberg, Jul 24 2013
Also primes p with property that the sum of the successive gaps between primes <= p is a prime number. - Robert G. Wilson v, Dec 19 2014
The phrase "x is an element of the {primes, positive integers} and there {exist no, exist} elements a,b of {1 and primes, primes}: a+b=x" determines A133410, A067829, A025584, A006512, A166081, A014092, A014091 and A038609 for the first few hundred terms with only de-duplication or omitting/including 3, 4 and 6 in the case of A166081/A014091 and one case of omitting/including 3 given 1 isn't prime. - Harry G. Coin, Nov 25 2015
The yet unproved Twin Prime Conjecture states that this sequence is infinite. - M. F. Hasler, Nov 14 2019

References

  • See A001359 for further references and links.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Subsequence of A139690.
Bisection of A077800.

Programs

  • Haskell
    a006512 = (+ 2) . a001359 -- Reinhard Zumkeller, Feb 10 2015
    
  • Magma
    [n: n in PrimesUpTo(1610)|IsPrime(n-2)]; // Bruno Berselli, Feb 28 2011
    
  • Maple
    for i from 1 to 253 do if ithprime(i+1) = ithprime(i) + 2 then print({ithprime(i+1)}); fi; od; # Zerinvary Lajos, Mar 19 2007
    P := select(isprime,[$1..1609]): select(p->member(p-2,P),P); # Peter Luschny, Mar 03 2011
    A006512 := proc(n)
        2+A001359(n) ;
    end proc: # R. J. Mathar, Nov 26 2014
  • Mathematica
    Select[Prime[Range[254]], PrimeQ[# - 2] &] (* Robert G. Wilson v, Jun 09 2005 *)
    Transpose[Select[Partition[Prime[Range[300]], 2, 1], Last[#] - First[#] == 2 &]][[2]] (* Harvey P. Dale, Nov 02 2011 *)
    Cases[Prime[Range[500]] + 2, ?PrimeQ] (* _Fred Patrick Doty, Aug 23 2017 *)
  • PARI
    select(p->isprime(p-2),primes(1000))
    
  • PARI
    a(n)=p=3; while(p+2 < (p=nextprime(p+1)) || n-->0, ); p
    vector(100, n, a(n)) \\ Altug Alkan, Dec 04 2015
    
  • Python
    from sympy import primerange, isprime
    print([n for n in primerange(1, 2001) if isprime(n - 2)]) # Indranil Ghosh, Jul 20 2017

A061358 Number of ways of writing n = p+q with p, q primes and p >= q.

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, Apr 28 2001

Keywords

Comments

For an odd number n, a(n) = 0 if n-2 is not a prime, otherwise a(n) = 1.
For n > 1, a(2n) is at least 1, according to Goldbach's conjecture.
a(A014092(n)) = 0; a(A014091(n)) > 0; a(A067187(n)) = 1. - Reinhard Zumkeller, Nov 22 2004
Number of partitions of n into two primes.
Number of unordered ways of writing n as the sum of two primes.
a(2*n) = A068307(2*n+2). - Reinhard Zumkeller, Aug 08 2009
4*a(n) is the total number of divisors of all primes p and q such that n = p+q and p >= q. - Wesley Ivan Hurt, Mar 05 2016
Indices where a(n) = 0 correspond to A164376 UNION A025584. - Bill McEachen, Jan 31 2024

Examples

			a(22) = 3 because 22 can be written as 3+19, 5+17 and 11+11.
		

Crossrefs

Programs

  • Magma
    [#RestrictedPartitions(n,2,{p:p in PrimesUpTo(1000)}):n in [0..100] ] // Marius A. Burtea, Jan 19 2019
  • Maple
    g:=sum(sum(x^(ithprime(i)+ithprime(j)),i=1..j),j=1..30): gser:=series(g,x=0,110): seq(coeff(gser,x,n),n=0..105); # Emeric Deutsch, Apr 03 2006
  • Mathematica
    a[n_] := Length[Select[n - Prime[Range[PrimePi[n/2]]], PrimeQ]]; Table[a[n], {n, 0, 100}] (* Paul Abbott, Jan 11 2005 *)
    With[{nn=110},CoefficientList[Series[Sum[x^(Prime[i]+Prime[j]),{j,nn},{i,j}],{x,0,nn}],x]] (* Harvey P. Dale, Aug 17 2017 *)
    Table[Count[IntegerPartitions[n,{2}],?(AllTrue[#,PrimeQ]&)],{n,0,110}] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale, Jul 03 2021 *)
  • PARI
    a(n)=my(s);forprime(q=2,n\2,s+=isprime(n-q));s \\ Charles R Greathouse IV, Mar 21 2013
    
  • Python
    from sympy import primerange, isprime, floor
    def a(n):
        s=0
        for q in primerange(2, n//2 + 1): s+=isprime(n - q)
        return s
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 30 2017
    

Formula

G.f.: Sum_{j>0} Sum_{i=1..j} x^(p(i)+p(j)), where p(k) is the k-th prime. - Emeric Deutsch, Apr 03 2006
A065577(n) = a(10^n).
From Wesley Ivan Hurt, Jan 04 2013: (Start)
a(n) = Sum_{i=1..floor(n/2)} A010051(i) * A010051(n-i).
a(n) = Sum_{i=1..floor(n/2)} floor((A010051(i) + A010051(n-i))/2). (End)
a(n) + A062610(n) + A062602(n) = A004526(n). - R. J. Mathar, Sep 10 2021
a(n) = Sum_{k=floor((n-1)^2/4)+1..floor(n^2/4)} c(A339399(2k-1)) * c(A339399(2k)), where c = A010051. - Wesley Ivan Hurt, Jan 19 2022

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), May 15 2001
Comments edited by Zak Seidov, May 28 2014

A035137 Numbers that are not the sum of 2 palindromes (where 0 is considered a palindrome).

Original entry on oeis.org

21, 32, 43, 54, 65, 76, 87, 98, 201, 1031, 1041, 1042, 1051, 1052, 1053, 1061, 1062, 1063, 1064, 1071, 1072, 1073, 1074, 1075, 1081, 1082, 1083, 1084, 1085, 1086, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1099, 1101, 1103, 1104, 1105, 1106, 1107, 1108
Offset: 1

Views

Author

Patrick De Geest, Nov 15 1998

Keywords

Comments

Apparently, every positive number is equal to the sum of at most 3 positive palindromes. - Giovanni Resta, May 12 2013
A260254(a(n)) = 0. - Reinhard Zumkeller, Jul 21 2015
A261675(a(n)) >= 3 (and, conjecturally, = 3). - N. J. A. Sloane, Sep 03 2015
This sequence is infinite. Proof: It is easy to see that 200...01 (with any number of zeros) cannot be the sum of two palindromes. - N. J. A. Sloane, Sep 03 2015
The conjecture that every number is the sum of 3 palindromes fails iff there is a term a(n) such that for all palindromes P < a(n), the difference a(n) - P is also a term of this sequence. - M. F. Hasler, Sep 08 2015
Cilleruelo and Luca (see links) have proved the conjecture that every positive integer is the sum of at most three palindromes (in bases >= 5), and also that the density of those that require three is positive. - Christopher E. Thompson, Apr 14 2016

Crossrefs

Cf. A260254, A260255 (complement), A002113, A261906, A261907.
Cf. A319477 (disallowing zero).

Programs

  • Haskell
    a035137 n = a035137_list !! (n-1)
    a035137_list = filter ((== 0) . a260254) [0..]
    -- Reinhard Zumkeller, Jul 21 2015
    
  • Maple
    N:= 4: # to get all terms with <= N digits
    revdigs:= proc(n) local L,j,nL;
      L:= convert(n,base,10); nL:= nops(L);
      add(L[j]*10^(nL-j),j=1..nL);
    end proc;
    palis:= $0..9:
    for d from 2 to N do
      if d::even then
        palis:= palis, seq(x*10^(d/2)+revdigs(x),x=10^(d/2-1)..10^(d/2)-1)
      else
        palis:= palis, seq(seq(x*10^((d+1)/2)+y*10^((d-1)/2)+revdigs(x),y=0..9),x=10^((d-3)/2)..10^((d-1)/2)-1);
      fi
    od:
    palis:= [palis]:
    A:= Array(0..10^N-1):
    A[palis]:= 1:
    B:= SignalProcessing:-Convolution(A,A):
    select(t -> B[t+1] < 0.5, [$1..10^N-1]); # Robert Israel, Jun 22 2015
  • Mathematica
    palQ[n_]:=FromDigits[Reverse[IntegerDigits[n]]]==n; nn=1108; t={}; Do[i=c=0; While[i<=n && c!=1,If[palQ[i] && palQ[n-i], AppendTo[t,n]; c=1]; i++],{n,nn}]; Complement[Range[nn],t] (* Jayanta Basu, May 12 2013 *)
  • PARI
    is_A035137(n)={my(k=0);!until(n<2*k=nxt(k),is_A002113(n-k)&&return)} \\ Uses function nxt() given in A002113. Not very efficient for large n, better start with k=n-A261423(n). Maybe also better use A261423 rather than nxt(). - M. F. Hasler, Jul 21 2015

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

A038609 Numbers that are the sum of 2 different primes.

Original entry on oeis.org

5, 7, 8, 9, 10, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 24, 25, 26, 28, 30, 31, 32, 33, 34, 36, 38, 39, 40, 42, 43, 44, 45, 46, 48, 49, 50, 52, 54, 55, 56, 58, 60, 61, 62, 63, 64, 66, 68, 69, 70, 72, 73, 74, 75, 76, 78, 80, 81, 82, 84, 85, 86, 88, 90, 91, 92
Offset: 1

Views

Author

Vasiliy Danilov (danilovv(AT)usa.net) 1998 Jul

Keywords

Crossrefs

Cf. A014091, A166081 (complement).

Programs

  • Maple
    isA038609 := proc(n)
        local i,p,q;
        for i from 1 do
            p := ithprime(i) ;
            if 2*p > n then
                return false;
            fi;
            q := n-p ;
            if q <= p then
                return false ;
            end if;
            if isprime(q) then
                return true;
            end if;
        end do:
    end proc:
    n :=1 :
    for c from 1 do
        if isA038609(c) then
            printf("%d %d\n",n,c) ;
            n := n+1 ;
        end if;
    end do: # R. J. Mathar, Jun 09 2014
  • Mathematica
    max = 100;
    ip = PrimePi[max];
    Table[Prime[i] + Prime[j], {i, ip}, {j, i + 1, ip}] // Flatten // Union // Select[#, # <= max&]& (* Jean-François Alcover, Mar 23 2020 *)

A360459 Two times the median of the multiset of prime factors of n; a(1) = 2.

Original entry on oeis.org

2, 4, 6, 4, 10, 5, 14, 4, 6, 7, 22, 4, 26, 9, 8, 4, 34, 6, 38, 4, 10, 13, 46, 4, 10, 15, 6, 4, 58, 6, 62, 4, 14, 19, 12, 5, 74, 21, 16, 4, 82, 6, 86, 4, 6, 25, 94, 4, 14, 10, 20, 4, 106, 6, 16, 4, 22, 31, 118, 5, 122, 33, 6, 4, 18, 6, 134, 4, 26, 10, 142, 4, 146
Offset: 1

Views

Author

Gus Wiseman, Feb 14 2023

Keywords

Comments

The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length). Since the denominator is always 1 or 2, the median can be represented as an integer by multiplying by 2.

Examples

			The prime factors of 60 are {2,2,3,5}, with median 5/2, so a(60) = 5.
		

Crossrefs

The union is 2 followed by A014091, complement of A014092.
The prime factors themselves are listed by A027746, distinct A027748.
The version for divisors is A063655.
Positions of odd terms are A072978 (except 1).
For mean instead of twice median: A123528/A123529, distinct A323171/A323172.
Positions of even terms are A359913 (and 1).
The version for prime indices is A360005.
The version for distinct prime indices is A360457.
The version for distinct prime factors is A360458.
The version for prime multiplicities is A360460.
The version for 0-prepended differences is A360555.
A112798 lists prime indices, length A001222, sum A056239.
A325347 counts partitions with integer median, complement A307683.
A326567/A326568 gives mean of prime indices.
A359893 and A359901 count partitions by median, odd-length A359902.

Programs

  • Mathematica
    Table[2*Median[Join@@ConstantArray@@@FactorInteger[n]],{n,100}]

A360458 Two times the median of the set of distinct prime factors of n; a(1) = 2.

Original entry on oeis.org

2, 4, 6, 4, 10, 5, 14, 4, 6, 7, 22, 5, 26, 9, 8, 4, 34, 5, 38, 7, 10, 13, 46, 5, 10, 15, 6, 9, 58, 6, 62, 4, 14, 19, 12, 5, 74, 21, 16, 7, 82, 6, 86, 13, 8, 25, 94, 5, 14, 7, 20, 15, 106, 5, 16, 9, 22, 31, 118, 6, 122, 33, 10, 4, 18, 6, 134, 19, 26, 10, 142, 5
Offset: 1

Views

Author

Gus Wiseman, Feb 14 2023

Keywords

Comments

The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length). Since the denominator is always 1 or 2, the median can be represented as an integer by multiplying by 2.

Examples

			The prime factors of 336 are {2,2,2,2,3,7}, with distinct parts {2,3,7}, with median 3, so a(336) = 6.
		

Crossrefs

The union is 2 followed by A014091, complement of A014092.
Distinct prime factors are listed by A027748.
The version for divisors is A063655.
Positions of odd terms are A100367.
For mean instead of two times median we have A323171/A323172.
The version for prime indices is A360005.
The version for distinct prime indices is A360457.
The version for prime factors is A360459.
The version for prime multiplicities is A360460.
Positions of even terms are A360552.
The version for 0-prepended differences is A360555.
A112798 lists prime indices, length A001222, sum A056239.
A304038 lists distinct prime indices.
A359893 and A359901 count partitions by median, odd-length A359902.

Programs

  • Mathematica
    Table[2*Median[First/@FactorInteger[n]],{n,100}]

A067188 Numbers that can be expressed as the (unordered) sum of two primes in exactly two ways.

Original entry on oeis.org

10, 14, 16, 18, 20, 28, 32, 38, 68
Offset: 1

Views

Author

Amarnath Murthy, Jan 10 2002

Keywords

Comments

Corresponds to numbers 2m such that A045917(m)=2. Subsequence of A014091. - Lekraj Beedassy, Apr 22 2004

Examples

			18 is a term as 18 = 13+5 = 11+7 are the only two ways to express 18 as a sum of two primes.
		

Crossrefs

Cf. A023036.
Numbers that can be expressed as the sum of two primes in k ways for k=0..10: A014092 (k=0), A067187 (k=1), this sequence (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

  • Mathematica
    y = Select[Flatten@Table[Prime[i] + Prime[j], {i, 100}, {j, 1, i}], # < Prime[100] &]; Select[Union[y], Count[y, #] == 2 &] (* Robert Price, Apr 22 2025 *)

Extensions

Corrected by Peter Bertok (peter(AT)bertok.com), who finds (Jan 13 2002) that there are no other terms below 10000 and conjectures there are no further terms in this sequence and A067189, A067190, etc.
R. K. Guy (Jan 14 2002) remarks: "I believe that these conjectures follow from a more general one by Hardy & Littlewood (probably in Some problems of 'partitio numerorum' III, on the expression of a number as a sum of primes, Acta Math. 44(1922) 1-70)."

A067189 Numbers that can be expressed as the sum of two primes in exactly three ways.

Original entry on oeis.org

22, 24, 26, 30, 40, 44, 52, 56, 62, 98, 128
Offset: 1

Views

Author

Amarnath Murthy, Jan 10 2002

Keywords

Comments

Corresponds to numbers 2m such that A045917(m)=3. Subsequence of A014091. - Lekraj Beedassy, Apr 22 2004

Examples

			26 is a term as 26 = 23+3 = 19+7 = 13+13 are all the three ways to express 26 as a sum of two primes.
		

Crossrefs

Cf. A023036.
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), this sequence (k=3), A067190 (k=4), A067191 (k=5), A066722 (k=6), A352229 (k=7), A352230 (k=8), A352231 (k=9), A352233 (k=10).

Programs

  • Mathematica
    y = Select[Flatten@Table[Prime[i] + Prime[j], {i, 500}, {j, 1, i}], # < Prime[500] &]; Select[Union[y], Count[y, #] == 3 &] (* Robert Price, Apr 22 2025 *)

Extensions

Extended by Peter Bertok (peter(AT)bertok.com), who finds (Jan 13 2002) that there are no other terms below 10000 and conjectures there are no further terms in this sequence and A067188, A067190, etc.
R. K. Guy (Jan 14 2002) remarks: "I believe that these conjectures follow from a more general one by Hardy & Littlewood (probably in Some problems of 'partitio numerorum' III, on the expression of a number as a sum of primes, Acta Math. 44(1922) 1-70)."

A157931 Numbers that are both the sum and the product of two primes.

Original entry on oeis.org

4, 6, 9, 10, 14, 15, 21, 22, 25, 26, 33, 34, 38, 39, 46, 49, 55, 58, 62, 69, 74, 82, 85, 86, 91, 94, 106, 111, 115, 118, 122, 129, 133, 134, 141, 142, 146, 158, 159, 166, 169, 178, 183, 194, 201, 202, 206, 213, 214, 218, 226, 235, 253, 254, 259, 262, 265, 274, 278
Offset: 1

Views

Author

William Weeks (dach(AT)kuci.org), Mar 09 2009

Keywords

Comments

Assuming the Goldbach conjecture, this is A001358 intersect (A005843 union A052147), since an odd number n is the sum of two primes iff n-2 is prime. - N. J. A. Sloane, Mar 14 2009
The first few terms of A001358: Semiprimes, not members of A157931 are: 35, 51, 57, 65, 77, 87, 93, 95, ..., . - Robert G. Wilson v, Mar 15 2009

Examples

			For the numbers up to 100, the solutions are 4 = (2+2) = (2*2); 6 = (3+3) = (2*3); 9 = (2+7) = (3*3); 10 = (3+7) = (2*5); 14 = (3+11) = (2*7); 15 = (2+13) = (3*5); 21 = (2+19) = (3*7); 22 = (3+19) = (2*11); 25 = (2+23) = (5*5); 26 = (3+23) = (2*13); 33 = (2+31) = (3*11); 34 = (3+31) = (2*17); 38 = (7+31) = (2*19); 39 = (2+37) = (3*13); 46 = (3+43) = (2*23); 49 = (2+47) = (7*7); 55 = (2+53) = (5*11); 58 = (5+53) = (2*29); 62 = (3+59) = (2*31); 69 = (2+67) = (3*23); 74 = (3+71) = (2*37); 82 = (3+79) = (2*41); 85 = (2+83) = (5*17); 86 = (3+83) = (2*43); 91 = (2+89) = (7*13); 94 = (5+89) = (2*47).
		

Crossrefs

Cf. A043326 Numbers n such that n is a product of two different primes and n - 2 is prime, A062721 Numbers n such that n is a product of two primes and n - 2 is prime. - Zak Seidov, Mar 15 2009

Programs

  • Haskell
    a157931 n = a157931_list !! (n-1)
    a157931_list = filter ((== 1) . a064911) a014091_list
    -- Reinhard Zumkeller, Oct 15 2014
  • Maple
    isA014091 := proc(n) for i from 1 do p := ithprime(i) ; if p > n/2 then RETURN(false); fi; if isprime(n-p) then RETURN(true) ; fi; od: end: isA001358 := proc(n) RETURN(numtheory[bigomega](n) = 2) ; end: for n from 4 to 500 do if isA001358(n) and isA014091(n) then printf("%d,",n) ; fi; od: # R. J. Mathar, Mar 15 2009
  • Mathematica
    fQ[n_] := Block[{k = 2}, While[k < n, If[ PrimeQ[n - k], Break[]]; k = NextPrime@k]; k + 1 < n]; semiPrimeQ[n_] := Plus @@ Last /@ FactorInteger@n == 2; Select[ Range@ 295, fQ@# && semiPrimeQ@# &] (* Robert G. Wilson v, Mar 15 2009 *)
    Select[Union[Flatten[Table[Prime[i] + Prime[j], {i, 50}, {j, 50}]]], PrimeOmega[#] == 2 &] (* Alonso del Arte, Feb 08 2013 *)
    Union[Select[Total/@Tuples[Prime[Range[60]],2],PrimeOmega[#]==2&]] (* Harvey P. Dale, Jul 27 2015 *)

Formula

A014091 INTERSECT A001358. - R. J. Mathar, Mar 15 2009

Extensions

Edited by N. J. A. Sloane, Mar 14 2009
Extended by R. J. Mathar and Robert G. Wilson v, Mar 15 2009
Showing 1-10 of 20 results. Next