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.

A049438 p, p+6 and p+8 are all primes (A046138) but p+2 is not.

Original entry on oeis.org

23, 53, 131, 173, 233, 263, 563, 593, 653, 1013, 1223, 1283, 1601, 1613, 2333, 2543, 2963, 3323, 3533, 3761, 3911, 3923, 4013, 4211, 4253, 4643, 4793, 5003, 5273, 5471, 5843, 5861, 6263, 6353, 6563, 6653, 6863, 7121, 7451, 7481, 7541, 7583
Offset: 1

Views

Author

Keywords

Crossrefs

Subsequence of A031924. - R. J. Mathar, Jun 15 2013

Programs

  • Mathematica
    Select[Prime@ Range[10^3], MatchQ[Boole@ PrimeQ@ {# + 2, # + 6, # + 8}, {0, 1, 1}] &] (* Michael De Vlieger, Feb 05 2017 *)
  • PARI
    isok(p) = isprime(p) && !isprime(p+2) && isprime(p+6) && isprime(p+8); \\ Michel Marcus, Dec 13 2013

A023202 Primes p such that p + 8 is also prime.

Original entry on oeis.org

3, 5, 11, 23, 29, 53, 59, 71, 89, 101, 131, 149, 173, 191, 233, 263, 269, 359, 389, 401, 431, 449, 479, 491, 563, 569, 593, 599, 653, 683, 701, 719, 743, 761, 821, 911, 929, 983, 1013, 1031, 1061, 1109, 1163, 1193, 1223, 1229, 1283, 1289, 1319, 1373, 1439
Offset: 1

Views

Author

Keywords

Comments

All terms > 3 are congruent to 5 mod 6 (observation by Zak Seidov in SeqFan). Thus each corresponding p + 8 is congruent to 1 mod 6. - Rick L. Shepherd, Mar 25 2023

Crossrefs

Programs

A049437 Primes p such that p+2 and p+8 are also primes but p+6 is not.

Original entry on oeis.org

3, 29, 59, 71, 149, 269, 431, 569, 599, 1031, 1061, 1229, 1289, 1319, 1451, 1619, 2129, 2339, 2381, 2549, 2711, 2789, 3299, 3539, 4019, 4049, 4091, 4649, 4721, 5099, 5441, 5519, 5639, 5741, 5849, 6269, 6359, 6569, 6701, 6959, 7211
Offset: 1

Views

Author

Keywords

Comments

p+4 is not prime here except for p=3.

Examples

			p=29 is the smallest prime so that p, p+2 and p+8 are consecutive primes.
		

Crossrefs

Subsequence of A001359. - R. J. Mathar, Feb 10 2013

Programs

  • Magma
    [p: p in PrimesUpTo(8000)| IsPrime(p+2) and IsPrime(p+8) and not IsPrime(p+6) ] // Vincenzo Librandi, Jan 28 2011
    
  • Maple
    select(p -> isprime(p) and isprime(p+2) and isprime(p+8) and not isprime(p+6), [3, seq(i,i=5..10000, 6)]); # Robert Israel, Nov 20 2017
  • Mathematica
    {3}~Join~Select[Partition[Prime@ Range[10^3], 3, 1], Differences@ # == {2, 6} &][[All, 1]] (* Michael De Vlieger, Nov 20 2017 *)
  • PARI
    lista(nn) = forprime(p=3, nn, if(isprime(p+2) && isprime(p+8) && !isprime(p+6), print1(p, ", "))) \\ Iain Fox, Nov 20 2017

A049436 p, p+8 and either p+2 or p+6 or both are all primes.

Original entry on oeis.org

3, 5, 11, 23, 29, 53, 59, 71, 101, 131, 149, 173, 191, 233, 263, 269, 431, 563, 569, 593, 599, 653, 821, 1013, 1031, 1061, 1223, 1229, 1283, 1289, 1319, 1451, 1481, 1601, 1613, 1619, 1871, 2081, 2129, 2333, 2339, 2381, 2543, 2549, 2711, 2789, 2963, 3251
Offset: 1

Views

Author

Keywords

Examples

			3 is here because 5, 7 and 11 are primes; 5 is here because 7, 11 and 13 are primes.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[500]],PrimeQ[#+8]&&AnyTrue[#+{2,6},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 04 2017 *)

A144842 Numbers k such that the three numbers k+3, k-3 and k+5 are all prime.

Original entry on oeis.org

8, 14, 26, 56, 104, 134, 176, 194, 236, 266, 566, 596, 656, 824, 1016, 1226, 1286, 1484, 1604, 1616, 1874, 2084, 2336, 2546, 2966, 3254, 3326, 3464, 3536, 3764, 3914, 3926, 4016, 4214, 4256, 4646, 4796, 5006, 5276, 5474, 5654, 5846, 5864, 6266, 6356, 6566
Offset: 1

Views

Author

Giovanni Teofilatto, Sep 22 2008

Keywords

Comments

Subset of A087695. - R. J. Mathar, Sep 24 2008

Crossrefs

Programs

  • Mathematica
    Select[Range[7000], And @@ PrimeQ[# + {-3, 3, 5}] &] (* Amiram Eldar, Apr 14 2022 *)
  • Python
    from sympy import isprime
    def ok(n): return n > 4 and isprime(n-3) and isprime(n+3) and isprime(n+5)
    print(list(filter(ok, range(6567)))) # Michael S. Branicky, Aug 14 2021

Formula

a(n) = A046138(n) + 3. - R. J. Mathar, Sep 24 2008

Extensions

Definition edited and extended by R. J. Mathar, Sep 24 2008

A185718 For positive n with prime decomposition n = Product_{j=1..m} (p_j^k_j) define A_n = Sum_{j=1..m} (p_j*k_j) and B_n = Sum_{j=1..m} (p_j^k_j). This sequence gives those n for which A_n and B_n are both prime and B_n = A_n + 2 (i.e., form a twin prime pair).

Original entry on oeis.org

40, 88, 184, 424, 808, 1048, 1384, 1528, 1864, 2104, 2184, 3080, 4504, 4744, 5224, 5928, 6440, 6568, 7224, 8104, 8360, 8840, 9784, 10264, 10472, 11480, 11544, 11848, 12808, 12904, 14136, 14840, 14968, 16280, 16648, 18664, 19608, 20344, 21080, 22040, 23240, 23704, 24440, 24648, 24920, 26008, 26584, 27384, 27608, 27688, 28264, 28952, 29240
Offset: 1

Views

Author

Bobby Browning, Feb 10 2011

Keywords

Comments

Assuming the twin prime conjecture, my advisor and I are able to prove there are infinitely many of these pairs. In other words, there are infinitely many n such that A_n and B_n are prime and B_n = A_n + 2.
From Bobby Browning, Feb 14 2011: (Start)
8*A046138 is a subsequence of A185718 for the following reasons:
i) the n in A185718 for which A_n and B_n form a twin prime pair are of the form n=2^3*p_1*p_2*...p_k.
ii) the A046138 sequence consists of primes p such that p+6 and p+8 form a twin prime pair.
iii) so if p is a prime such that p+6 and p+8 form a twin prime pair and n = 2^3*p then A_n = p+6 and B_n = p+8. Thus, the integers such that n = 2^3*p are a subsequence of A185718. (End)

Examples

			a(1) = 40  = 2^3*5^1, with a = 11 and b = 13.
a(2) = 88  = 2^3*11^1 with a = 17 and b = 19.
a(3) = 184 = 2^3*23^1 with a = 29 and b = 31.
		

Crossrefs

Cf. A001414 (A_n), A008475 (B_n).

Programs

  • Mathematica
    okQ[n_] := Module[{p, e, a, b}, {p, e} = Transpose[FactorInteger[n]]; a = Plus @@ (p*e); b = Plus @@ (p^e); b == a + 2 && PrimeQ[a] && PrimeQ[b]]; Select[Range[30000], okQ]
  • PARI
    sopfr(n)=my(f=factor(n));sum(i=1,#f[,1],f[i,1]*f[i,2]);
    forstep(n=8,1e5,16,if(issquarefree(n/8)&&isprime(k=sopfr(n))&isprime(k+2), print1(n", ")))

A360758 Numbers k for which k' - 1 and k' + 1 are twin primes, where the prime denotes the arithmetic derivative.

Original entry on oeis.org

4, 8, 9, 35, 36, 64, 65, 68, 77, 81, 112, 160, 161, 185, 188, 208, 209, 221, 225, 236, 335, 341, 371, 377, 428, 437, 441, 485, 515, 576, 596, 611, 671, 707, 731, 736, 756, 767, 779, 783, 792, 851, 868, 899, 917, 952, 965, 972, 1007, 1028, 1067, 1115, 1152, 1157
Offset: 1

Views

Author

Marius A. Burtea, Mar 01 2023

Keywords

Comments

Numbers that have an arithmetic derivative equal to the average of twin prime pairs (A014574).
If p is in A022005 then m = 5*p is a term. Indeed, p is prime and m' = (5*p)' = p + 5 and m' - 1 = p + 4 and m' + 1 = p + 6 which are twin prime numbers.
If p is in A046138 then m = 7*p is a term. Indeed, p is prime and m' = (7*p)' = p + 7 and m' - 1 = p + 6 and m' + 1 = p + 8 which are twin prime numbers.
If p is in A212492 then m = 11*p is a term. Indeed, p is prime and m' = (11*p)' = p + 11 and m' - 1 = p + 10 and m' + 1 = p + 12 which are twin prime numbers.

Examples

			4' =  4, 4' - 1 =  4 - 1 =  3, 4' + 1 =  4 + 1 =  5, so 4 is a term.
8' = 12, 8' - 1 = 12 - 1 = 11, 8' + 1 = 12 + 1 = 13, so 8 is a term.
9' =  6, 9' - 1 =  6 - 1 =  5, 9' + 1 =  6 + 1 =  7, so 9 is a term.
		

Crossrefs

Programs

  • Magma
    f:=func; [p:p in [2..1200]| IsPrime(Floor(f(p))-1) and IsPrime(Floor(f(p))+1)];
  • Mathematica
    d[1] = 0; d[n_] := n * Plus @@ ((Last[#]/First[#]) & /@ FactorInteger[n]); Select[Range[1200], And @@ PrimeQ[d[#] + {-1, 1}] &] (* Amiram Eldar, Mar 01 2023 *)
Showing 1-7 of 7 results.