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

A117708 Numbers that are both lucky numbers and Chen primes.

Original entry on oeis.org

3, 7, 13, 31, 37, 67, 127, 211, 307, 409, 487, 541, 577, 631, 769, 787, 937, 991, 1009, 1039, 1117, 1201, 1291, 1459, 1471, 1567, 1777, 1801, 2251, 2281, 2467, 2557, 2647, 2971, 3037, 3187, 3259, 3307, 3559, 3709, 3847, 3889, 4441, 4567, 4801, 4969, 4987
Offset: 1

Views

Author

Jani Melik, Apr 27 2006

Keywords

Crossrefs

Intersection of A000959 and A109611.
Subsequence of A031157.

Programs

  • Mathematica
    lst = Range[1, 5000, 2]; i = 2; While[ i <= (len = Length@lst) && (k = lst[[i]]) <= len, lst = Drop[lst, {k, len, k}]; i++ ]; chenQ[n_] := PrimeQ[n] && Plus @@ Last /@ FactorInteger[n + 2] < 3; Select[lst, chenQ@# &] (* Robert G. Wilson v, May 12 2006 *)

Extensions

Corrected and extended by Robert G. Wilson v, May 12 2006

A118499 Numbers k such that the k-th prime number is not a Chen prime.

Original entry on oeis.org

14, 18, 21, 22, 25, 27, 36, 38, 40, 44, 48, 50, 53, 58, 59, 61, 65, 67, 70, 73, 74, 76, 78, 82, 84, 85, 88, 90, 99, 101, 108, 110, 111, 112, 114, 117, 121, 122, 125, 127, 129, 130, 131, 134, 137, 143, 147, 149, 153, 155, 158, 163, 168, 170
Offset: 1

Views

Author

Jani Melik, May 05 2006

Keywords

Examples

			97 is the 25th prime number but not a Chen prime since 99 = 3*3*11, therefore 25 is in the sequence.
		

Crossrefs

Programs

  • Maple
    ts_inde_nonchen:= proc(n) local i, ans, inde; ans:=[ ]: inde := 0; for i from 1 to n do if ( isprime(i) = 'true') then inde:=inde+1: if (isprime(i+2) = 'false' and numtheory[bigomega](i+2) <> 2) then ans:=[ op(ans), inde ] fi fi od: return ans end: ts_inde_nonchen(2000);
  • Mathematica
    Select[Range[180],Sum[FactorInteger[Prime[ # ]+2][[i,2]],{i,1,Length[ FactorInteger[Prime[ # ] + 2]]}] > 2 &]
  • PARI
    isok(k) = (bigomega(prime(k)+2) > 2); \\ Michel Marcus, Oct 19 2021

Extensions

Edited by Stefan Steinerberger, Jul 19 2007

A118721 Chen primes for which the sum of the digits is also a Chen prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 23, 29, 41, 47, 67, 83, 89, 101, 113, 131, 137, 139, 157, 179, 191, 197, 199, 227, 263, 269, 281, 311, 317, 337, 353, 359, 379, 401, 409, 443, 449, 461, 467, 487, 557, 571, 577, 599, 641, 647, 683, 719, 751, 797, 809, 821, 827, 829, 863, 881
Offset: 1

Views

Author

Luc Stevens (lms022(AT)yahoo.com), May 21 2006

Keywords

Examples

			29 is in the sequence because (1) it is a Chen prime and (2) the sum of its digits 2+9=11 is also a Chen prime.
		

Crossrefs

Cf. A109611.

Programs

  • Mathematica
    With[{ch=Select[Prime[Range[200]],PrimeOmega[#+2]<3&]},Select[ch, MemberQ[ ch, Total[IntegerDigits[#]]]&]] (* Harvey P. Dale, May 10 2018 *)

A118776 Differences between consecutive Chen primes.

Original entry on oeis.org

1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 6, 6, 6, 8, 4, 12, 6, 12, 6, 2, 4, 14, 4, 6, 2, 10, 8, 10, 12, 2, 10, 6, 2, 12, 16, 6, 6, 12, 6, 6, 6, 12, 12, 14, 4, 6, 20, 10, 6, 6, 20, 10, 12, 8, 10, 12, 12, 6, 12, 6, 12, 8, 4, 8, 4, 6, 12, 20, 16, 6, 6, 2, 6, 10, 12, 18, 14, 10, 6, 6, 6, 18, 6, 18, 18, 24
Offset: 1

Views

Author

Luc Stevens (lms022(AT)yahoo.com), May 22 2006

Keywords

Crossrefs

Programs

  • Mathematica
    chenQ[n_] := PrimeQ[n] && PrimeOmega[n + 2] < 3; Differences@ Select[Range[750], chenQ] (* Amiram Eldar, Oct 19 2021 *)

A153167 Numbers n such that n+2 is not a Chen prime.

Original entry on oeis.org

2, 4, 6, 7, 8, 10, 12, 13, 14, 16, 18, 19, 20, 22, 23, 24, 25, 26, 28, 30, 31, 32, 33, 34, 36, 37, 38, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 52, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 88, 89, 90
Offset: 1

Views

Author

Vincenzo Librandi, Dec 20 2008

Keywords

Comments

Contains all strictly positive even numbers A005843.
For each odd k>1 we can accumulate the numbers == k^2-2 (mod 2k) in a row, the last entry equal to A073577(k):
7; (k=3)
13, 23; (k=5)
19, 33, 47; (k=7)
25, 43, 61, 79; (k=9)
31, 53, 75, 97, 119; (k=11)
7, 63, 89, 115, 141, 167; (k=13)
43, 73, 103, 133, 163, 193,223; (k=17)
49, 83, 17, 151,185, 219, 253, 287; (k=19)
Each element T of this table has the format T= k^2-2-j*2*k, so T+2 is of the form k*(k-2*j), therefore not prime, and consequently all elements T are in the sequence.

Crossrefs

Extensions

Edited, 41, 59 (see A102540) etc. inserted by R. J. Mathar, Oct 16 2009

A185347 Semiprimes that are the sum of 10 consecutive primes.

Original entry on oeis.org

129, 158, 382, 1114, 1546, 2374, 2582, 3446, 3578, 6218, 6826, 7978, 8266, 9298, 9382, 10202, 12946, 14002, 15178, 15406, 15766, 16382, 16466, 17282, 17362, 18374, 18838, 19226, 19606, 23878, 24074, 25154, 25642, 26206, 29782, 30034, 30638, 32902, 33526, 34862, 34934, 35678, 35978, 36602
Offset: 1

Views

Author

Zak Seidov, Feb 15 2011

Keywords

Comments

Or, semiprimes in A127337 (Numbers that are the sum of 10 consecutive primes).
a(1) = 3*43, all other terms are of the form 2*prime.

Crossrefs

Cf. A127337.

Programs

  • Mathematica
    (* First run the program for A109611 to define semiPrimeQ *) Select[Table[Plus@@Prime[Range[n, n + 9]], {n, 500}], semiPrimeQ] (* Alonso del Arte, Feb 15 2011 *)
    Select[Total/@Partition[Prime[Range[600]],10,1],PrimeOmega[#]==2&] (* Harvey P. Dale, Sep 06 2014 *)
  • PARI
    {s=129;for(n=1,2000,if(2==bigomega(s), print1(s", ")); s=s-prime(n)+prime(n+10))}

A211410 Chen triprimes, triprimes (A014612) m such that m+2 is either prime or semiprime.

Original entry on oeis.org

8, 12, 20, 27, 44, 45, 63, 75, 92, 99, 105, 116, 117, 125, 147, 153, 164, 165, 171, 175, 195, 207, 212, 231, 245, 255, 261, 275, 279, 285, 325, 332, 333, 345, 356, 357, 363, 369, 387, 399, 425, 429, 435, 452, 455, 465, 477, 483, 507, 524
Offset: 1

Views

Author

Jonathan Vos Post, Feb 09 2013

Keywords

Examples

			27=3^3 and 45=3^2*9 are in the sequence because 27+2 = 29 and 45+2 = 47 are primes.
8=2^3, 12=2^2*3, and 20=2^2*5 are in the sequence because 8+2=10=2*5, 12+2=14=2*7, and 20+2=22=2*11 are semiprimes (A001358).
		

Crossrefs

Programs

  • Maple
    A211410 := proc(n)
        option remember;
        local a;
        if n = 1 then
            8;
        else
            for a from procname(n-1)+1 do
                if numtheory[bigomega](a) = 3 then
                    if isprime(a+2) or numtheory[bigomega](a+2) = 2 then
                        return a;
                    end if;
                end if;
            end do:
        end if;
    end proc:
    seq(A211410(n),n=1..80) ; # R. J. Mathar, Feb 10 2013
  • Mathematica
    Select[Range[600],PrimeOmega[#]==3&&PrimeOmega[#+2]<3&] (* Harvey P. Dale, Jul 15 2019 *)
  • PARI
    issemi(n)=bigomega(n)==2
    list(lim)=my(v=List(),pq); forprime(p=2,lim\4, forprime(q=2,min(lim\2\p,p), pq=p*q; forprime(r=2,min(lim\pq,q), if(isprime(pq*r+2) || issemi(pq*r+2), listput(v,pq*r))))); Set(v) \\ Charles R Greathouse IV, Aug 23 2017

A221865 The nonprimes k such that k + 2 is either a prime or a semiprime.

Original entry on oeis.org

0, 1, 4, 8, 9, 12, 15, 20, 21, 24, 27, 32, 33, 35, 36, 39, 44, 45, 49, 51, 55, 56, 57, 60, 63, 65, 69, 72, 75, 77, 80, 81, 84, 85, 87, 91, 92, 93, 95, 99, 104, 105, 111, 116, 117, 119, 120, 121, 125, 129, 132, 135, 140, 141, 143, 144, 147, 153, 155, 156, 159, 161, 164, 165, 171, 175, 176, 177, 183
Offset: 1

Views

Author

Gerasimov Sergey, Apr 18 2013

Keywords

Comments

Chen primes A109611(n) such that A109611(n)-/+ a(n) are both prime: 2, 29, 53, 113, 139,...
Unrelated: Numbers n such that n + 2^bigomega(n) is either a prime or a semiprime: 1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 15, 17, 18, 19, 21, 22, 23, 25, 27,...
A179384 is a subsequence. - R. J. Mathar, Apr 26 2013

Crossrefs

Programs

  • Maple
    A221865 := proc(n)
        option remember;
        if n =1 then
            0;
        else
            for a from procname(n-1)+1 do
                if not isprime(a) then
                if isprime(a+2) or numtheory[bigomega](a+2) = 2 then
                    return a;
                end if;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Apr 26 2013
  • Mathematica
    Select[Range[0,200],!PrimeQ[#]&&PrimeOmega[#+2]<3&] (* Harvey P. Dale, May 05 2013 *)

Extensions

Corrected by R. J. Mathar, Apr 26 2013

A291525 a(n) is the largest number in an n-term AP of Chen primes.

Original entry on oeis.org

2, 3, 7, 23, 29, 257, 1439, 2351, 26561, 146639, 1891949, 2062889, 341708489, 2062232987
Offset: 1

Views

Author

Keywords

Comments

Zhou proves that a(n) exists for each n, generalizing Green & Tao (2008) from primes to Chen primes and generalizing Green & Tao (2006) from 3-AP to n-AP. Sequence is increasing by definition.

Examples

			3, 5, 7 = a(3)
5, 11, 17, 23 = a(4)
5, 11, 17, 23, 29 = a(5)
107, 137, 167, 197, 227, 257 = a(6)
179, 389, 599, 809, 1019, 1229, 1439 = a(7)
881, 1091, 1301, 1511, 1721, 1931, 2141, 2351 = a(8)
4721, 7451, 10181, 12911, 15641, 18371, 21101, 23831, 26561 = a(9)
122069, 124799, 127529, 130259, 132989, 135719, 138449, 141179, 143909, 146639 = a(10)
182549, 353489, 524429, 695369, 866309, 1037249, 1208189, 1379129, 1550069, 1721009, 1891949 = a(11)
182549, 353489, 524429, 695369, 866309, 1037249, 1208189, 1379129, 1550069, 1721009, 1891949, 2062889 = a(12)
205492409, 216843749, 228195089, 239546429, 250897769, 262249109, 273600449, 284951789, 296303129, 307654469, 319005809, 330357149, 341708489 = a(13)
19712507, 176829467, 333946427, 491063387, 648180347, 805297307, 962414267, 1119531227, 1276648187, 1433765147, 1590882107, 1747999067, 1905116027, 2062232987 = a(14)
		

Crossrefs

Programs

  • PARI
    primorial(n)=vecprod(primes(primepi(n)));
    listChen(lim)=my(v=List([2]), semi=List(), L=lim+2, p=3); forprime(q=3, L\3, forprime(r=3, min(L\q, q), listput(semi, q*r))); semi=Set(semi); forprime(q=7, lim, if(setsearch(semi, q+2), listput(v, q))); forprime(q=5, L, if(q-p==2, listput(v, p)); p=q); Set(v)
    chen=listChen(1e6); \\ Increase as needed to find more terms
    a(n,startAt=n)=n--; my(div=lcm(primorial(n+1),n)); for(i=startAt,#chen, for(j=1,i-n, my(d=chen[i]-chen[j],g); if(d%div,next); g=d/n; forstep(k=chen[j]+g, chen[i]-g, g, if(!setsearch(chen,k), next(2))); return(chen[i])))

Extensions

a(14) from Charles R Greathouse IV, Sep 06 2017

A321855 Number of permutations f of {1,...,n} such that prime(k)*prime(f(k)) - 2 is prime for every k = 1,...,n.

Original entry on oeis.org

1, 1, 2, 3, 5, 12, 2, 3, 65, 248, 448, 1792, 4288, 6468, 27068, 29752, 106066, 447982, 1250762, 6304196, 46613084, 126391780, 504582496, 2270372946, 3028652541, 8941959118, 36442298864, 175008626450, 318369805106, 1974700703920, 6654020288821, 48819526290634, 150577775767875, 574885284627624, 3058310882340228, 15949743649457780
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 19 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0. Moreover, for each n > 0, there is an even permutation f of {1,...,n} with prime(k)*prime(f(k)) - 2 prime for all k = 1,...,n. Also, for any integer n > 2, there is an odd permutation f of {1,...,n} with prime(k)*prime(f(k)) - 2 prime for all k = 1,...,n.
If we let b(n) denote the number of even permutations f of {1,...,n} with prime(k)*prime(f(k)) - 2 prime for all k = 1,...,n, then (b(1),...,b(11)) = (1,1,1,1,3,6,1,1,33,125,226).
In 1973 J.-R. Chen proved that there are infinitely many primes p with p + 2 a product of at most two primes, such primes p are now called Chen primes.

Examples

			a(7) = 2. The only even permutation of {1,...,7} meeting the requirement is (1,5,7,4,2,6,3) with prime(1)*prime(1) - 2 = 2, prime(2)*prime(5) - 2 = 31, prime(3)*prime(7) - 2 = 83, prime(4)*prime(4) - 2 = 47, prime(5)*prime(2) - 2 = 31, prime(6)*prime(6) - 2 = 167 and prime(7)*prime(3) - 2 = 83 all prime. Also, the only odd permutation of {1,...,7} meeting the requirement is (1,5,7,6,2,4,3) with prime(1)*prime(1) - 2 = 2, prime(2)*prime(5) - 2 = 31, prime(3)*prime(7) - 2 = 83, prime(4)*prime(6) - 2 = 89, prime(5)*prime(2) - 2 = 31, prime(6)*prime(4) - 2 = 89 and prime(7)*prime(3) - 2 = 83 all prime.
		

Crossrefs

Programs

  • Mathematica
    Permanent[m_List]:=With[{v = Array[x, Length[m]]},Coefficient[Times @@ (m.v), Times @@ v]];
    a[n_]:=a[n]=Permanent[Table[Boole[PrimeQ[Prime[i]*Prime[j]-2]],{i,1,n},{j,1,n}]];
    Do[Print[n," ",a[n]],{n,1,27}]
  • PARI
    a(n) = matpermanent(matrix(n, n, i, j, ispseudoprime(prime(i)*prime(j) - 2))); \\ Jinyuan Wang, Jun 13 2020

Extensions

a(28)-a(29) from Jinyuan Wang, Jun 13 2020
a(30)-a(36) from Vaclav Kotesovec, Aug 20 2021
Previous Showing 31-40 of 71 results. Next