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

A174048 Prime(A173919(n)).

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 29, 31, 37, 41, 53, 59, 61, 67, 79, 83, 107, 109, 113, 127, 151, 157, 173, 179, 181, 191, 199, 211, 239, 241, 271, 277, 281, 283, 317, 331, 349, 353, 359, 367, 397, 401, 421, 431, 457, 461, 503, 509, 541, 547, 557, 563, 577, 587, 593, 599
Offset: 1

Views

Author

Giovanni Teofilatto, Mar 06 2010

Keywords

Crossrefs

Extensions

More terms from R. J. Mathar, Apr 22 2010

A174163 a(n) = (A173919(k)*A173919(k+1))/2.

Original entry on oeis.org

1, 3, 6, 10, 15, 21, 35, 55, 66, 78, 104, 136, 153, 171, 209, 253, 322, 406, 435, 465, 558, 666, 740, 820, 861, 903, 989, 1081, 1222, 1378, 1537, 1711, 1770, 1830, 2013, 2211, 2345, 2485, 2556, 2628, 2847, 3081, 3239, 3403, 3652, 3916, 4272, 4656, 4850, 5050, 5151, 5253
Offset: 1

Views

Author

Giovanni Teofilatto, Mar 10 2010

Keywords

Comments

Triangular numbers are (n*(n+1))/2 with n or n+1 twin prime
a(n)+a(n+1) is square: 1,4,9,16,25,36,121,144,289,324...

Crossrefs

Extensions

Corrected definition and insert a comment Giovanni Teofilatto, Apr 13 2010
Corrected definition and extended Giovanni Teofilatto, Apr 14 2010
Missing numbers (35, 104 etc.) inserted by R. J. Mathar, Aug 23 2010

A123556 Number of elements in longest possible arithmetic progression of primes with difference n.

Original entry on oeis.org

2, 3, 2, 3, 2, 5, 1, 3, 2, 3, 2, 5, 1, 3, 2, 2, 2, 4, 1, 3, 2, 2, 1, 4, 1, 2, 2, 3, 2, 6, 1, 2, 1, 3, 2, 4, 1, 3, 2, 3, 2, 5, 1, 2, 2, 2, 1, 5, 1, 3, 2, 2, 1, 4, 1, 2, 2, 2, 2, 6, 1, 2, 1, 3, 2, 4, 1, 3, 2, 2, 2, 4, 1, 2, 1, 2, 2, 4, 1, 3, 2, 2, 1, 4, 1, 2, 2, 2, 1, 6, 1, 2, 1, 3, 2, 5, 1, 3, 2, 2, 2, 4, 1, 3, 2
Offset: 1

Views

Author

David W. Wilson, Nov 15 2006, revised Nov 25 2006

Keywords

Comments

Length of n-th row of A124064.
The corresponding smallest term of the first such longest possible arithmetic progression of primes with common difference n is A342309(n). - Bernard Schott, Oct 12 2021
From Bernard Schott, Feb 24 2023: (Start)
For every positive integer n, there exists a smallest prime p that does not divide n = A053669(n); then, an AP of k primes with common difference n cannot contain more terms than this value of p so k <= p, moreover, the longest possible APs of primes have p-1 or p elements.
Proof: consider the AP of p elements (q, q+n, q+2*n, q+3*n, ..., q+(p-1)*n) with common difference n, q prime and p is the smallest prime that does not divide n; the modular arithmetic modulo p gives this set of remainders with p elements: {0, 1, 2, ..., p-1}, so there is always a multiple of p in each such AP with p terms, hence length k of longest possible AP of primes is >= p-1 and <= p.
Moreover, when the longest possible AP contains k = p elements, then this unique longest AP must start with p (corresponding to remainder = 0) and the common difference n is a multiple of A151799(p)# and not of p#, where # = primorial = A002110.
Now, always with a common difference n, when the longest possible AP contains k = p-1 elements, these longest APs with p-1 primes can start with p or with another prime q != p, and there are infinitely many such longest APs with p-1 terms (see Properties in Wikipedia link) in this case. When this AP starts with p, the set of remainders is {0, 1, ..., p-2} and when this AP starts with q, then the set of remainders becomes {1, 2, ..., p-1}.
Terms are ordered without repetition in A173919. (End)

Examples

			a(1) = 2 for the AP (arithmetic progression) (2, 3) with A342309(1) = 2.
