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

A060229 Smaller member of a twin prime pair whose mean is a multiple of A002110(3)=30.

Original entry on oeis.org

29, 59, 149, 179, 239, 269, 419, 569, 599, 659, 809, 1019, 1049, 1229, 1289, 1319, 1619, 1949, 2129, 2309, 2339, 2549, 2729, 2789, 2969, 2999, 3119, 3299, 3329, 3359, 3389, 3539, 3929, 4019, 4049, 4229, 4259, 4649, 4799, 5009, 5099, 5279, 5519, 5639
Offset: 1

Views

Author

Labos Elemer, Mar 21 2001

Keywords

Comments

Equivalently, smaller of twin prime pair with primes in different decades.
Primes p such that p and p+2 are prime factors of Fibonacci(p-1) and Fibonacci(p+1) respectively. - Michel Lagneau, Jul 13 2016
The union of this sequence and A282326 gives A132243. - Martin Renner, Feb 11 2017
The union of {3,5}, A282321, A282323 and this sequence gives A001359. - Martin Renner, Feb 11 2017
The union of {3,5,7}, A282321, A282322, A282323, A282324, this sequence and A282326 gives A001097. - Martin Renner, Feb 11 2017
Number of terms less than 10^k, k=2,3,4,...: 2, 11, 72, 407, 2697, 19507, 146516, ... - Muniru A Asiru, Jan 29 2018

Examples

			For the pair {149,151} (149 + 151)/2 = 5*30.
		

Crossrefs

Programs

  • GAP
    Filtered(List([0..200], k -> 30*k-1), 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 29 ]; // Vincenzo Librandi, Feb 13 2017
    
  • Maple
    isA060229 := proc(n)
        if modp(n+1,30) =0 and isprime(n) and isprime(n+2) then
            true;
        else
            false;
        end if;
    end proc:
    A060229 := proc(n)
        option remember;
        if n =1 then
            29;
        else
            for a from procname(n-1)+2 by 2 do
                if isA060229(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A060229(n),n=1..80) ; # R. J. Mathar, Feb 19 2017
  • Mathematica
    Select[Prime@ Range[10^3], PrimeQ[# + 2] && Mod[# + 1, 30] == 0 &] (* Michael De Vlieger, Jul 14 2016 *)
  • PARI
    isok(n) = isprime(n) && isprime(n+2) && !((n+1) % 30); \\ Michel Marcus, Dec 11 2013
    

Extensions

Minor edits by Ray Chandler, Apr 02 2009

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
    

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

A181606 Twin primes ending in 9.

Original entry on oeis.org

19, 29, 59, 109, 139, 149, 179, 199, 229, 239, 269, 349, 419, 569, 599, 619, 659, 809, 829, 859, 1019, 1049, 1229, 1279, 1289, 1319, 1429, 1489, 1609, 1619, 1669, 1699, 1789, 1879, 1949, 1999, 2029, 2089, 2129, 2239, 2269, 2309, 2339, 2549, 2659, 2689
Offset: 1

Views

Author

Omar E. Pol, Nov 01 2010

Keywords

Crossrefs

Programs

  • Maple
    filter:= proc(n)
      if not isprime(n) then return false fi;
      if n mod 3 = 1 then isprime(n-2) else isprime(n+2) fi
    end proc:
    select(filter, [seq(i,i=9..10^4,10)]); # Robert Israel, Nov 19 2023
  • Mathematica
    Select[Prime@ Range@ 800, Mod[ #, 10] == 9 && (PrimeQ[ # - 2] || PrimeQ[ # + 2]) &] (* Robert G. Wilson v, Nov 06 2010 *)
    Select[Union[Flatten[Select[Partition[Prime[Range[400]],2,1],#[[2]]-#[[1]]==2&]]],Mod[#,10]==9&] (* Harvey P. Dale, May 21 2024 *)

Extensions

More terms from Robert G. Wilson v, Nov 06 2010

A331840 Numbers k such that 30*k-13, 30*k-11 are twin primes.

Original entry on oeis.org

1, 4, 5, 7, 8, 12, 21, 28, 29, 43, 48, 50, 54, 56, 57, 60, 63, 67, 68, 70, 75, 76, 89, 90, 106, 109, 116, 118, 119, 126, 131, 138, 139, 141, 145, 151, 152, 155, 160, 166, 181, 183, 189, 196, 207, 228, 232, 238, 244, 249, 250, 252, 259, 263, 270, 280, 285, 287
Offset: 1

Views

Author

Frank Ellermann, Feb 26 2020

Keywords

Comments

All twin primes > 7 have the form 30*k-{13,11}, or 30*k +-1 (A176114), or 30*k+{11,13} (A089160).
All twin primes > 7 with least significant decimal digit 7 have the form 30*k-13.
All twin primes > 7 with least significant decimal digit 3 have the form 30*k+13.

Examples

			1 is a term because 1*30 - 13 =  17 = prime(6)  and 1*30 - 11 =  19 = prime(7).
4 is a term because 4*30 - 13 = 107 = prime(28) and 4*30 - 11 = 109 = prime(29).
5 is a term because 5*30 - 13 = 137 = prime(33) and 5*30 - 11 = 139 = prime(34).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[300], And @@ PrimeQ[30*# - {11, 13}] &] (* Amiram Eldar, Feb 29 2020 *)
  • PARI
    isok(k) = isprime(30*k-13) && isprime(30*k-11); \\ Michel Marcus, Feb 29 2020
  • Rexx
    S = 1
    do N = 2 while length( S ) < 255
       if NOPRIME( N*30 -13 )  then  iterate N
       if NOPRIME( N*30 -11 )  then  iterate N
       S = S || ',' N
    end N
    say S
    

Formula

a(n) = A089161(n)+1.
Showing 1-6 of 6 results.