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

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
    

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

A181604 Twin primes ending in 3.

Original entry on oeis.org

3, 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
Offset: 1

Views

Author

Omar E. Pol, Nov 01 2010

Keywords

Crossrefs

Programs

  • Maple
    isA181604 := proc(p)
        if isprime(p) and (isprime(p-2) or isprime(p+2)) then
            if modp(p,10) = 3 then
                true;
            else
                false;
            end if ;
        else
            false;
        end if;
    end proc: # R. J. Mathar, Feb 14 2017
  • Mathematica
    Select[Prime@Range@700, Mod[ #, 10] == 3 && (PrimeQ[ # - 2] || PrimeQ[ # + 2]) &] (* Robert G. Wilson v, Nov 06 2010 *)

Extensions

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

A253624 Initial members of prime sextuples (p, p+2, p+12, p+14, p+24, p+26).

Original entry on oeis.org

5, 17, 1277, 4217, 21587, 91127, 103967, 113147, 122027, 236867, 342047, 422087, 524957, 560477, 626597, 754967, 797567, 909317, 997097, 1322147, 1493717, 1698857, 1748027, 1762907, 2144477, 2158577, 2228507, 2398157, 2580647, 2615957
Offset: 1

Views

Author

Karl V. Keller, Jr., Jan 06 2015

Keywords

Comments

This sequence is primes p for which there exist three twin prime pairs (p, p+2), (p+12, p+14) and (p+24, p+26).
Excluding 5, this is a subsequence of each of the following: A128468 (a(n)=30n+17). A039949 (Primes of the form 30n-13), A181605 (twin primes ending in 7).
Note that not in all cases (p, p+2, p+12, p+14, p+24, p+26) are consecutive primes; the first p's for which (p, p+2, p+12, p+14, p+24, p+26) are consecutive primes are 4217, 21587, 91127, 103967, 236867, 342047, 422087, 560477, 797567, 909317, 1322147, 1493717, 1748027, 1762907, 2144477, 2158577, 2228507, 2615957 (not in OEIS). - Zak Seidov, May 16 2017

Examples

			For p = 17, the numbers 17, 19, 29, 31, 41, 43 are primes.
		

Crossrefs

Cf. A077800 (twin primes), A128468, A039949, A181605.

Programs

  • Maple
    select(t -> andmap(isprime, [t,t+2,t+12,t+14,t+24,t+26]),
    [5, seq(30*k+17,k=0..10^5)]); # Robert Israel, Jan 07 2015
  • Mathematica
    Select[Prime@ Range[2*10^5], Times @@ Boole@ PrimeQ[# + {2, 12, 14, 24, 26}] == 1 &] (* Michael De Vlieger, May 16 2017 *)
    Select[Prime[Range[200000]],AllTrue[#+{2,12,14,24,26},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 15 2021 *)
  • Python
    from sympy import isprime
    for n in range(1,10000001,2):
      if isprime(n) and isprime(n+2) and isprime(n+12) and isprime(n+14) and isprime(n+24) and isprime(n+26): print(n,end=', ')
    
  • Python
    from sympy import isprime, primerange
    def aupto(limit):
      alst = []
      for p in primerange(2, limit+1):
        if all(map(isprime, [p+2, p+12, p+14, p+24, p+26])): alst.append(p)
      return alst
    print(aupto(3*10**6)) # Michael S. Branicky, May 17 2021

A092340 Prime numbers n such that n^2+2*n divides (Fibonacci(n^2) + Fibonacci(2*n)).

Original entry on oeis.org

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

Views

Author

Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 18 2004

Keywords

Comments

First disagrees with A181605 at n=26: this sequence contains 2707, but A181605 doesn't. Is this a supersequence of A181605? - Nathaniel Johnston, Jun 25 2011
See link for proof of this. - Robert Israel, Apr 13 2021

Crossrefs

Cf. A000045.
Cf. A181605. - Robert G. Wilson v, Nov 07 2010

Programs

  • Maple
    filter:= proc(n)
      local M,A;
      uses LinearAlgebra:-Modular;
      if not isprime(n) then return false fi;
      M:= Matrix(2,2,<<0,1>|<1,1>>,datatype=integer);
      A:= MatrixPower(n,M,n^2) + MatrixPower(n,M,2*n);
      if A[1,2] mod n <> 0 then return false fi;
      A:= MatrixPower(n+2,M,n^2) + MatrixPower(n+2,M,2*n);
      A[1,2] mod (n+2) = 0
    end proc:
    select(filter, [seq(i,i=3..10000,2)]); # Robert Israel, Apr 13 2021
  • Mathematica
    fQ[n_] := Mod[ Fibonacci[n^2] + Fibonacci[2 n], n^2 + 2 n] == 0; Select[ Prime@ Range@ 744, fQ] (* Robert G. Wilson v, Nov 07 2010 *)
  • PARI
    forprime (i=1,2000,if(Mod(fibonacci(i^2)+fibonacci(2*i),i^2+2*i)==0,print1(i,",")))

Extensions

Offset changed from 0 to 1 by Robert G. Wilson v, Nov 07 2010
More terms from Robert G. Wilson v, Nov 07 2010

A245568 Initial members of prime quadruples (n, n+2, n+24, n+26).

Original entry on oeis.org

5, 17, 617, 857, 1277, 1427, 1697, 2087, 2687, 3557, 4217, 5417, 5477, 7307, 8837, 9437, 10067, 13877, 17657, 18287, 20747, 21587, 23537, 25577, 27917, 28547, 30467, 32117, 32297, 35507, 37337, 37547, 40127, 41177, 41387, 41957
Offset: 1

Views

Author

Karl V. Keller, Jr., Jan 09 2015

Keywords

Comments

This sequence is prime n, where there exist two twin prime pairs of (n, n+2, n+24, n+26).
Excluding 5, this is a subsequence of each of the following: A128468 (a(n) = 30*n + 17), A039949 (Primes of the form 30n-13), A181605 (twin primes ending in 7).
A253624 is a subsequence of this sequence.

Examples

			For n = 17, the numbers 17, 19, 41, 43 are primes.
		

Crossrefs

Cf. A077800 (twin primes), A128468, A039949, A181605, A253624.

Programs

  • Mathematica
    a245568[n_] := Select[Prime@ Range@ n, And[PrimeQ[# + 2], PrimeQ[# + 24], PrimeQ[# + 26]] &]; a245568[5000] (* Michael De Vlieger, Jan 11 2015 *)
  • Python
    from sympy import isprime
    for n in range(1,10000001,2):
      if isprime(n) and isprime(n+2) and isprime(n+24) and isprime(n+26): print(n,end=', ')

A247089 Initial members of prime quadruples (p, p+2, p+30, p+32).

Original entry on oeis.org

11, 29, 41, 71, 107, 149, 197, 239, 281, 431, 569, 827, 1019, 1031, 1061, 1289, 1451, 1667, 1997, 2081, 2111, 2237, 2309, 2657, 2969, 3299, 3329, 3359, 3527, 3821, 4019, 4127, 4229, 4241, 4517, 5849, 6269, 6659, 6761, 7457, 7559, 8597
Offset: 1

Views

Author

Karl V. Keller, Jr., Jan 10 2015

Keywords

Comments

Primes p such that (p, p+2) and (p+30, p+32) are twin prime pairs.
This sequence is a subsequence of A001359 (lesser of twin primes).
The subset of terms ending in 1 in this sequence is a subsequence of A132232 (primes, 11 mod 30).
The subset of terms ending in 7 in this sequence is a subsequence of A141860 (primes, 2 mod 15).
The subset of terms ending in 9 in this sequence is a subsequence of A132236 (primes, 29 mod 30).

Examples

			For n=11, the numbers 11, 13, 41, 43, are primes.
		

Crossrefs

Cf. A077800 (twin primes), A001359, A132232, A132236, A141860, A181603 (twins, end 1), A181605 (twins, end 7), A181606 (twins, end 9).

Programs

  • Mathematica
    a247089[n_] := Select[Prime@ Range@ n, And[PrimeQ[# + 2], PrimeQ[# + 30], PrimeQ[# + 32]] &]; a247089[1100] (* Michael De Vlieger, Jan 11 2015 *)
  • Python
    from sympy import isprime
    for n in range(1,10000001,2):
      if isprime(n) and isprime(n+2) and isprime(n+30) and isprime(n+32): print(n,end=', ')

A248523 Initial members of prime quadruples (n, n+2, n+144, n+146).

Original entry on oeis.org

5, 137, 1787, 1997, 2237, 2657, 3527, 4127, 4337, 4787, 8087, 12107, 13757, 14447, 17987, 19697, 21377, 23057, 23687, 31247, 32297, 34157, 34367, 35447, 37547, 38567, 39227, 43397, 48677, 51197, 51827, 53087, 58907, 65027, 65837
Offset: 1

Views

Author

Karl V. Keller, Jr., Jan 11 2015

Keywords

Comments

This sequence is prime n, where there exist two twin prime pairs of (n,n+2), (n+144,n+146).
Excluding 5, this is a subsequence of each of the following: A128468 (a(n)=30*n+17), A039949 (Primes of the form 30n-13), A181605 (twin primes ending in 7).

Examples

			For n=137, the numbers 137, 139, 281, 283, are primes.
		

Crossrefs

Cf. A077800 (twin primes), A128468, A039949, A181605.

Programs

  • Python
    from sympy import isprime
    for n in range(1,10000001,2):
        if isprime(n) and isprime(n+2) and isprime(n+144) and isprime(n+146): print(n,end=', ')

A248661 Initial members of prime quadruples (n, n+2, n+54, n+56).

Original entry on oeis.org

5, 17, 137, 227, 827, 1427, 1667, 1877, 2027, 2087, 2657, 3527, 3767, 4217, 4967, 10037, 11117, 11777, 12107, 13877, 17987, 19697, 20717, 21557, 22037, 23687, 24977, 27527, 27737, 34157, 37307, 41177, 42017, 42407, 47657, 48677
Offset: 1

Views

Author

Karl V. Keller, Jr., Jan 11 2015

Keywords

Comments

This sequence is prime n, where there exist two twin prime pairs of (n,n+2), (n+54,n+56).
Excluding 5, this is a subsequence of each of the following: A128468 (a(n)=30*n+17), A039949 (primes, 30n-13), A181605 (twin primes, end 7), and A092340 (prime n, where n^2+2*n divides (fibonacci(n^2)+fibonacci(2*n))).

Examples

			For n=17, the numbers 17, 19, 71, 73, are primes.
		

Crossrefs

Cf. A077800 (twin primes), A128468, A039949, A181605, A092340.

Programs

  • Python
    from sympy import isprime
    for n in range(1,10000001,2):
      if isprime(n) and isprime(n+2) and isprime(n+54) and isprime(n+56): print(n,end=', ')
Showing 1-10 of 10 results.