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 11-20 of 71 results. Next

A206045 Numbers d such that 11 + j*d is prime for j = 0 to 10.

Original entry on oeis.org

1536160080, 4911773580, 25104552900, 77375139660, 83516678490, 100070721660, 150365447400, 300035001630, 318652145070, 369822103350, 377344636200, 511688932650, 580028072610, 638663371710, 701534299830, 745828915650, 776625236100, 883476548850, 925639075620, 956863233690
Offset: 1

Views

Author

Sameen Ahmed Khan, Feb 03 2012

Keywords

Comments

Original name: Values of the difference d for 11 primes in arithmetic progression with the minimal start sequence {11 + j*d}, j = 0 to 10.
The computations were done without any assumptions on the form of d. 21st term is greater than 10^12.
All terms are multiples of 210=2*3*5*7. - Zak Seidov, May 16 2015
Equivalently, integers d such that the longest possible arithmetic progression (AP) of primes with common difference d has exactly 11 elements (see example). These 11 elements are not necessarily consecutive primes. In fact, here, for each term d, there exists only one such AP of primes, and this one always starts with A342309(d) = 11, so this unique AP is (11, 11+d, 11+2d, 11+3d, 11+4d, 11+5d, 11+6d, 11+7d, 11+8d, 11+9d, 11+10d). - Bernard Schott, Mar 08 2023

Examples

			d = 4911773580 then {11, 4911773591, 9823547171, 14735320751, 19647094331, 24558867911, 29470641491, 34382415071, 39294188651, 44205962231, 49117735811} which is 11 primes in arithmetic progression.
		

References

  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 139.

Crossrefs

Common differences for longest possible APs of primes with exactly k elements: A007921 (k=1), A359408 (k=2), A206037 (k=3), A359409 (k=4), A206039 (k=5), A359410 (k=6), A206041 (k=7), A360146 (k=10), this sequence (k=11).