a(2) = 3 for the AP (3, 5, 7) with A342309(2) = 3.
a(3) = 2 for the AP (2, 5) with A342309(3) = 2.
a(6) = 5 for the AP (5, 11, 17, 23, 29) with A342309(6) = 5.
a(7) = 1 for the AP (2) with A342309(7) = 2.
a(18) = 4 for the AP (5, 23, 41, 59) with A342309(18) = 5.
a(30) = 6 for the AP (7, 37, 67, 97, 127, 157) with A342309(30) = 7.
a(150) = 7 for the AP (7, 157, 307, 457, 607, 757, 907) with A342309(150) = 7.
From _Bernard Schott_, Feb 25 2023: (Start)
For n = 12, p = A053669(12) = 5 and the AP (5, 17, 29, 41, 53) has 5 elements that are primes (the next should be 65 = 5*13), so a(12) = 5. This AP is the unique longest possible AP of primes with a common difference n = 12.
For n = 30, p = A053669(30) = 7 and the AP (7, 37, 67, 97, 127, 157) has 7-1 = 6 elements that are primes (the next should be 187 = 11*17) so a(30) = 6. Also, there are infinitely many such longest APs with common difference 30 and 6 elements. These other longest APs start with primes q that are > p = 7. The first few next q are 107, 359, 541, 2221, 6673, 7457, ...
For n = 60, p = A053669(60) = 7 and the longest AP that starts with 7 is (7, 67, 127) has only 3 elements that are primes (the next should be 187 = 11*17) so a(60) = 6. Also, there are infinitely many such longest APs with common difference 60 and 6 elements. All these longest APs start with primes q that are > p = 7. The first few such q are 11, 53, 641, 5443, 10091, 12457, ... and the smallest such AP is (11, 71, 131, 191, 251, 311). (End)
		

Crossrefs

Sequences such that a(n) = k iff ...: A007921 (a(n)=1), A359408 (a(n)=2), A206037 (a(n)=3), A359409 (a(n)=4), A206039 (a(n)=5), A359410 (a(n)=6), A206041 (a(n)=7), A360146 (a(n)=10), A206045 (a(n)=11).

Programs

  • PARI
    A053669(n) = forprime(p=2, , if(n%p, return(p)));
    a(n) = my(p=A053669(n)); for (i=1, p-1, if (!isprime(p+i*n), return(p-1))); p; \\ Michel Marcus, Feb 26 2023

Formula

Assume the k-tuples conjecture. Let p = A053669(n). If the arithmetic progression of p elements starting at p with difference n consists of primes, then a(n) = p, otherwise a(n) = p-1.

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

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.

A360146 Integers d such that the longest possible arithmetic progression (AP) of primes with common difference d has exactly 10 elements.

Original entry on oeis.org

210, 420, 630, 840, 1050, 1260, 1470, 1680, 1890, 2100, 2520, 2730, 2940, 3150, 3360, 3570, 3780, 3990, 4200, 4410, 4830, 5040, 5250, 5460, 5670, 5880, 6090, 6300, 6510, 6720, 7140, 7350, 7560, 7770, 7980, 8190, 8400, 8610, 8820, 9030, 9450, 9660, 9870, 10080, 10290, 10500, 10710, 10920
Offset: 1

Views

Author

Bernard Schott, Mar 09 2023

Keywords

Comments

The 10 elements are not necessarily consecutive primes.
All the terms are positive multiples of 210 = 7# but are not multiples of 11 and also must not belong to A206045, where the first term is 1536160080; indeed, terms d' in A206045 correspond to the longest possible APs of primes that have exactly 11 elements with these common differences d'.
A342309(d) gives the first element of the smallest AP with 10 elements whose common difference is a(n) = d.

Examples

			d = 210 is a term because the longest possible APs of primes with common difference d = 210 all have 10 elements. The first such AP is (199, 409, 619, 829, 1039, 1249, 1459, 1669, 1879, 2089), then 2299 = 11*209.
d = 420 is another term because the longest possible APs of primes with common difference d = 420 all have 10 elements; the first such APs start with 52879, 3544939, ... The smallest one is (52879, 53299, 53719, 54139, 54559, 54979, 55399, 55819, 56239, 56659), then 57079 = 11*5189.
		

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), this sequence (k=10), A206045 (k=11).

Programs

  • PARI
    A053669(n) = forprime(p=2, , if(n%p, return(p)));
    f(n) = my(p=A053669(n)); for (i=1, p-1, if (!isprime(p+i*n), return(p-1))); p; \\ A123556
    isok(n) = f(n) == 10; \\ Michel Marcus, Mar 10 2023

