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.

Previous Showing 91-100 of 119 results. Next

A360016 Number of partitions of 4*n into four odd primes (p_1, p_2, p_3, p_4) (p_1 < p_2 <= p_3 < p_4 and p_1 + p_4 = p_2 + p_3 = 2*n) such that (p_1, p_2) and (p_3, p_4) are consecutive pairs of prime numbers with the same difference, d = p_2 - p_1 = p_4 - p_3, and (p_1, p_3), (p_2, p_4) are also consecutive pairs of prime numbers with the same difference, D = p_3 - p_1 = p_4 - p_2.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0
Offset: 1

Views

Author

Naohiro Nomoto, Jan 21 2023

Keywords

Comments

Two pairs of primes, (q, r) and (s, t), are consecutive pairs of primes with the same difference d = r - q = t - s if there exists no other pair of primes (u, v) having the same difference d and lying between the pairs (q, r) and (s, t).

Examples

			a(57)=2 because there are two such partitions of 228: {43,47,67,71}, {43,53,61,71}.
In the first partition (i.e., p_1 = 43, p_2 = 47, p_3 = 67, p_4 = 71), (43,47) and (67,71) are prime pairs with difference 4 (since p_2 - p_1 = p_4 - p_3 = 4), and they are consecutive among such pairs (i.e., there does not exist any intervening pair of primes with difference 4). It is also true that (43,67) and (47,71) are prime pairs with difference 24 (since p_3 - p_1 = p_4 - p_2 = 24), and they are consecutive among such pairs (i.e., no intervening pair of primes with difference 24 exists).
Similarly, in the second partition (i.e., p_1 = 43, p_2 = 53, p_3 = 61, p_4 = 71), (43,53) and (61,71) are consecutive pairs of prime numbers with difference 10: p_2 - p_1 = p_4 - p_3 = 10, and (43,61) and (53,71) are consecutive pairs of prime numbers with difference 18: p_3 - p_1 = p_4 - p_2 = 18.
		

Crossrefs

Programs

  • PARI
    chk(s, t, d)={forprime(p=s, t, if(isprime(p+d), return(0))); 1}
    a(n) = {my(s=0); forprime(p=3, n, if(isprime(2*n-p), forprime(q=p+1, n, if(isprime(2*n-q) && chk(p+1, 2*n-q-1, q-p) && chk(p+1,q-1,2*n-q-p), s++)))); s} \\ Andrew Howroyd, Feb 03 2023

A384187 Primes p such that p + 6, p^2 + 6, p^3 + 6, p^4 + 6 and p^5 + 6 are primes.

Original entry on oeis.org

1361, 70216961, 71317991, 311153281, 371383381, 385230821, 400675721, 466490881, 487757861, 620258761, 818694271, 822486341, 888942491, 898259491, 1102784471, 1423261241, 1443957371, 1623698051, 1628827091, 1729743571, 1831375171, 1837091231, 1904579381, 1978478521, 2070333781
Offset: 1

Views

Author

Gonzalo Martínez, May 21 2025

Keywords

Comments