Programs

  • Mathematica
    a = 11; Do[If[PrimeQ[{a, a + d, a + 2*d, a + 3*d, a + 4*d, a + 5*d, a + 6*d, a + 7*d, a + 8*d, a + 9*d, a + 10*d}] == {True, True, True, True, True, True, True, True, True, True, True}, Print[d]], {d, 210,10^12, 210}] (* corrected by Zak Seidov, May 16 2015 *)
    Select[Range[210,10^12,210],AllTrue[Range[0,10]#+11,PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 28 2016 *)
  • PARI
    is(n)=for(j=1,10, if(!isprime(j*n+11), return(0))); 1 \\ Charles R Greathouse IV, May 18 2015

Formula

m is a term iff A123556(m) = 11. - Bernard Schott, Mar 08 2023

Extensions

New name from Charles R Greathouse IV, May 18 2015

A030173 Differences p(i)-p(j) between primes, sorted in numerical order.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 20, 21, 22, 24, 26, 27, 28, 29, 30, 32, 34, 35, 36, 38, 39, 40, 41, 42, 44, 45, 46, 48, 50, 51, 52, 54, 56, 57, 58, 59, 60, 62, 64, 65, 66, 68, 69, 70, 71, 72, 74, 76, 77, 78, 80, 81, 82, 84, 86, 87, 88, 90
Offset: 1

Views

Author

Alexander Grasser [Graesser] (alex(AT)computicket.com)

Keywords

Comments

Conjectured (Polignac 1849) to be union of even numbers and the odd primes minus 2.
For n > 2: A092953(a(n)) > 0. - Reinhard Zumkeller, Nov 10 2012

Crossrefs

Complement of A007921. Cf. A001223, A005843, A040976.

Programs

  • Haskell
    import Data.List.Ordered (union)
    a030173 n = a030173_list !! (n-1)
    a030173_list = union [2, 4 ..] $ tail a040976_list
    -- Reinhard Zumkeller, Jul 03 2015
  • Mathematica
    nn = 90; Union[Range[2, nn, 2], Prime[Range[2, PrimePi[nn+2]]] - 2]
  • PARI
    print1(1);p=3;forprime(q=5,1e3,forstep(n=p-1,q-3,2,print1(", "n));print1(", ",q-2);p=q) \\ conjectural; Charles R Greathouse IV, Jul 02 2011
    
  • PARI
    isOK(n)=if(n%2,isprime(n+2),forprime(p=3,,isprime(n+p)&&return(1)));
    for(n=1,10^100,isOK(n)&print1(n,", ")) \\ unconditionally outputs correct values only, will "hang" forever if conjecture is false once that exceptional even number is reached; Jeppe Stig Nielsen, Sep 23 2015
    

A206039 Values of the difference d for 5 primes in arithmetic progression with the minimal start sequence {5 + j*d}, j = 0 to 4.

Original entry on oeis.org

6, 12, 42, 48, 96, 126, 252, 426, 474, 594, 636, 804, 1218, 1314, 1428, 1566, 1728, 1896, 2106, 2574, 2694, 2898, 3162, 3366, 4332, 4368, 4716, 4914, 4926, 4962, 5472, 5586, 5796, 5838, 6048, 7446, 7572, 7818, 8034, 8958, 9168, 9204, 9714
Offset: 1

Views

Author

Sameen Ahmed Khan, Feb 03 2012

Keywords

Comments

The computations were done without any assumptions on the form of d.
All terms are multiples of 6. - Zak Seidov, Jan 07 2014
Equivalently, integers d such that the largest possible arithmetic progression (AP) of primes with common difference d has exactly 5 elements (see example). These 5 elements are not necessarily consecutive primes. In fact, for each term d, there exists only one such AP of primes, and this one always starts with A342309(d) = 5, so this unique AP is (5, 5+d, 5+2d, 5+3d, 5+4d). - Bernard Schott, Jan 25 2023

Examples

			d = 12 then {5, 5 + 1*12, 5 + 2*12, 5 + 3*12, 5 + 4*12} = {5, 17, 29, 41, 53}, which is 5 primes in arithmetic progression.
		

Crossrefs

Largest AP of prime numbers with exactly k elements: A007921 (k=1), A359408 (k=2), A206037 (k=3), A359409 (k=4), this sequence (k=5), A359410 (k=6), A206041 (k=7), A360146 (k=10), A206045 (k=11).

Programs

  • Maple
    filter := d -> isprime(5+d) and isprime(5+2*d) and isprime(5+3*d) and isprime(5+4*d) : select(filter, [$(1 .. 10000)]); # Bernard Schott, Jan 25 2023
  • Mathematica
    t={}; Do[If[PrimeQ[{5, 5 + d, 5 + 2*d, 5 + 3*d, 5 +4*d}] == {True, True, True, True, True}, AppendTo[t, d]], {d, 10000}]; t
    Select[Range[10000],AllTrue[5+#*Range[0,4],PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 09 2015 *)

Formula

m is a term iff A123556(m) = 3. - Bernard Schott, Jan 25 2023

A206041 Values of the difference d for 7 primes in arithmetic progression with the minimal start sequence {7 + j*d}, j = 0 to 6.

Original entry on oeis.org

150, 2760, 3450, 9150, 14190, 20040, 21240, 63600, 76710, 117420, 122340, 134250, 184470, 184620, 189690, 237060, 274830, 312000, 337530, 379410, 477630, 498900, 514740, 678750, 707850, 1014540, 1168530, 1180080, 1234530, 1251690, 1263480, 1523520, 1690590
Offset: 1

Views

Author

Sameen Ahmed Khan, Feb 03 2012

Keywords

Comments

The computations were done without any assumptions on the form of d.
All terms are multiples of 30. - Zak Seidov, Jan 07 2014.
Equivalently, integers d such that the longest possible arithmetic progression (AP) of primes with common difference d has exactly 7 elements (see example). These 7 elements are not necessarily consecutive primes. In fact, for each term d, there exists only one such AP of primes, and this one always starts with A342309(d) = 7, so this unique AP is (7, 7+d, 7+2d, 7+3d, 7+4d, 7+5d, 7+6d). - Bernard Schott, Feb 12 2023

Examples

			d = 150 then {7, 7 + 1*150, 7 + 2*150, 7 + 3*150, 7 + 4*150, 7 + 5*150, + 7 + 6*150} = {7, 157, 307, 457, 607, 757, 907} which is 7 primes in arithmetic progression.
		

Crossrefs

Longest AP of prime numbers with exactly k elements: A007921 (k=1), A359408 (k=2), A206037 (k=3), A359409 (k=4), A206039 (k=5), A359410 (k=6), this sequence (k=7), A360146 (k=10), A206045 (k=11).

Programs

  • Maple
    filter := d -> isprime(7+d) and isprime(7+2*d) and isprime(7+3*d) and isprime(7+4*d) and isprime(7+5*d) and isprime(7+6*d): select(filter, [$(1 .. 1700000)]); # Bernard Schott, Feb 13 2023
  • Mathematica
    a = 7; t = {}; Do[If[PrimeQ[{a, a + d, a + 2*d, a + 3*d, a + 4*d, a + 5*d, a + 6*d}] == {True, True, True, True, True, True, True}, AppendTo[t,d]], {d, 200000}]; t

Formula

m is a term iff A123556(m) = 7. - Bernard Schott, Feb 12 2023

A103728 Coefficients of numerator polynomials of g.f.s for a certain necklace problem involving prime numbers.

Original entry on oeis.org

1, 0, 1, -1, 1, 1, -3, 5, -3, 1, 1, -5, 13, -17, 13, -5, 1, 1, -9, 41, -109, 191, -229, 191, -109, 41, -9, 1, 1, -11, 61, -203, 457, -731, 853, -731, 457, -203, 61, -11, 1, 1, -15, 113, -527, 1713, -4111, 7537, -10767, 12113, -10767, 7537, -4111, 1713, -527, 113, -15, 1, 1, -17, 145, -773, 2899, -8117, 17587
Offset: 1

Views

Author

Wolfdieter Lang, Feb 24 2005

Keywords

Comments

The row polynomials P(n,x) := Sum_{k=0..p(n)-1} a(n,k)*x^k, n >= 1, appear in the numerator of the g.f. G(p(n),x) for the numbers N(p(n),m) of inequivalent m-bead necklaces of two colors with p(n) beads of one color and m-p(n) beads of the other color. Here p(n)=A000040(n) (prime numbers). Equivalently, N(p(n),m) counts inequivalent necklaces with p(n) beads which are labeled with nonnegative numbers, such that the sum of the labels is m. For a proof of this equivalent formulation see a comment in A032191. Inequivalence is meant with respect to the cyclic group C_p(n).
This necklace g.f. is G(p(n),x) = P(n,x)/((1-x^p(n))*(1-x)^(p(n)-1)), n >= 1. The row polynomials P(n,x) are defined above. This g.f. is Z(C_p(n),x), the two variable (x[1] and x[p(n)]) cycle index polynomial for the cyclic group of prime order p(n), with substitution x[1]->1/(1-x^1)and x[p(n)]->1/(1-x^p(n)). This follows by Polya enumeration if the above mentioned labeled necklace problem is solved.
The row length sequence for this array a(n,k) is A000040(n) (n-th prime number), [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, ...].
The rows of this signed array are symmetric: a(n,k) = a(n,p(n)-1-k), n >= 2, k = 0..(p(n)-1)/2. See the explicit formula below.
The formulas for a(n,k), given below, produces in fact integers.
G.f. for column k, k>=0 (without leading zeros): sum(A103718(k,m)*p(n)^m,m=0..k)/k! produces for all n> pi(n) integers, where pi(n):=A000720(n), primes not exceeeding n.

Examples

			Triangle begins:
  [1, -0];
  [1, -1,  1];
  [1, -3,  5,  -3,   1];
  [1, -5, 13, -17,  13,   -5,   1];
  [1, -9, 41,-109, 191, -229, 191, -109, 41, -9, 1];
  ...
n=3: G(p(3),x)=G(5,x)=(1-3*x+5*x^2-3*x^3+1*x^4)/((1-x^5)*(1-x)^4) generates the necklace sequence A008646.
A103718(3,m), m=0..3, is [17,-17,7,-1]. Therefore (17-17*p(n)+7*p(n)^2-1*p(n)^3 )/3! gives, for n>=1, the third column [ -3,-17,-109,...].
		

Crossrefs

The unsigned column sequences are for k=0..10: A000012 (powers of 1), A040976 (primes p(n)-2), A103729 - A103914, A103915.

Formula

a(n, k) = (1 + ((-1)^k)*(p(n)-1)*binomial(p(n)-1, k))/p(n), with p(n): = A000040(n) (n-th prime).
a(n, k) = sum(A103718(k, m)*p(n)^m, m=0..k)/k!, (row polynomials of triangle A103718 with x=p(n), divided by k!).

A359408 Integers d such that the longest possible arithmetic progression (AP) of primes with common difference d has only two elements.

Original entry on oeis.org

1, 3, 5, 9, 11, 15, 16, 17, 21, 22, 26, 27, 29, 32, 35, 39, 41, 44, 45, 46, 51, 52, 56, 57, 58, 59, 62, 65, 69, 70, 71, 74, 76, 77, 81, 82, 86, 87, 88, 92, 95, 99, 100, 101, 105, 105, 106, 107, 111, 112, 116, 118, 122, 125, 128, 129, 130, 135, 136, 137, 140, 142, 146, 147, 148, 149, 152, 155
Offset: 1

Views

Author

Bernard Schott, Dec 30 2022

Keywords

Comments

As '2 is prime' and also '2 is one less than prime 3' (see A173919), there exist two subsequences with k = 2 elements in these APs of primes (see examples).
1. If d is an odd term, then d is in A040976 \ {0} with d = prime(m) - 2, for some m >= 2, and, for each such d, there exists only one longest possible AP of primes, and this AP is always: (2, prime(m)) = (2, d+2), so starts with 2. This subsequence corresponds to the first case: '2 is prime'.
2. If d is an even term, then d is in A360735 and the longest corresponding APs of primes are of the form (q, q+d) with q odd primes. This subsequence corresponds to the second case '2 is one less than prime 3'.
A342309(d) gives the first element of the smallest AP with 2 elements whose common difference is a(n) = d.
The two elements of these APs are not necessarily consecutive primes.

Examples

			d = 1 is a term because the only longest AP of primes with common difference 1 is (2, 3) that has 2 elements because 4 is composite.
d = 3 is a term because the only longest AP of primes with common difference 3 is (2, 5) that has 2 elements because 8 is composite.
d = 5 is a term because the only longest AP of primes with common difference 5 is (2, 7) that has 2 elements because 12 is composite.
d = 16 is a term because the first longest APs of primes with common difference 16 are (3, 19), (7,23), (13, 29), ... that all have 2 elements; the first one that starts with A342309(16) = 3 is (3, 19).
d = 22 is a term because the first longest APs of primes with common difference 22 are (7, 29), (19, 41), (31, 53), ... that all have 2 elements; the first one that starts with A342309(22) = 7 is (7, 29).
		

Crossrefs

Equals disjoint union of A040976 \ {0} and A360735.
Longest AP of prime numbers with exactly k elements: A007921 (k=1), this sequence (k=2), A206037 (k=3), A359409 (k=4), A206039 (k=5), A359410 (k=6), A206041 (k=7), A360146 (k=10), A206045 (k=11)

Programs

  • Maple
    filter := d -> irem(d, 2) = 0 and irem(d, 3) <> 0 and not isprime(3+d) or irem(d, 2) = 0 and irem(d, 3) <> 0 and isprime(3+d) and not isprime(3+2*d) or isprime(d+2) : select(filter, [$(1 .. 155)]);
  • Mathematica
    Select[Range[155], Mod[#,2]==0 && Mod[#,3]!=0 && !PrimeQ[3+#] || Mod[#,2]==0 && Mod[#,3]!=0 && PrimeQ[3+#] && !PrimeQ[3+2#] || PrimeQ[#+2] &] (* Stefano Spezia, Jan 08 2023 *)

Formula

m is a term iff A123556(m) = 2.

A206042 Values of the difference d for 8 primes in arithmetic progression with the minimal start sequence {11 + j*d}, j = 0 to 7.

Original entry on oeis.org

1210230, 2523780, 4788210, 10527720, 12943770, 19815600, 22935780, 28348950, 28688100, 32671170, 43443330, 47330640, 51767520, 54130440, 59806740, 60625110, 63721770, 66761940, 77811300, 80892420, 87931620, 90601140, 102994500, 108310650, 115209570, 117639480
Offset: 1

Views

Author

Sameen Ahmed Khan, Feb 03 2012

Keywords

Comments

The computations were done without any assumptions on the form of d.

Examples

			d = 2523780 then {11 + j*d}, j = 0 to 7, is {11, 2523791, 5047571, 7571351, 10095131, 12618911, 15142691, 17666471} which is 8 primes in arithmetic progression.
		

Crossrefs

Programs

  • Mathematica
    a = 11; t = {}; Do[If[PrimeQ[{a, a + d, a + 2*d, a + 3*d, a + 4*d, a + 5*d, a + 6*d, a + 7*d}] == {True, True, True, True, True, True, True, True},
       AppendTo[t,d]], {d, 0, 200000000}]; t
    Select[Range[117640000],AllTrue[11+#*Range[0,7],PrimeQ]&] (* Harvey P. Dale, Dec 31 2021 *)

A206044 Values of the difference d for 10 primes in arithmetic progression with the minimal start sequence {11 + j*d}, j = 0 to 9.

Original entry on oeis.org

224494620, 246632190, 301125300, 1536160080, 1760583300, 4012387260, 4911773580, 7158806130, 8155368060, 15049362300, 15908029410, 18191167890, 21238941150, 22519921410, 25104552900, 25837762860, 27109731180, 27380574480, 27925987530, 29165157630
Offset: 1

Views

Author

Sameen Ahmed Khan, Feb 03 2012

Keywords

Comments

The computations were done without any assumptions on the form of d. 181st term is greater than 10^12.

Examples

			d = 301125300 then {11, 301125311, 602250611, 903375911, 1204501211, 1505626511, 1806751811, 2107877111, 2409002411, 2710127711} which is 10 primes in arithmetic progression.
		

Crossrefs

Programs

  • Mathematica
    a = 11; Do[If[PrimeQ[{a, a + d, a + 2*d, a + 3*d, a + 4*d, a + 5*d, a + 6*d, a + 7*d, a + 8*d, a + 9*d}] == {True, True, True, True, True, True, True, True, True, True}, Print[d]], {d, 600000000, 2}]

Extensions

Typo in Name fixed by Zak Seidov, Jan 12 2014

A059861 a(n) = Product_{i=2..n} (prime(i) - 2).

Original entry on oeis.org

1, 1, 3, 15, 135, 1485, 22275, 378675, 7952175, 214708725, 6226553025, 217929355875, 8499244879125, 348469040044125, 15681106801985625, 799736446901266875, 45584977473372211875, 2689513670928960500625
Offset: 1

Views

Author

Labos Elemer, Feb 28 2001

Keywords

Comments

Arises in Hardy-Littlewood k-tuple conjecture. Also a(n) is the exact number of d=2 and also d=4 differences in dRRS[modulus=n-th primorial]; see A049296 (dRRS[m]=set of first differences of reduced residue system modulo m).
For n>1 this is the determinant of the (n-1) X (n-1) matrix whose diagonal is A006093(n) = {1, 2, 4, 6, 10, 12, 16, 18..} = the first primes minus 1 and all other elements are 1's. The determinant begins: / (2-1) 1 1 1 1 1 1 ... / 1 (3-1) 1 1 1 1 1 ... / 1 1 (5-1) 1 1 1 1 ... / 1 1 1 (7-1) 1 1 1 ... / 1 1 1 1 (11-1) 1 1 ... / 1 1 1 1 1 (13-1) 1 ... - Alexander Adamchuk, May 21 2006
From Gary W. Adamson, Apr 21 2009: (Start)
Equals (-1)^n * (1, 1, 1, 3, 15, ...) dot (1, -2, 4, -6, 10, ...).
a(6) = 135 = (1, 1, 1, 3, 15) dot (1, -2, 4, -6, 10) = (1, -2, 4, -18, 150). (End)

Examples

			n=4, a(4) = 1*(3-2)*(5-2)*(7-2) = 15. 48 first terms of A049296 give one complete period of dRRS[210], in which 15 d=2, 15 d=4 and 18 larger differences occur. For n=1, 2, ..., 5 in the periods of length {1, 2, 8, 48, 480, ...} [see A005867] the number of d=2 and also d=4 differences is {1, 1, 3, 15, 135, ..}
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 84-94.
  • R. K. Guy, Unsolved Problems in Number Theory, Sections A8, A1.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979.
  • G. Polya, Mathematics and Plausible Reasoning, Vol. II, Appendix Princeton UP, 1954.

Crossrefs

Programs

  • Mathematica
    Table[ Det[ DiagonalMatrix[ Table[ Prime[i-1] - 2, {i, 2, n} ] ] + 1 ], {n, 2, 20} ] (* Alexander Adamchuk, May 21 2006 *)
    Table[Product[Prime@k - 2, {k, 2, n}], {n, 1, 18}] (* Harlan J. Brothers, Jul 02 2018 *)
    a[1] = 1; a[n_] := a[n] = a[n - 1] (Prime[n] - 2);
    Table[a[n], {n, 18}]  (* Harlan J. Brothers, Jul 02 2018 *)
    Join[{1},FoldList[Times,Prime[Range[2,20]]-2]] (* Harvey P. Dale, Apr 19 2023 *)
  • PARI
    a(n) = prod(i=2, n, prime(i)-2); \\ Michel Marcus, Apr 16 2017

Formula

a(n) = Det[ DiagonalMatrix[ Table[ Prime[i-1] - 2, {i, 2, n} ] ] + 1 ] for n>1. - Alexander Adamchuk, May 21 2006
a(n) = a(n-1) * (A000040(n) - 2) for n > 1. - A.H.M. Smeets, Dec 14 2019
a(n) = |{r | 0 <= r < primorial(n) and gcd(r, primorial(n)) = 1 and gcd(r + 2, primorial(n)) = 1}|. - Greg Tener, Oct 22 2021

Extensions

Offset corrected by A.H.M. Smeets, Dec 14 2019

A173919 Numbers that are prime or one less than a prime.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 16, 17, 18, 19, 22, 23, 28, 29, 30, 31, 36, 37, 40, 41, 42, 43, 46, 47, 52, 53, 58, 59, 60, 61, 66, 67, 70, 71, 72, 73, 78, 79, 82, 83, 88, 89, 96, 97, 100, 101, 102, 103, 106, 107, 108, 109, 112, 113, 126, 127, 130, 131, 136, 137, 138, 139
Offset: 1

Views

Author

Giovanni Teofilatto, Mar 02 2010

Keywords

Comments

Indices of the triangular numbers in A147846.
Integers k such that k or k+1 is prime. - Giovanni Teofilatto, Mar 05 2010
For a given common difference d, there always exists a longest possible arithmetic progression (AP) of primes, and the number of elements k in this AP of primes is necessarily a term of this sequence. See A123556 for explanations. - Bernard Schott, Mar 18 2023

Crossrefs

Complement to A068780. [Giovanni Teofilatto, Mar 11 2010]

Programs

  • Mathematica
    {#-1,#}&/@Prime[Range[40]]//Flatten//Union (* Harvey P. Dale, Dec 21 2018 *)

Formula

Extensions

Definition corrected and sequence extended by R. J. Mathar, Feb 24 2010, Mar 05 2010
Previous Showing 11-20 of 71 results. Next