Formula

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

A360735 Even 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

16, 22, 26, 32, 44, 46, 52, 56, 58, 62, 70, 74, 76, 82, 86, 88, 92, 100, 106, 112, 116, 118, 122, 128, 130, 136, 140, 142, 146, 148, 152, 158, 160, 166, 170, 172, 176, 182, 184, 194, 196, 200, 202, 206, 212, 214, 218, 224, 226, 232, 236, 242, 244, 250, 254, 256, 262, 266, 268
Offset: 1

Views

Author

Bernard Schott, Feb 19 2023

Keywords

Comments

Similar sequence with odd integers d is A040976 \ {0}.
Terms are even numbers that are not divisible by 3 and that are not also in A206037.
These longest corresponding APs are of the form (q, q+d) with q odd primes (see examples).
This subsequence of A359408 corresponds to the second case '2 is one less than prime 3' (see A173919); the first case is linked to A040976.
A342309(d) gives the first element of the smallest such AP with 2 elements whose common difference is a(n) = d.

Examples

			d = 16 is a term because the first longest APs of primes with common difference 16 are (3, 19), (7,23), (13, 29), ... and all have 2 elements because next elements should be respectively 35, 39 and 45 that are all composite; the first such AP 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), ... and all have 2 elements because next elements should be respectively 51, 63 and 75 that are all composite; the first such AP that starts with A342309(22) = 7 is (7, 29).
		

Crossrefs

Programs

  • Maple
    filter := d -> (irem(d, 2) = 0) and (irem(d, 3) <> 0) and not isprime(3+d) or isprime(3+d) and not isprime(3+2*d) : select(filter, [`$`(1 .. 270)]);
    isA360735 := d -> isA047235(d) and not isA206037(d): # Peter Luschny, Mar 03 2023
  • Mathematica
    Select[Range[2, 270, 2], Mod[#, 3] > 0 && Nand @@ PrimeQ[{# + 3, 2*# + 3}] &] (* Amiram Eldar, Mar 03 2023 *)
  • PARI
    isok(d) = !(d%2) && (d%3) && !(isprime(d+3) && isprime(2*d+3)); \\ Michel Marcus, Mar 03 2023

Formula

If m is a term then A123556(m) = 2, but the converse is false: a counterexample is A123556(11) = 2 and 11 is not a term.

A307603 Lexicographically earliest sequence with no duplicate term that produces only primes by the rounding technique explained in the Comments section.

Original entry on oeis.org

1, 5, 2, 3, 4, 6, 7, 10, 52, 53, 11, 12, 58, 59, 13, 16, 60, 61, 17, 18, 66, 67, 19, 22, 70, 71, 23, 28, 72, 73, 29, 30, 78, 79, 31, 36, 82, 83, 37, 40, 88, 89, 41, 42, 96, 97, 43, 46, 502, 503, 47, 100, 508, 509, 101, 102, 520, 521, 103, 106, 522, 523, 107, 108, 540, 541, 109, 112, 546, 547, 113, 126, 556, 557, 127, 130, 562
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Apr 18 2019

Keywords

Comments

See the assembly [a(n),a(n+1)] as a decimal number. Round this number to the closest integer. All rounded assemblies will produce a prime number.
"Rounding to the closest integer" is ambiguous for decimal numbers like (k.5) where k is an integer. Here we round such numbers to be rounded to k+1. The only occurrence of such a "rounding ambiguity" in the sequence happens with a(1) = 1 and a(2) = 5. Indeed, no more (k.5) "dilemmas" like that one will ever occur again as the integers 50, 500, 5000,... (that might produce together with the previous term k the decimal number k.50 or k.500 or k.5000...) cannot be part of the sequence; this is because 50, 500, 5000,... are not primes themselves (they end with 0) and neither are 51, 501, 5001,... (they are divisible by 3).

Examples

			The sequence starts with 1,5,2,3,4,6,7,10,52,53,11,12,58,59,13,...
The assembly [a(1),a(2)] is 1.5 which rounded upwards produces 2;
The assembly [a(2),a(3)] is 5.2 which rounded to the closest integer produces 5;
The assembly [a(3),a(4)] is 2.3 which rounded to the closest integer produces 2;
The assembly [a(4),a(5)] is 3.4 which rounded to the closest integer produces 3;
The assembly [a(5),a(6)] is 4.6 which rounded to the closest integer produces 5;
etc.
		

Crossrefs

Cf. A173919 (Numbers that are prime or one less than a prime).
Showing 1-8 of 8 results.