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

A232880 Twin primes with digital root 2 or 4.

Original entry on oeis.org

11, 13, 29, 31, 101, 103, 137, 139, 191, 193, 227, 229, 281, 283, 461, 463, 569, 571, 641, 643, 659, 661, 821, 823, 857, 859, 1019, 1021, 1091, 1093, 1289, 1291, 1451, 1453, 1487, 1489, 1667, 1669, 1721, 1723, 2027, 2029, 2081, 2083, 2549, 2551, 2657, 2659
Offset: 1

Views

Author

Gary Croft, Dec 01 2013

Keywords

Comments

All twin primes except (3, 5) have one of 3 digital root pairings: {2, 4}, {5, 7} or {8, 1}: see A232881 for {5, 7} and A232882 for {8, 1}.
Or primes congruent to 11 or 13 mod 18 such that the number congruent to 13 or 11 mod 18 is also prime. - Alonso del Arte, Dec 02 2013

Examples

			11 and 13 are in the sequence because they form a twin prime pair in which 11 has a digital root of 2 and 13 has one of 4.
Likewise 29 and 31 form a twin prime pair with 29 has 2 for a digital root and 31 has 4.
		

Crossrefs

Programs

  • Mathematica
    partialList = Select[18Range[100] - 7, PrimeQ[#] && PrimeQ[# + 2] &]; A232880 = Sort[Flatten[Join[partialList, partialList + 2]]] (* Alonso del Arte, Dec 02 2013 *)
    dRoot[n_] := 1 + Mod[n - 1, 9]; tw = Select[Prime[Range[1000]], PrimeQ[# + 2] &]; Select[Union[tw, tw + 2], MemberQ[{2, 4}, dRoot[#]] &] (* T. D. Noe, Dec 10 2013 *)
  • PARI
    p=5; forprime(q=7,1e4,if(q-p==2 && q%9==4, print1(p", "q", ")); p=q) \\ Charles R Greathouse IV, Aug 26 2014

A282321 Lesser of twin primes congruent to 11 (mod 30).

Original entry on oeis.org

11, 41, 71, 101, 191, 281, 311, 431, 461, 521, 641, 821, 881, 1031, 1061, 1091, 1151, 1301, 1451, 1481, 1721, 1871, 1931, 2081, 2111, 2141, 2381, 2591, 2711, 2801, 3251, 3371, 3461, 3581, 3671, 3821, 3851, 4001, 4091, 4241, 4271, 4421, 4481, 4721, 4931, 5021
Offset: 1

Views

Author

Martin Renner, Feb 11 2017

Keywords

Comments

The union of [this sequence and A282322] is A132241.
The union of [{3, 5}, this sequence, A282323 and A060229] is the lesser of twin primes sequence A001359.
The union of [{3, 5, 7}, A282321 to A282326] is the twin primes sequence A001097.

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(5000) | IsPrime(p+2) and p mod 30 eq 11 ]; // Vincenzo Librandi, Feb 12 2017
    
  • Maple
    a:={}:
    for i from 1 to 1229 do
      if isprime(ithprime(i)+2) and ithprime(i) mod 30 = 11 then
        a:={op(a),ithprime(i)}:
      fi:
    od:
    a;
  • PARI
    list(lim)=my(v=List(), p=2); forprime(q=3, lim+2, if(q-p==2 && q%30==13, listput(v, p)); p=q); Vec(v) \\ Charles R Greathouse IV, Feb 14 2017

A232881 Twin primes with digital root 5 or 7.

Original entry on oeis.org

5, 41, 59, 149, 239, 311, 347, 419, 599, 617, 1031, 1049, 1229, 1301, 1319, 1427, 1481, 1607, 1697, 1787, 1877, 1931, 1949, 2111, 2129, 2237, 2309, 2381, 2687, 3119, 3299, 3371, 3389, 3461, 3767, 3821, 3929, 4001, 4019, 4091, 4127, 4217, 4271, 4649, 4721
Offset: 1

Views

Author

Gary Croft, Dec 01 2013

Keywords

Comments

All twin primes except (3,5) have one of 3 digital root pairings: {2,4}, {5,7} or {8,1}: see A232880 for {2,4} and A232882 for {8,1}.

Examples

			41 and 43 are in the sequence because they form a twin prime pair in which 41 has a digital root of 5 and 43 has a digital root of 7. Likewise 59 and 61 form a twin prime pair where 59 has a digital root of 5 and 61 has one of 7.
		

Crossrefs

Programs

  • Mathematica
    dRoot[n_] := 1 + Mod[n - 1, 9]; tw = Select[Prime[Range[1000]], PrimeQ[# + 2] &]; Select[Union[tw, tw + 2], MemberQ[{5, 7}, dRoot[#]] &] (* T. D. Noe, Dec 10 2013 *)

A282323 Lesser of twin primes congruent to 17 (mod 30).

Original entry on oeis.org

17, 107, 137, 197, 227, 347, 617, 827, 857, 1277, 1427, 1487, 1607, 1667, 1697, 1787, 1877, 1997, 2027, 2087, 2237, 2267, 2657, 2687, 3167, 3257, 3467, 3527, 3557, 3767, 3917, 4127, 4157, 4217, 4337, 4517, 4547, 4637, 4787, 4967, 5417, 5477, 5657, 5867, 6197
Offset: 1

Views

Author

Martin Renner, Feb 11 2017

Keywords

Comments

The union of [this sequence and A282324] is A132242.
The union of [{3, 5}, A282321, this sequence and A060229] is the lesser of twin primes sequence A001359.
The union of [{3, 5, 7}, A282321 to A282326] is the twin primes sequence A001097.
A181605 without the 7. The proof works along the same lines as the proof in A282322. - R. J. Mathar, Feb 14 2017
Number of terms < 10^k: 0, 0, 1, 9, 64, 414, 2734, 19674, 146953, ... - Muniru A Asiru, Jan 09 2018

Examples

			From _Muniru A Asiru_, Jan 25 2018: (Start)
17 is a member because the pair (17, 19) is a twin prime, 17 < 19 and 17 mod 30 = 17.
137 is a member because the pair (137, 139) is a twin prime, 137 < 139 and 137 mod 30 = 17.
197 is a member because the pair (197, 199) is a twin prime, 197 < 199 and 197 mod 30 = 17.
(End)
		

Crossrefs

Programs

  • GAP
    P:=Filtered([1..400000], IsPrime);;
    P1:=List(Filtered(Filtered(List([1..Length(P)-1],n->[P[n],P[n+1]]),i->i[2]-i[1]=2),j->j[1] mod 30=17),k->k[1]);; # Muniru A Asiru, Jul 08 2017
  • Magma
    [p: p in PrimesUpTo(7000) | IsPrime(p+2) and p mod 30 eq 17 ]; // Vincenzo Librandi, Feb 13 2017
    
  • Maple
    a:={}:
    for i from 1 to 1229 do
      if isprime(ithprime(i)+2) and ithprime(i) mod 30 = 17 then
        a:={op(a),ithprime(i)}:
      fi:
    od:
    a;
  • Mathematica
    Select[17 + 30 Range[0, 220], PrimeQ[#] && PrimeQ[# + 2] &] (* Robert G. Wilson v, Jan 09 2018 *)
    Select[Partition[Prime[Range[1000]],2,1],#[[2]]-#[[1]]==2&&Mod[#[[1]],30]==17&][[;;,1]] (* or *) Select[Range[17,7000,30],AllTrue[#+{0,2},PrimeQ]&] (* Harvey P. Dale, Mar 02 2024 *)
  • PARI
    list(lim)=my(v=List(), p=2); forprime(q=3, lim+2, if(q-p==2 && q%30==19, listput(v, p)); p=q); Vec(v) \\ Charles R Greathouse IV, Feb 14 2017
    

A282324 Greater of twin primes congruent to 19 (mod 30).

Original entry on oeis.org

19, 109, 139, 199, 229, 349, 619, 829, 859, 1279, 1429, 1489, 1609, 1669, 1699, 1789, 1879, 1999, 2029, 2089, 2239, 2269, 2659, 2689, 3169, 3259, 3469, 3529, 3559, 3769, 3919, 4129, 4159, 4219, 4339, 4519, 4549, 4639, 4789, 4969, 5419, 5479, 5659, 5869, 6199
Offset: 1

Views

Author

Martin Renner, Feb 11 2017

Keywords

Comments

The union of [A282323 and this sequence] is A132242.
The union of [{5, 7}, A282322, this sequence and A282326] is the greater of twin primes sequence A006512.
The union of [{3, 5, 7}, A282321 to A282326] is the twin primes sequence A001097.
Number of terms less than 10^k, k=2,3,4,...: 1, 9, 64, 414, 2734, 19674, 146953, ... - Muniru A Asiru, Feb 09 2018

Crossrefs

Programs

  • GAP
    Filtered(List([1..220], k -> 30*k-11), n -> IsPrime(n) and IsPrime(n-2));  # Muniru A Asiru, Feb 02 2018
  • Magma
    [p: p in PrimesUpTo(7000) | IsPrime(p-2) and p mod 30 eq 19 ]; // Vincenzo Librandi, Feb 13 2017
    
  • Maple
    a:={}:
    for i from 1 to 1229 do
      if isprime(ithprime(i)-2) and ithprime(i) mod 30 = 19 then
        a:={op(a),ithprime(i)}:
      fi:
    od:
    a;
    # More efficient
    select(n -> isprime(n-2) and isprime(n), [seq(30*k+19, k=0..220)]); # Muniru A Asiru, Jan 30 2018
  • Mathematica
    Select[Prime[Range[1000]], PrimeQ[# - 2] && Mod[#, 30] == 19 &] (* Vincenzo Librandi, Feb 13 2017 *)
  • PARI
    list(lim)=my(v=List(), p=2); forprime(q=3, lim, if(q-p==2 && q%30==19, listput(v, q)); p=q); Vec(v) \\ Charles R Greathouse IV, Feb 14 2017
    

A282326 Greater of twin primes congruent to 1 (mod 30).

Original entry on oeis.org

31, 61, 151, 181, 241, 271, 421, 571, 601, 661, 811, 1021, 1051, 1231, 1291, 1321, 1621, 1951, 2131, 2311, 2341, 2551, 2731, 2791, 2971, 3001, 3121, 3301, 3331, 3361, 3391, 3541, 3931, 4021, 4051, 4231, 4261, 4651, 4801, 5011, 5101, 5281, 5521, 5641, 5851
Offset: 1

Views

Author

Martin Renner, Feb 11 2017

Keywords

Comments

The union of [A060229 and this sequence] is A132243.
The union of [{5, 7}, A282322, A282324 and this sequence] is the greater of twin primes sequence A006512.
The union of [{3, 5, 7}, A282321 to A060229 and this sequence] is the twin primes sequence A001097.
Number of terms less than 10^k, k=2,3,4,...: 2, 11, 72, 407, 2697, 19507, 146516, ... - Muniru A Asiru, Mar 05 2018

Crossrefs

Programs

  • GAP
    Filtered(List([0..300], k -> 30*k+1), n -> IsPrime(n-2) and IsPrime(n));  # Muniru A Asiru, Mar 05 2018
  • Maple
    select(n -> isprime(n-2) and isprime(n), [seq(30*k+1, k=0..300)]); # Muniru A Asiru, Mar 05 2018
  • Mathematica
    1 + Select[30 Range@ 200, AllTrue[# + {-1, 1}, PrimeQ] &] (* Michael De Vlieger, Mar 26 2018 *)
  • PARI
    list(lim)=my(v=List(),p=2); forprime(q=3,lim, if(q-p==2 && q%30==1, listput(v,q)); p=q); Vec(v) \\ Charles R Greathouse IV, Feb 14 2017
    

A282322 Greater of twin primes congruent to 13 (mod 30).

Original entry on oeis.org

13, 43, 73, 103, 193, 283, 313, 433, 463, 523, 643, 823, 883, 1033, 1063, 1093, 1153, 1303, 1453, 1483, 1723, 1873, 1933, 2083, 2113, 2143, 2383, 2593, 2713, 2803, 3253, 3373, 3463, 3583, 3673, 3823, 3853, 4003, 4093, 4243, 4273, 4423, 4483, 4723, 4933, 5023, 5233, 5443, 5503, 5653, 5743
Offset: 1

Views

Author

Martin Renner, Feb 11 2017

Keywords

Comments

The union of [A282321 and this sequence] is A132241.
The union of [{5, 7}, this sequence, A282324 and A282326] is the greater of twin primes sequence A006512.
The union of [{3, 5, 7}, A282321 to A282326] is the twin primes sequence A001097.
A181604 without the 3. [Proof: working mod 10 we see that each value here is in A181604. For the other direction: Except 3 all twin primes in A181604 are upper twin primes; they cannot be lower twin primes because the upper ones would be multiples of 5. The twin primes in A181604 could be == 3 (mod 30) or == 13 (mod 30) or == 23 (mod 30). The first case is excluded because they would be multiples of 3; the third case is excluded because the lower twin primes would be == 21 (mod 30) and also multiples of 3. So only the case == 13 (mod 30) remains.] - R. J. Mathar, Feb 14 2017
Number of terms < 10^k for k >= 1: 0, 3, 13, 67, 401, 2736, 19797, 146841, 1141217, 9137078, ..., . - Robert G. Wilson v, Jan 07 2018

Crossrefs

Programs

  • Maple
    a:={}:
    for i from 1 to 1229 do
      if isprime(ithprime(i)-2) and ithprime(i) mod 30 = 13 then
        a:={op(a),ithprime(i)}:
      fi:
    od:
    a;
  • Mathematica
    Select[13 + 30 Range[0, 200], PrimeQ[# - 2] && PrimeQ[#] &] (* Robert G. Wilson v, Jan 07 2018 *)
  • PARI
    list(lim)=my(v=List(), p=2); forprime(q=3, lim, if(q-p==2 && q%30==13, listput(v, q)); p=q); Vec(v) \\ Charles R Greathouse IV, Feb 14 2017
Showing 1-7 of 7 results.