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.

A071696 Greater members of twin prime pairs of form (4*k+1,4*k+3), k>0.

Original entry on oeis.org

7, 19, 31, 43, 103, 139, 151, 199, 271, 283, 463, 523, 571, 619, 643, 811, 823, 859, 883, 1051, 1063, 1231, 1279, 1291, 1303, 1483, 1699, 1723, 1879, 1951, 1999, 2083, 2131, 2143, 2239, 2311, 2383, 2551, 2659, 2731, 2791, 2803, 2971
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 04 2002

Keywords

Comments

Corresponding lesser members: A071695(n).
A010051(a(n)) * A010051(a(n)-2) = 1. - Reinhard Zumkeller, Nov 10 2013

Crossrefs

Cf. Subsequence of A002145.

Programs

  • Haskell
    a071696 n = a071696_list !! (n-1)
    a071696_list = [p | p <- tail a002145_list, a010051' (p - 2) == 1]
    -- Reinhard Zumkeller, Nov 10 2013
  • Mathematica
    Select[Partition[Prime[Range[500]],2,1],#[[2]]-#[[1]]==2&&IntegerQ[ (#[[1]]-1)/4]&][[All,2]] (* Harvey P. Dale, Aug 27 2021 *)
    Select[Table[4k+{1,3},{k,750}],AllTrue[#,PrimeQ]&][[;;,2]] (* Harvey P. Dale, Sep 10 2024 *)

A071698 Lesser members of twin prime pairs of form (4*k+3, 4*k+5), k >= 0.

Original entry on oeis.org

3, 11, 59, 71, 107, 179, 191, 227, 239, 311, 347, 419, 431, 599, 659, 827, 1019, 1031, 1091, 1151, 1319, 1427, 1451, 1487, 1607, 1619, 1667, 1787, 1871, 1931, 2027, 2087, 2111, 2267, 2339, 2591, 2687, 2711, 2999, 3119, 3167, 3251, 3299
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 04 2002

Keywords

Comments

Corresponding greater members: A071699(n).

Crossrefs

Cf. A010051, subsequence of A004767.

Programs

  • Haskell
    a071698 n = a071698_list !! (n-1)
    a071698_list = [x | x <- [3, 7 ..], a010051' x == 1, a010051' (x+2) == 1]
    -- Reinhard Zumkeller, Aug 05 2014
    
  • Magma
    [4*k+3:k in [0..1000]|IsPrime(4*k+3) and IsPrime(4*k+5)]; // Marius A. Burtea, Nov 06 2019
  • Mathematica
    Transpose[Select[Table[4n+{3,5},{n,0,1000}],AllTrue[#,PrimeQ]&]][[1]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jan 16 2015 *)

Formula

a(n) = 2*A241557(n+1)-1. - Hilko Koning, Nov 06 2019

A071700 Product of twin primes of form (4*k+3,4*(k+1)+1), k>=0.

Original entry on oeis.org

15, 143, 3599, 5183, 11663, 32399, 36863, 51983, 57599, 97343, 121103, 176399, 186623, 359999, 435599, 685583, 1040399, 1065023, 1192463, 1327103, 1742399, 2039183, 2108303, 2214143, 2585663, 2624399, 2782223
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 04 2002

Keywords

Crossrefs

Subsequence of A037074, A071700 and of A182140.
Cf. A071697, a(n) = A071698(n)*A071699(n).

Programs

  • Haskell
    a071700 n = a071700_list !! (n-1)
    a071700_list = [x * y | x <- [3, 7 ..], a010051' x == 1,
                            let y = x + 2, a010051' y == 1]
    -- Reinhard Zumkeller, Aug 05 2014
  • PARI
    for(k=0,1e3,if(isprime(4*k+3)&&isprime(4*k+5),print1(16*k^2+32*k +15", "))) \\ Charles R Greathouse IV, Jul 03 2013
    
  • PARI
    is(n)=my(k=sqrtint(n\16)); n==16*k^2+32*k+15 && isprime(4*k+3) && isprime(4*k+5) \\ Charles R Greathouse IV, Jul 03 2013
    
  • PARI
    is(n)=my(t); n%16==15 && issquare(n+1,&t) && isprime(t-1) && isprime(t+1) \\ Charles R Greathouse IV, Dec 12 2016
    
  • PARI
    list(lim)=my(v=List(),p=3); forprime(q=5,sqrtint(1+lim\1)+1, if(q-p==2 && p%4==3, listput(v,p*q)); p=q); Vec(v) \\ Charles R Greathouse IV, Dec 12 2016
    

Formula

a(n) >> n^2 log^4 n. - Charles R Greathouse IV, Jul 03 2013

A072029 Swap twin prime pairs of form (4*k+3,4*(k+1)+1) in prime factorization of n.

Original entry on oeis.org

1, 2, 5, 4, 3, 10, 7, 8, 25, 6, 13, 20, 11, 14, 15, 16, 17, 50, 19, 12, 35, 26, 23, 40, 9, 22, 125, 28, 29, 30, 31, 32, 65, 34, 21, 100, 37, 38, 55, 24, 41, 70, 43, 52, 75, 46, 47, 80, 49, 18, 85, 44, 53, 250, 39, 56, 95, 58, 61, 60, 59, 62, 175, 64, 33
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 07 2002

Keywords

Examples

			a(42) = a(2*3*7) = a(2)*a(3)*a(7) = a(2)*a(4*0+3)*a(7) = 2*(4*1+1)*7 = 2*5*7 = 70.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Product[{p, e} = pe; Which[
         Mod[p, 4] == 3 && PrimeQ[p + 2], p + 2,
         Mod[p, 4] == 1 && PrimeQ[p - 2], p - 2,
         True, p]^e, {pe, FactorInteger[n]}];
    Array[a, 100] (* Jean-François Alcover, Nov 21 2021 *)
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, p = f[i,1]; if(p == 2, p, if(p%4 == 3 && isprime(p+2), p+2, if(p%4 == 1 && isprime(p-2), p-2, p)))^f[i,2]);} \\ Amiram Eldar, Feb 26 2024

Formula

Multiplicative with a(p) = (if p mod 4 = 3 and p+2 is prime then p+2 else (if p mod 4 = 1 and p-2 is prime then p-2 else p)), p prime.
a(a(n))=n, a self-inverse permutation of natural numbers.
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = Product_{(p < q) swapped pair} ((p^2-p)*(q^2-q)/((p^2-q)*(q^2-p))) = 1.37140598833326962... . - Amiram Eldar, Feb 26 2024

A071702 Number of twin prime pairs <= n of form (4*k+3,4*(k+1)+1), k>=0.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 04 2002

Keywords

Comments

As for A071538 the convention is followed that a twin prime pair is <= n if its smaller member is <= n.
If {a,b} is a twin prime pair (aHarvey P. Dale, Nov 12 2021

Examples

			a(60)=3, since (59,61) is included along with (3,5) and (11,13).
		

Crossrefs

a(n) = A071538(n) - A071701(n), cf. A071698, A071699.

Programs

  • Mathematica
    Accumulate[Table[If[AllTrue[{n,n+2},PrimeQ]&&Mod[n,4]==3,1,0],{n,100}]] (* Harvey P. Dale, Nov 12 2021 *)
Showing 1-5 of 5 results.