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-5 of 5 results.

A038869 Primes p such that both p-2 and 2p-1 are prime.

Original entry on oeis.org

7, 19, 31, 139, 199, 229, 271, 601, 619, 661, 811, 829, 1279, 1429, 1609, 2029, 2089, 2131, 2311, 2551, 2791, 3169, 3331, 3391, 3529, 3769, 4051, 4159, 4231, 4261, 4339, 4639, 4801, 5419, 5479, 5659, 5851, 6271, 6301, 6361, 6691, 6961, 7561, 7951, 8539
Offset: 1

Views

Author

Keywords

Comments

Primes p such that A(2*p) - 3*A(p) = 3 (7, 31, 661, 811, 2551, ...) and primes p such that 7*A(p) - A(2*p) = 21 (19, 139, 619, 1429, ...), where A=A288814, are both subsequences of A038869. - David James Sycamore, Aug 07 2017

Crossrefs

Programs

  • Magma
    [n: n in [0..10000]|IsPrime(n) and IsPrime(n-2) and IsPrime(2*n-1)]; // Vincenzo Librandi, Dec 18 2010
    
  • Mathematica
    Transpose[Select[Partition[Prime[Range[1200]],2,1],#[[2]]-#[[1]]==2 && PrimeQ[2#[[2]]-1]&]][[2]] (* Harvey P. Dale, Jun 19 2014 *)
  • PARI
    is(n)=n%6==1 && isprime(n-2) && isprime(n) && isprime(2*n-1) \\ Charles R Greathouse IV, Aug 09 2017

A157995 Primes which are the sum of 1 plus two consecutive not-twin primes, p1 and p2, (p2-p1)>2.

Original entry on oeis.org

19, 31, 43, 53, 79, 101, 113, 139, 163, 173, 199, 211, 223, 241, 269, 331, 353, 373, 463, 509, 521, 577, 601, 619, 631, 727, 773, 787, 811, 829, 853, 883, 907, 919, 947, 967, 991, 1013, 1031, 1181, 1193, 1231, 1291, 1301, 1361, 1429, 1447, 1483, 1531, 1543
Offset: 1

Views

Author

Keywords

Examples

			19=7+11+1, 31=13+17+1, 43=19+23+1, 53=23+29+1, 79=37+41+1, 101=47+53+1, ...
		

Crossrefs

Programs

  • Maple
    count:= 0: R:= NULL: p:= 2:
    while count < 100 do
      q:= p; p:= nextprime(p);
      if p-q > 2 and isprime(p+q+1) then
         count:= count+1; R:= R, p+q+1
      fi
    od:
    R; # Robert Israel, May 13 2020
  • Mathematica
    lst={};Do[p0=Prime[n];p1=Prime[n+1];a=p0+p1+1;If[PrimeQ[a]&&(p1-p0)>2,AppendTo[lst,a]],{n,6!}];lst
    Select[Total[#]+1&/@Select[Partition[Prime[Range[200]],2,1],Last[#]-First[#]>2&],PrimeQ]  (* Harvey P. Dale, Mar 13 2011 *)

Extensions

Definition corrected by Harvey P. Dale, Mar 13 2011

A157996 Primes which are sum of 1 and two nonconsecutive primes p1 and p2, p2 - p1 > 2.

Original entry on oeis.org

11, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283
Offset: 1

Views

Author

Keywords

Comments

Conjecture: for n > 1, a(n) = prime(n+5). - Charles R Greathouse IV, Mar 12 2012
A185154(n) is the smallest prime q, such that A049084(q) + 1 < A049084(a(n) - q - 1). - Reinhard Zumkeller, Mar 12 2012

Examples

			11=3+7+1, 17=5+11+1, 19=5+13+1, ...
		

Crossrefs

Programs

  • Haskell
    a157996 n = a157996_list !! (n-1)
    a157996_list = map (+ 1) $ filter f a006093_list where
       f x = g $ takeWhile (< x) a065091_list where
         g []  = False
         g [_] = False
         g (p:ps@(_:qs)) = (x - p) `elem` qs || g ps
    -- Reinhard Zumkeller, Mar 12 2012
    
  • Mathematica
    lst={};Do[p0=Prime[n];Do[px=Prime[n+k];If[PrimeQ[a=p0+px+1],AppendTo[lst,a]],{k,2,2*5!}],{n,6!}];Take[Union[lst],222]
  • PARI
    is(n)=if(!isprime(n),return(0)); my(p=3,q=5); forprime(r=7,n-4, if(isprime(n-1-r) && n-1-r <= p, return(1)); p=q; q=r); 0 \\ Charles R Greathouse IV, Nov 05 2015

A269663 Semiprimes which are the product of a twin prime pair minus one.

Original entry on oeis.org

14, 34, 142, 898, 1762, 5182, 19042, 79522, 213442, 359998, 412162, 685582, 777922, 1192462, 1695202, 2585662, 4536898, 5143822, 5673922, 7225342, 12446782, 12659362, 12830722, 17040382, 17892898, 18818242, 20684302, 25100098, 32970562, 37601422, 46131262, 48441598
Offset: 1

Views

Author

K. D. Bajpai, Mar 02 2016

Keywords

Comments

Subsequence of A103533 and A001358.
All the terms in this sequence, except a(1), are congruent to 1 (mod 3).

Examples

			a(1) = 14 = 2 * 7 that is semiprime. Also, 3 * 5 - 1 = 14 where {3,5} is a twin prime pair.
a(2) = 34 = 2 * 17 that is semiprime. Also, 5 * 7 - 1 = 34 where {5,7} is a twin prime pair.
		

Crossrefs

Programs

  • Magma
    IsP2:=func< n | &+[k[2]: k in Factorization(n)] eq 2 >; [ s: n in [1..1000] | IsPrime(n) and IsPrime(n+2) and IsP2(s) where s is (n * (n+2) - 1)];
  • Maple
    A269663:= proc() local a, b, d; a:= ithprime(n); b:=a+2; d:=(a*b)-1; if isprime(b)and bigomega(d)=2 then return (d): fi; end: seq(A269663 (n), n=1..1000);
  • Mathematica
    A269663= {}; Do[a = Prime[n]; b = a + 2; c = a*b - 1; If[PrimeQ[b] && PrimeOmega[c] == 2, AppendTo[A269663, c]], {n, 1000}]; A269663
    Select[Times @@ # - 1 & /@ Transpose@{#, 2 + #} &@ Select[Prime@ Range@ 900, NextPrime@ # == # + 2 &], PrimeOmega@ # == 2 &] (* Michael De Vlieger, Apr 01 2016 *)
    Select[Times@@@Select[Partition[Prime[Range[1000]],2,1],#[[2]]-#[[1]]==2&]-1,PrimeOmega[ #]==2&] (* Harvey P. Dale, Mar 14 2023 *)
  • PARI
    for(n = 1, 1000, p = prime(n); q = p + 2; c=(p*q) - 1; if(isprime(q) && bigomega(c)==2, print1(c, ", ")));
    

Formula

a(n) = 2*A086870(n). - Ray Chandler, Apr 04 2016

A269662 Semiprimes which are the sum of a twin prime pair plus one.

Original entry on oeis.org

9, 25, 85, 121, 145, 205, 217, 301, 361, 481, 565, 697, 841, 865, 1141, 1285, 1717, 1765, 2041, 2101, 2305, 2461, 2581, 2605, 2641, 2965, 2977, 3241, 3337, 3397, 3865, 3901, 3997, 4285, 4537, 4681, 4765, 5317, 5377, 5461, 5941, 6001, 6241, 6505, 6937, 7081, 7117
Offset: 1

Views

Author

K. D. Bajpai, Mar 02 2016

Keywords

Comments

All the terms, except a(1), are congruent to 1 (mod 3).

Examples

			a(2) = 25 = 5 * 5 that is semiprime. Also, 25 = 11 + 13 + 1 where {11, 13} is a twin prime pair.
a(3) = 85 = 5 * 17 that is semiprime. Also, 55 = 41 + 43 + 1 where {41, 43} is a twin prime pair.
		

Crossrefs

Programs

  • Magma
    IsP2:=func< n | &+[k[2]: k in Factorization(n)] eq 2 >; [ s: n in [1..1000] | IsPrime(n) and IsPrime(n+2) and IsP2(s) where s is (n + n+2 + 1)];
  • Mathematica
    A269662 = {}; Do[a = Prime[n]; b = a + 2; c = a + b + 1; If[PrimeQ[b] && PrimeOmega[c] == 2, AppendTo[A269662, c]], {n, 1000}]; A269662
    Select[Range[1, 7200, 2], And[PrimeOmega@ # == 2, And[PrimeQ@ #, NextPrime[#] - 2] == # &[(# - 1)/2 - 1]] &] (* Michael De Vlieger, Apr 01 2016 *)
    Select[1+Total[#]&/@Select[Partition[Prime[Range[500]],2,1],#[[2]]-#[[1]] == 2&],PrimeOmega[#]==2&] (* Harvey P. Dale, Apr 10 2016 *)
  • PARI
    for(n = 1, 1000, p=prime(n); q=p+2; s=p+q+1; if(isprime(q) && bigomega(s)==2, print1(s,", ")));
    
Showing 1-5 of 5 results.