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.

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

A181603 Twin primes ending in 1.

Original entry on oeis.org

11, 31, 41, 61, 71, 101, 151, 181, 191, 241, 271, 281, 311, 421, 431, 461, 521, 571, 601, 641, 661, 811, 821, 881, 1021, 1031, 1051, 1061, 1091, 1151, 1231, 1291, 1301, 1321, 1451, 1481, 1621, 1721, 1871, 1931, 1951, 2081, 2111, 2131, 2141, 2311, 2341, 2381
Offset: 1

Views

Author

Omar E. Pol, Nov 01 2010

Keywords

Comments

These are twin primes == 1 (mod 30) or == 11 (mod 30) or == 21 (mod 30). In the first case they cannot be lower twin primes because the upper ones would be == 3 (mod 30) and divisible by 3. In the second case they cannot be upper twin primes because the lower ones would be == 9 (mod 30) and divisible by 3. The last case is excluded because that implies they are divisible by 3. In summary the upper twin primes in here are given by A282326, the lower twin primes in here by A282321. - R. J. Mathar, Feb 14 2017

Crossrefs

Programs

  • Maple
    isA181603 := proc(p)
        if isprime(p) and (isprime(p-2) or isprime(p+2)) then
            if modp(p,10) = 1 then
                true;
            else
                false;
            end if ;
        else
            false;
        end if;
    end proc:
    for n from 1 to 1000 do
        if isA181603(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Feb 14 2017
  • Mathematica
    Select[Prime@ Range@ 360, Mod[ #, 10] == 1 && (PrimeQ[ # - 2] || PrimeQ[ # + 2]) &] (* Robert G. Wilson v, Nov 06 2010 *)
    Select[Flatten[Select[Partition[Prime[Range[400]],2,1],#[[2]]-#[[1]] == 2&]],Mod[#,10]==1&] (* Harvey P. Dale, Oct 24 2021 *)

Extensions

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

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

A331555 Prime numbers p_k such that p_k == 1 (mod 10) and p_(k+1) == 3 (mod 10).

Original entry on oeis.org

11, 41, 71, 101, 191, 211, 281, 311, 431, 461, 521, 641, 661, 821, 881, 1031, 1061, 1091, 1151, 1201, 1301, 1451, 1481, 1511, 1531, 1721, 1811, 1871, 1931, 1951, 2081, 2111, 2141, 2311, 2381, 2591, 2621, 2711, 2801, 3191, 3251, 3331, 3371, 3461, 3581, 3671, 3821, 3851, 3931
Offset: 1

Views

Author

A.H.M. Smeets, Jan 20 2020

Keywords

Crossrefs

Cf. A030430 (1, any), A330366 (1, 1), this sequence (1, 3), A331324 (1, 7), A030431 (3, any), A030432 (7, any), A030433 (9, any) [where (a, b) means p_k == a (mod 10) and p_(k+1) == b (mod 10)].
Contains A282321.

Programs

  • Magma
    [p: p in PrimesUpTo(4500)| (p mod 10 eq 1) and (NextPrime(p) mod 10 eq 3)]; // Marius A. Burtea, Jan 20 2020
  • Maple
    filter:= p -> isprime(p) and nextprime(p) mod 10 = 3:
    select(filter, [seq(i,i=1..4000,10)]); # Robert Israel, Feb 20 2020
  • Mathematica
    First @ Transpose @ Select[Partition[Select[Range[4500], PrimeQ], 2, 1], Mod[First[#], 10] == 1 && Mod[Last[#],10] == 3 &] (* Amiram Eldar, Jan 20 2020 *)
    Prime[#]&/@SequencePosition[Table[Which[Mod[n,10]==1, 1,Mod[n,10]==3,-1,True,0],{n,Prime[Range[600]]}],{1,-1}][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 10 2020 *)
  • PARI
    isok(p) = isprime(p) && ((p % 10)==1) && ((nextprime(p+1) % 10) == 3); \\ Michel Marcus, Jan 20 2020
    
Showing 1-7 of 7 results.