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

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.

A342309 When A123556(n) is the number of primes (not necessarily consecutive) in the longest arithmetic progression of primes with common difference n, a(n) is the smallest term of the first such arithmetic progression.

Original entry on oeis.org

2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 7, 2, 59, 2, 3, 2, 3, 2, 7, 2, 5, 2, 3, 2, 31, 2, 3, 2, 3, 2, 5, 2, 3, 2, 7, 2, 5, 2, 3, 2, 7, 2, 5, 2, 3, 2, 3, 2, 11, 2, 5, 2, 3, 2, 31, 2, 3, 2, 3, 2, 7, 2, 5, 2, 3, 2, 23, 2, 3, 2, 7, 2, 5, 2, 3, 2, 13, 2, 13
Offset: 1

Views

Author

Bernard Schott, Mar 08 2021

Keywords

Comments

Inspired by problem A1880 in Diophante (see link).
a(n) is the last term of the n-th row of A124064.
About the k-tuples conjecture in A123556: let p = A053669(n), if the arithmetic progression of p elements starting at p with difference n consists of primes, then A123556(n) = p, otherwise A123556(n) = p-1. The first 21 terms of this sequence are precisely the same as A053669, then a(22) = 7 (corresponding to the arithmetic progression (7,29)) while A053669(22) = 3.

Examples

			There are only two consecutive primes (p,p+1) = (2,3), hence a(1) = 2.
(5,29,53) is the smallest arithmetic progression of 3 primes with common difference of 24, but (59,83,107,131) is the smallest arithmetic progression of 4 primes with common difference of 24 and there does not exist such an arithmetic progression with length > 4; hence, a(24) = 59.
(3,29), (5,31), (11,37) are the first three arithmetic progressions of primes with common difference of 26, the smallest term of the first arithmetic progression (3,29) is 3, and there does not exist such an arithmetic progression with length > 2, hence a(26) = 3.
		

Crossrefs

Formula

a(2k+1) = 2.

A124570 Array read by antidiagonals: T(d,k) (k >= 1, d = 1,2,3,4,5,6,...) = smallest semiprime s of k (not necessarily consecutive) semiprimes in arithmetic progression with common difference d, or 0 if there is no such arithmetic progression.

Original entry on oeis.org

4, 4, 4, 4, 9, 4, 4, 4, 33, 4, 4, 6, 91, 0, 4, 4, 6, 115, 213, 0, 4, 4, 4, 6, 0, 213, 0, 4, 4, 4, 4, 111, 0, 1383, 0, 4, 4, 14, 9, 0, 201, 0, 3091, 0, 4, 4, 6, 51, 203, 0, 201, 0, 8129, 0, 4, 4, 6, 6, 0, 1333, 0, 481, 0, 0, 0, 4, 4, 4, 77, 69, 0, 1333, 0, 5989, 0, 0, 0, 4
Offset: 1

Views

Author

Jonathan Vos Post, Nov 04 2006

Keywords

Comments

Comment from Hugo van der Sanden Aug 14 2021: (Start)
Row d=12 starts 4 9 9 10 10 469 3937 7343 7343 44719 78937 78937 78937 78937 55952333 233761133 597191343199.
Row d=18 starts 4 4 15 15 15 695 695 1727 7711 13951 13951 46159 400847 400847 400847 65737811 13388955301 934046384293.
Row d=24 starts 4 9 9 10 10 793 4819 6415 7271 14069 14069 14069 31589 67344271 616851797 48299373047 48299373047 20302675273219.
Row d=30 starts 4 4 9 25 25 2779 2779 6347 6347 6347 10811 10811 87109 87109 87109 1513723 15009191 15009191 316612697 316612697 1275591688621.
Row d=36 starts 4 10 10 10 15 1333 3161 4997 6865 34885 142171 834863 1327447 35528747 720945097 63389173477 63389173477 16074207679897 41728758250241.
Row d=42 starts 4 4 9 35 35 2701 2987 2987 7729 26995 26995 185795 307553 708385 708385 708385 1090198367 1819546069 20263042201 5672249016001.
Later terms in these rows are always >10^14. (End)
If p is the least prime that does not divide d, then T(d,k) <= p^2 if k >= p^2 (i.e. any a.p. of length >= p^2 with difference d contains a term divisible by p^2, and the only semiprime divisible by p^2 is p^2). Thus every row is eventually 0. - Robert Israel, Aug 11 2024

Examples

			Array begins:
d.\...k=1.k=2.k=3.k=4.k=5..k=6..k=7..k=8....k=9..k=10.k=11..k=12.
0..|..4...4...4...4...4....4....4....4......4....4.....4.....4...
1..|..4...9...33..0...0....0....0....0......0....0.....0.....0....
2..|..4...4...91..213.213..1383.3091.8129...0....0.....0.....0.....
3..|..4...6...115.0...0....0....0....0......0....0.....0.....0.....
4..|..4...6...6...111.201..201..481..5989...0....0.....0.....0....
5..|..4...4...4...0...0....0....0....0......0....0.....0.....0.....
6..|..4...4...9...203.1333.1333.1333.2159...8309.18799.60499.60499
7..|..4...14..51..0...0....0....0....0......0....0.....0.....0.....
8..|..4...6...6...69..473..511..511..112697.0....0.....0.....0.....
9..|..4...6...77..0...0....0....0....0......0....0.....0.....0.....
10.|..4...4...15..289.289..289..1631.13501..0....0.....0.....0.....
11.|..4...4...4...0...0....0....0....0......0....0.....0.....0.....
Example for row 3: 115 = 5 * 23 is semiprime, 115+3 = 118 = 2 * 59 is semiprime and 115+3+3 = 121 = 11^2 is semiprime, so T(3,3) = 115.
		

Crossrefs

Semiprime analog of A124064.
Cf. A125025 (row lengths), A001358, A056809, A070552, A092125, A092126, A092127, A092128, A092129, A124064, A092209 (row d=2), A091016 (row d=6).

Formula

T(1,2)=A070552(1). T(1,3)=A056809(1). T(2,4)=A092126(1). T(2,5)=A092127(1). T(2,6)=A092128(1). T(2,7)=A092129(1). T(2,8)=A082919(1). T(3,2)=A123017(1). T(d,1)=A001358(1). - R. J. Mathar, Aug 05 2021

Extensions

Corrected and extended by R. J. Mathar, Nov 06 2006
Definition clarified by Robert Israel, Aug 11 2024

A125025 Lengths of rows in A124570.

Original entry on oeis.org

3, 8, 3, 8, 3
Offset: 1

Views

Author

Jonathan Vos Post, Nov 15 2006

Keywords

Comments

This sequence is to A124570 as A123556 is to A124064.
a(n) is at most A053669(n)^2, with equality if and only if A053669(n)^2 is the first semiprime in the corresponding arithmetic progression. - Charlie Neder, Jan 10 2019
By subsampling a given arithmetic progression with k terms and distance d one may generate an arithmetic progression of a larger distance d*b, b=1,2,3...., with 1+(k-1)/b terms: a(b*n) >= 1+floor( (a(n)-1)/b ), b=1,2,3..... - R. J. Mathar, Aug 02 2021
18 <= a(6) <= 24. - Jinyuan Wang, Aug 06 2021
a(12) >= 17. a(18) >= 18. a(24) >= 18. a(30) >= 21. a(36) >= 19. a(42) >= 20. a(6006) >= 24 (starting 652744562555081). Hugo van der Sanden, Aug 14 2021

Crossrefs

Showing 1-4 of 4 results.