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

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

Original entry on oeis.org

5, 17, 29, 41, 101, 137, 149, 197, 269, 281, 461, 521, 569, 617, 641, 809, 821, 857, 881, 1049, 1061, 1229, 1277, 1289, 1301, 1481, 1697, 1721, 1877, 1949, 1997, 2081, 2129, 2141, 2237, 2309, 2381, 2549, 2657, 2729, 2789, 2801, 2969
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 04 2002

Keywords

Comments

Corresponding greater members: A071696(n).
Or, lesser members of twin prime pairs (A001359) which are also Pythagorean primes (A002144). Intersection of A001359 and A002144. - Zak Seidov, Apr 25 2008
A010051(a(n)) * A010051(a(n)+2) = 1. - Reinhard Zumkeller, Nov 10 2013

Crossrefs

Programs

  • Haskell
    a071695 n = a071695_list !! (n-1)
    a071695_list = [p | p <- a002144_list, a010051' (p + 2) == 1]
    -- Reinhard Zumkeller, Nov 10 2013
  • Mathematica
    Select[ Prime@ Range@ 1000, Mod[#, 4] == 1 && PrimeQ[# + 2] &] (* Robert G. Wilson v, Jan 22 2012 *)
  • PARI
    p=2;forprime(q=3,1e4,if(q-p==2 && p%4==1, print1(p", "));p=q) \\ Charles R Greathouse IV, Mar 20 2013
    

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

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

Original entry on oeis.org

5, 13, 61, 73, 109, 181, 193, 229, 241, 313, 349, 421, 433, 601, 661, 829, 1021, 1033, 1093, 1153, 1321, 1429, 1453, 1489, 1609, 1621, 1669, 1789, 1873, 1933, 2029, 2089, 2113, 2269, 2341, 2593, 2689, 2713, 3001, 3121, 3169, 3253, 3301
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 04 2002

Keywords

Comments

Corresponding lesser members: A071698(n).

Crossrefs

Cf. A010051, subsequence of A016813.
Intersection of A006512 and A002144.

Programs

  • Haskell
    a071699 n = a071699_list !! (n-1)
    a071699_list = [x | x <- [5, 9 ..], a010051' x == 1, a010051' (x-2) == 1]
    -- Reinhard Zumkeller, Aug 05 2014
    
  • Magma
    [4*(k+1)+1:k in [0..1000]|IsPrime(4*k+3) and IsPrime(4*k+5)]; // Marius A. Burtea, Nov 06 2019
  • Mathematica
    #+2&/@Select[4Range[0,850]+3,PrimeQ[#]&&PrimeQ[#+2]&] (* Harvey P. Dale, Aug 24 2011 *)

Formula

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

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 *)

A175606 Primes p of the form 4*k+3 such that p+2 is prime and p-1 is nonsquarefree.

Original entry on oeis.org

1151, 1451, 1667, 3251, 3851, 4019, 5651, 6359, 6551, 6959, 7547, 11351, 11831, 12251, 13691, 15731, 15887, 16451, 17987, 18131, 18251, 19751, 20231, 22091, 26951, 27539, 28751, 30851, 31151, 32831, 35051, 37571, 38651, 38711, 40151, 43319, 44279, 44771, 45179
Offset: 1

Views

Author

Zak Seidov, Jul 22 2010

Keywords

Crossrefs

Subsequence of A071698.
Cf. A089188.

Programs

  • Mathematica
    Select[Range[3,99299,4],!SquareFreeQ[ #-1]&&PrimeQ[ # ]&&PrimeQ[ #+2]&]

Extensions

Name corrected by Amiram Eldar, Apr 23 2022

A267573 a(n) = prime(n) + (prime(n) mod 4).

Original entry on oeis.org

4, 6, 6, 10, 14, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 62, 62, 70, 74, 74, 82, 86, 90, 98, 102, 106, 110, 110, 114, 130, 134, 138, 142, 150, 154, 158, 166, 170, 174, 182, 182, 194, 194, 198, 202, 214, 226, 230, 230, 234, 242, 242, 254, 258, 266, 270
Offset: 1

Views

Author

Emre APARI, Jan 17 2016

Keywords

Comments

The primes corresponding to the cases where a(n) = a(n+1) can be found in A071698. - Michel Marcus, Jan 17 2016

Examples

			p=19; 19 + (19 modulo 4) = 22.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n)+(NthPrime(n) mod 4): n in [1..100]]; // Vincenzo Librandi, Jan 17 2016
    
  • Maple
    A267573:=n->ithprime(n)+(ithprime(n) mod 4): seq(A267573(n), n=1..100); # Wesley Ivan Hurt, Jan 17 2016
  • Mathematica
    Table[Prime[n] + Mod[Prime[n], 4], {n, 60}] (* Vincenzo Librandi, Jan 17 2016 *)
    #+Mod[#,4]&/@Prime[Range[60]] (* Harvey P. Dale, Jun 12 2020 *)
  • PARI
    a(n) = prime(n) + (prime(n) % 4); \\ Michel Marcus, Jan 17 2016
    
  • PARI
    lista(nn) = forprime(p=2, nn, print1(p + p % 4, ", ")); \\ Altug Alkan, Jan 17 2016

Formula

a(n) = A000040(n) + A039702(n).
a(n) = A083220(prime(n)). - Michel Marcus, Jan 17 2016

Extensions

More terms from Vincenzo Librandi, Jan 17 2016

A074381 (p-1)/2 mod 2, where p is the n-th prime for which p+2 is also prime; i.e., a(n)=0 if p==1 (mod 4), a(n)=1 if p==3 (mod 4).

Original entry on oeis.org

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

Views

Author

Roger L. Bagula, Sep 24 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Mod[(Select[Prime/@Range[600], PrimeQ[ #+2]&]-1)/2, 2]

Extensions

Edited by Dean Hickerson and Robert G. Wilson v, Oct 09 2002

A074395 A 7-way classification of the primes.

Original entry on oeis.org

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

Views

Author

Roger L. Bagula, Sep 24 2002

Keywords

Comments

There are seven types of consecutive primes modulus 4 and whether or not they are twin primes. They are a (1, 3, paired), (3, 1, paired), (1, 3, not paired), (3, 1, not paired), (1, 1), (3, 3) and p(m)=2. Each case is mapped to a number from zero to six, respectively. Here the word paired means that the consecutive primes are twins.
The initial digit (6) occurs but once and the frequency for the digits 0 and 1 decreased with added terms.

Crossrefs

Programs

  • Mathematica
    a = {}; Do[p = Prime[n]; q = Prime[n + 1]; a = Append[a, Which[ Mod[p, 4] == 1 && Mod[q, 4] == 3 && p + 2 == q, 0, Mod[p, 4] == 3 && Mod[q, 4] == 1 && p + 2 == q, 1, Mod[p, 4] == 1 && Mod[q, 4] == 3 && p + 2 != q, 2, Mod[p, 4] == 3 && Mod[q, 4] == 1 && p + 2 != q, 3, Mod[p, 4] == 1 && Mod[q, 4] == 1, 4, Mod[p, 4] == 3 && Mod[q, 4] == 3, 5, p == 2, 6]]; p = q, {n, 1, 105}]; a

Extensions

Edited and extended by Robert G. Wilson v, Oct 03 2002
Showing 1-9 of 9 results.