This is a subsequence of A023201: primes p such that p + 6 is also prime (sexy primes).
The largest tuple of primes of the form (p, p + m, p^2 + m, p^3 + m,..., p^k + m), where m is a digit from 1 to 9, is the 6-tuple (p, p + 6, p^2 + 6, p^3 + 6, p^4 + 6, p^5 + 6). Indeed, if m is an odd digit, then p must be 2 and the longest tuple is (2, 2+3, 2^2+3, 2^3+3, 2^4+3).
For p > 2 we consider the cases:
If m = 2, it is satisfied that p^2 + 2 == 0 (mod 3) for all p!= 3. In fact, (p, p + 2, p^2 + 2) are prime only if p = 3.
If m = 4, then p^4 + 4 == 0 (mod 5), for all p!= 5. Then the longest tuple is (p, p + 4, p^2 + 4, p^3 + 4), which are the p primes of A243734
If m = 6, then p^6 + 6 == 0 (mod 7), for all p!= 7. Thus, the largest tuple is (p, p + 6, p^2 + 6, p^3 + 6, p^4 + 6, p^5 + 6), where a(n) gives these primes.
If m = 8, then p^2 + 8 == 0 (mod 3) for all p!=3. In fact, (p, p + 8, p^2 + 8) are prime only if p = 3.

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[32327000]],AllTrue[#^Range[0,5]+6,PrimeQ]&] (* The program generates the first 10 terms of the sequence. *) (* Harvey P. Dale, Jun 13 2025 *)
  • Python
    from sympy import isprime, primerange
    lim = 10**9
    A384187 = []
    for p in primerange(2, lim):
        if isprime(p + 6) and isprime(p**2 + 6) and isprime(p**3 + 6) and isprime(p**4 + 6) and isprime(p**5 + 6):
           A384187.append(p)
    print(", ".join(str(p) for p in A384187))

A384227 Smaller members p of sexy prime pairs (p,p+6) such that both p and p+6 are emirps.

Original entry on oeis.org

31, 73, 107, 733, 1091, 1097, 1103, 1217, 1223, 1231, 3083, 3163, 3251, 3463, 3911, 7187, 7523, 7643, 7681, 9127, 9221, 9491, 9781, 10061, 10247, 10453, 10853, 10987, 11587, 11777, 11783, 11833, 11897, 11903, 11927, 11933, 11953, 12107, 12113, 12547, 12757
Offset: 1

Views

Author

Emanuele Pace, Aug 26 2025

Keywords

Crossrefs

Programs

  • Mathematica
    emirpQ[n_] := emirpQ[n] = n != IntegerReverse[n] && PrimeQ[n] && PrimeQ[IntegerReverse[n]]; Select[Range[13000], emirpQ[#] && emirpQ[# + 6] &] (* Amiram Eldar, Aug 26 2025 *)

A086776 Smaller member of a prime pair (n, n+6) with a square sum.

Original entry on oeis.org

5, 47, 6047, 24197, 31247, 51197, 84047, 151247, 204797, 273797, 387197, 470447, 708047, 806447, 938447, 1804997, 1920797, 1940447, 2060447, 2121797, 2184047, 3150047, 3699197, 6771197, 7411247, 7644047, 8404997, 8652797, 10170047
Offset: 1

Views

Author

Jason Earls, Aug 03 2003

Keywords

Examples

			6047 is a term because it is the smaller member of the prime pair (6047, 6053) and 6047 + 6053 = 12100 = 110^2.
		

Crossrefs

Extensions

Offset 1 from Alois P. Heinz, Jul 27 2019

A090775 6*a(n) is the gap between sexy prime triples in the n-th sexy prime triple triple whose initial term is 5.

Original entry on oeis.org

1, 106, 246, 651, 1351, 1456, 3711, 13301, 21596, 52066, 73361, 96111, 117461, 141226, 158326, 159201, 159811, 169561, 178346, 214376, 240436, 280581, 296766, 301056, 329861, 337786, 377721, 413581, 464171, 473046, 535746, 539371, 572761
Offset: 1

Views

Author

Ray G. Opao, Feb 08 2004

Keywords

Comments

The nine terms in any sexy prime triple triple {{a, b, c}, {d, e, f}, {g, h, i}} may be arranged to form a 3 X 3 magic square [ h a f / c e g / d i b ].

Examples

			a(3)=246 identifies the third sexy prime triple triple whose initial term is 5: {{5, 11, 17}, {5+6*246, 11+6*246, 17+6*246}, {5+2*6*246, 11+2*6*246, 17+2*6*246}} which is equal to {{5, 11, 17}, {1481, 1487, 1493}, {2957, 2963, 2969}}.
		

Crossrefs

A090776 30*a(n) is the gap between sexy prime triples in the n-th sexy prime triple triple whose initial term is 7.

Original entry on oeis.org

12, 24, 55, 62, 90, 262, 1090, 1245, 1459, 2057, 3043, 3296, 7390, 11625, 13961, 26423, 27557, 29833, 48809, 55711, 68794, 70180, 72554, 78025, 84654, 108590, 112321, 117995, 147101, 160730, 176889, 180829, 184182, 203586, 204116, 217587
Offset: 1

Views

Author

Ray G. Opao, Feb 08 2004

Keywords

Comments

The nine terms in any sexy prime triple triple {{a, b, c}, {d, e, f}, {g, h, i}} may be arranged to form a 3 X 3 magic square [ h a f / c e g / d i b ].

Examples

			a(2)=24 identifies the second sexy prime triple triple whose initial term is 7: {{7, 13, 19}, {7+30*24, 13+30*24, 19+30*24}, {7+2*30*24, 13+2*30*24, 19+2*30*24}} which is equal to {{7, 13, 19}, {727, 733, 739}, {1447, 1453, 1459}}.
		

Crossrefs

A090890 30*a(n) is the gap between sexy prime triples in the n-th sexy prime triple triple whose initial term is 11.

Original entry on oeis.org

291, 564, 742, 2639, 4319, 5278, 5408, 7431, 10119, 10413, 11085, 14056, 14672, 19002, 23492, 26737, 31962, 33912, 35308, 36743, 37870, 45602, 54348, 56693, 59353, 60211, 64397, 64509, 65391, 72562, 92617, 94609, 106309, 114552, 142160
Offset: 1

Views

Author

Ray G. Opao, Feb 16 2004

Keywords

Comments

The nine terms in any sexy prime triple triple {{a, b, c}, {d, e, f}, {g, h, i}} may be arranged to form a 3 X 3 magic square [ h a f / c e g / d i b ].

Examples

			a(2)=564 identifies the second sexy prime triple triple whose initial term is 11: {{11, 17, 23}, {11+30*564, 17+30*564, 23+30*564}, {11+2*30*564, 17+2*30*564, 23+2*30*564}} which is equal to {{11, 17, 23}, {16931, 16937, 16943}, {33851, 33857, 33863}}.
		

Crossrefs

A090891 30*a(n) is the gap between sexy prime triples in the n-th sexy prime triple triple whose initial term is 17.

Original entry on oeis.org

18, 21, 49, 130, 1383, 2660, 3245, 5730, 9569, 10735, 11018, 12054, 13528, 18249, 19222, 21483, 22029, 31665, 31899, 37804, 40576, 59322, 59353, 59966, 65020, 65972, 73843, 80938, 82716, 84445, 85365, 89866, 92586, 103639, 105158, 107149
Offset: 1

Views

Author

Ray G. Opao, Feb 16 2004

Keywords

Comments

The nine terms in any sexy prime triple triple {{a, b, c}, {d, e, f}, {g, h, i}} may be arranged to form a 3 X 3 magic square [ h a f / c e g / d i b ].

Examples

			a(2)=21 identifies the second sexy prime triple triple whose initial term is 17: {{17, 23, 29}, {17+30*21, 23+30*21, 29+30*21}, {17+2*30*21, 23+2*30*21, 29+2*30*21}} which is equal to {{17, 23, 29}, {647, 653, 659}, {1277, 1283, 1289}}.
		

Crossrefs

A092445 a(n) is the first term of the sexy prime quadruple a(n), a(n)+6, a(n)+12 and a(n)+18 that becomes a perfect square if the rightmost digit (1) is removed.

Original entry on oeis.org

11, 41, 251, 641, 4001, 68891, 121001, 163841, 198811, 466561, 497291, 1115561, 2560361, 6561001, 6806251, 7516891, 11793961, 13712411, 34633211, 47436841, 52670251, 71824001, 84739211
Offset: 1

Views

Author

Ray G. Opao, Mar 24 2004

Keywords

Examples

			a(6)=68891. Removing the rightmost digit results in 6889 = 83^2.
		

Crossrefs

A095961 If p(x) is the x-th prime, then the n-th set of 2 consecutive sexy prime pairs starts at p(a(n)).

Original entry on oeis.org

9, 16, 21, 37, 54, 56, 71, 74, 84, 100, 103, 105, 108, 165, 185, 200, 208, 216, 243, 255, 271, 273, 298, 345, 347, 349, 354, 356, 372, 412, 464, 466, 494, 504, 506, 521, 554, 559, 603, 627, 630, 660, 668, 682, 684, 709, 711, 720, 762, 767, 769, 787, 789, 814
Offset: 1

Views

Author

Ray G. Opao, Jul 15 2004

Keywords

Examples

			a(2)=16. p(16)=53 and p(17)=59, the first sexy prime pair. p(18)=61 and p(19)=67, the second sexy prime pair.
		

Crossrefs

Previous Showing 91-100 of 119 results. Next