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.

User: Alexei Kourbatov

Alexei Kourbatov's wiki page.

Alexei Kourbatov has authored 90 sequences. Here are the ten most recent ones:

A335367 Primes at the end of the first-occurrence gaps in A014320.

Original entry on oeis.org

3, 5, 11, 29, 97, 127, 149, 211, 541, 907, 1151, 1361, 1693, 1847, 2503, 2999, 4327, 5623, 9587, 15727, 16183, 19373, 19661, 28277, 30631, 31469, 31957, 34123, 35671, 43391, 44351, 81509, 82129, 89753, 134581, 156007, 162209, 173429, 188107, 212777, 265703
Offset: 1

Author

Alexei Kourbatov, Jun 03 2020

Keywords

Comments

Contains A000101 as a subsequence. First differs from A000101 at a(7)=149. See A000101, A002386 and A005250 for more references and links.

Examples

			The first two primes are 2 and 3, and the first prime gap is 3 - 2 = 1; so a(1)=3. The next prime is 5, and the next gap is 5 - 3 = 2; this gap size has not occurred before, so a(2)=5. The next prime is 7, and the next gap is 7 - 5 = 2; the gap size 2 has already occurred before, so nothing is added to the sequence.
		

Programs

  • PARI
    my(isFirstOcc=vector(9999, j, 1), s=2); forprime(p=3, 1e8, my(g=p-s); if(isFirstOcc[g], print1(p, ", "); isFirstOcc[g]=0); s=p)

Formula

a(n) = A335366(n) + A014320(n).

A335366 Primes preceding the first-occurrence gaps in A014320.

Original entry on oeis.org

2, 3, 7, 23, 89, 113, 139, 199, 523, 887, 1129, 1327, 1669, 1831, 2477, 2971, 4297, 5591, 9551, 15683, 16141, 19333, 19609, 28229, 30593, 31397, 31907, 34061, 35617, 43331, 44293, 81463, 82073, 89689, 134513, 155921, 162143, 173359, 188029, 212701, 265621
Offset: 1

Author

Alexei Kourbatov, Jun 03 2020

Keywords

Comments

Contains A002386 as a subsequence. First differs from A002386 at a(7)=139. This sequence is a permutation of all positive terms of A000230, in increasing order. See A002386 and A005250 for more references and links.

Examples

			The first two primes are 2 and 3, and the first prime gap is 3 - 2 = 1; so a(1)=2. The next prime is 5, and the next gap is 5 - 3 = 2; this gap size has not occurred before, so a(2)=3. The next prime is 7, and the next gap is 7 - 5 = 2; the gap size 2 has already occurred before, so nothing is added to the sequence.
		

Programs

  • PARI
    my(isFirstOcc=vector(9999, j, 1), s=2); forprime(p=3, 1e8, my(g=p-s); if(isFirstOcc[g], print1(s, ", "); isFirstOcc[g]=0); s=p)

Formula

a(n) = A335367(n) - A014320(n).

A334545 Primes of the form 6k - 1 at the end of first-occurrence gaps in A334543.

Original entry on oeis.org

11, 41, 131, 227, 383, 557, 1151, 1787, 4337, 6449, 7433, 8363, 9137, 12893, 35729, 37781, 58889, 59879, 97787, 105863, 130769, 148667, 153887, 180959, 220151, 328271, 402761, 407153, 416849, 542441, 780587, 1138367, 1294571, 1444463, 1463837, 1604951
Offset: 1

Author

Alexei Kourbatov, May 05 2020

Keywords

Comments

Subsequence of A007528. Contains A268930 as a subsequence. First differs from A268930 at a(5)=383.
A334543 lists the corresponding gap sizes; see more comments there.

Examples

			The first two primes of the form 6k-1 are 5 and 11, so we have a(1)=11. The next primes of this form are 17, 23, 29; the gaps 17-11 = 23-17 = 29-23 have size 6 which already occurred before; so nothing is added to the sequence. The next prime of this form is 41 and the gap size 41-29=12 has not occurred before, so a(2)=41.
		

Programs

  • PARI
    isFirstOcc=vector(9999,j,1); s=5; forprime(p=11,1e8,if(p%6!=5,next); g=p-s; if(isFirstOcc[g/6], print1(p", "); isFirstOcc[g/6]=0); s=p)

Formula

a(n) = A334543(n) + A334544(n).

A334544 Primes of the form 6k - 1 preceding the first-occurrence gaps in A334543.

Original entry on oeis.org

5, 29, 113, 197, 359, 521, 1109, 1733, 4289, 6389, 7349, 8297, 9059, 12821, 35603, 37691, 58787, 59771, 97673, 105767, 130649, 148517, 153749, 180797, 220019, 328127, 402593, 406907, 416693, 542261, 780401, 1138127, 1294367, 1444271, 1463621, 1604753
Offset: 1

Author

Alexei Kourbatov, May 05 2020

Keywords

Comments

Subsequence of A007528. Contains A268929 as a subsequence. First differs from A268929 at a(5)=359.
A334543 lists the corresponding gap sizes; see more comments there.

Examples

			The first two primes of the form 6k-1 are 5 and 11; we have a(1)=5. The next primes of this form are 17, 23, 29; the gaps 17-11 = 23-17 = 29-23 have size 6 which already occurred before; so nothing is added to the sequence. The next prime of this form is 41 and the gap size 41-29=12 has not occurred before, so a(2)=29.
		

Programs

  • PARI
    isFirstOcc=vector(9999,j,1); s=5; forprime(p=11,1e8,if(p%6!=5,next); g=p-s; if(isFirstOcc[g/6], print1(s", "); isFirstOcc[g/6]=0); s=p)

Formula

a(n) = A334545(n) - A334543(n).

A334543 First occurrences of gaps between primes 6k - 1: gap sizes.

Original entry on oeis.org

6, 12, 18, 30, 24, 36, 42, 54, 48, 60, 84, 66, 78, 72, 126, 90, 102, 108, 114, 96, 120, 150, 138, 162, 132, 144, 168, 246, 156, 180, 186, 240, 204, 192, 216, 198, 210, 174, 258, 252, 222, 234, 228, 318, 282, 264, 276, 342, 306, 294, 312, 270, 354, 372
Offset: 1

Author

Alexei Kourbatov, May 05 2020

Keywords

Comments

Contains A268928 as a subsequence. First differs from A268928 at a(5)=24.
Conjecture: the sequence is a permutation of all positive multiples of 6, i.e., all positive terms of A008588.
Conjecture: a(n) = O(n). See arXiv:2002.02115 (sect.7) for discussion.

Examples

			The first two primes of the form 6k-1 are 5 and 11, so a(1)=11-5=6. The next primes of this form are 17, 23, 29; the gaps 17-11 = 23-17 = 29-23 have size 6 which already occurred before; so nothing is added to the sequence. The next prime of this form is 41 and the gap 41-29=12 has not occurred before, so a(2)=12.
		

Programs

  • PARI
    isFirstOcc=vector(9999,j,1); s=5; forprime(p=11,1e8,if(p%6!=5,next); g=p-s; if(isFirstOcc[g/6], print1(g", "); isFirstOcc[g/6]=0); s=p)

Formula

a(n) = A334545(n) - A334544(n).

A332493 The minimal Skewes number for prime n-tuplets, choosing the n-tuplet with latest occurrence of the first sign change relative to the Hardy-Littlewood prediction when more than one type of n-tuplets exists (A083409(n)>1) for the given n.

Original entry on oeis.org

1369391, 87613571, 1172531, 216646267, 251331775687, 214159878489239, 750247439134737983
Offset: 2

Author

Alexei Kourbatov and Hugo Pfoertner, May 11 2020

Keywords

Comments

a(n) >= A210439(n). Equals A210439(n) at n=2,4,6, i.e., at those n for which there is only one type of prime n-tuplets (admissible prime n-tuples of minimal span). The corresponding minimal span (diameter) is given by A008407(n).
See A210439 for more information, references and links.
From Hugo Pfoertner, Oct 21 2021: (Start)
There are two options for choosing a(8):
Either one interprets "latest occurrence" as the largest number of 8-tuplets before the Hardy-Littlewood (H-L) prediction is exceeded, or one selects the larger value of the first 8-tuplet term causing the first crossing.
In the first case, 40634356 8-tuplets of the type p + [0, 2, 6, 12, 14, 20, 24, 26] are required before the H-L prediction is exceeded with an 8-tuplet 523250002674163757 + [0, 2, 6, ...].
In the second case, 20316822 8-tuplets of type p + [0, 6, 8, 14, 18, 20, 24, 26] are needed to reach the first crossing of the H-L prediction. The corresponding 8-tuplet has 750247439134737983 as first term.
The interchanging is a consequence of the different H-L constants for the two tuplet types, 475.36521.. vs. 178.261954.., which have a ratio of 8/3 to one another.
Since the H-L constant for the "earliest occurrence" A210439(8) is 178.26.., this speaks in favor of a choice from the two possibilities, which uses the same H-L constant, i.e., the occurrence with the larger tuplet start and not the occurrence with the larger number of required tuplets, for which a separate sequence A348053 is created. (End)

Examples

			Denote by pi_n(x) the n-tuplet counting function, C_n the corresponding Hardy-Littlewood constant, and Li_n(x) the integral from 2 to x of (1/(log t)^n) dt.
For 7-tuples with pattern (0 2 8 12 14 18 20) we have the Skewes number p=214159878489239; this is the initial prime p in the 7-tuple where for the first time we have pi_7(p) > C_7 Li_7(p). For the other dense pattern (0 2 6 8 12 18 20), the first sign change of pi_7(x) - C_7 Li_7(x) occurs earlier, at 7572964186421. Therefore we have a(7)=214159878489239, while A210439(7)=7572964186421.
		

Programs

  • PARI
    See A. Kourbatov link.
    
  • PARI
    \\ The first result is A210439(5), the 2nd is a(5)
    Li(x, n)=intnum(t=2, n, 1/log(t)^x);
    G5=(15^4/2^11)*0.409874885088236474478781212337955277896358; \\ A269843
    n1=0;n2=0;n1found=0;n2found=0;p1=5;p2=7;p3=11;p4=13;
    forprime(p5=17,10^12,if(p5-p1==12,my(L=Li(5,p1));if(p2-p1==2,n1++;if(!n1found&&n1/L>G5,print(p1," ",p2," ",n1," ",n1/L);n1found=1),n2++;if(!n2found&&n2/L>G5,print(p1," ",p2," ",n2," ",n2/L);n2found=1)));if(n1found&&n2found,break);p1=p2;p2=p3;p3=p4;p4=p5) \\ Hugo Pfoertner, May 12 2020
    \\ Code for a(7), similar to A. Kourbatov's code but much shorter.
    \\ Run time approx. 2 days, prints every 1000th 7-tuple
    G7=(35^6/(3*2^22))*0.36943751038649868932319074987675; \\ A271742
    s=[0,2,8,12,14,18,20];
    r=[809, 2069, 2909, 5639, 6689, 7529, 7739, 8999, 10259, 12149, 12359, 14459, 14879, 15929, 17189, 19289, 20549, 21389, 23909, 24119, 26009, 27479, 28529, 28739];
    forstep(p0=0,10^15,30030,for(j=1,24,my(p1=p0+r[j],isp=1,L);for(k=1,7,my(p=p1+s[k]);if(!ispseudoprime(p),isp=0;break));if(isp,L=Li(7,p1);n++;if(n%1000==0||n/L>G7,print(p1," ",p1+s[#s]," ",n/L," ",n));if(n/L>G7,break(2))))) \\ Hugo Pfoertner, May 16 2020

Extensions

a(8) from Norman Luhn and Hugo Pfoertner, Oct 21 2021

A330855 Primes 6k + 1 at the end of first-occurrence gaps in A330853.

Original entry on oeis.org

13, 31, 61, 271, 307, 1381, 1531, 1987, 2437, 4423, 7867, 10243, 16831, 22273, 24337, 38557, 40351, 43543, 69661, 75511, 100927, 119047, 171403, 195691, 204301, 250423, 480343, 577807, 590593, 1164799, 1207903, 1278997, 1382419, 1468189, 1526929, 1890019, 2314591
Offset: 1

Author

Alexei Kourbatov, Apr 27 2020

Keywords

Comments

Subsequence of A002476. Contains A268927 as a subsequence. First differs from A268927 at a(5)=307.
A330853 lists the corresponding gap sizes; see more comments there.

Examples

			The first two primes of the form 6k+1 are 7 and 13, so a(1)=13. The next prime 6k+1 is 19, and the gap 19-13=6 already occurred, so a new term is not added to the sequence. The next prime 6k+1 is 31, and the gap 31-19=12 is occurring for the first time; therefore a(2)=31.
		

Crossrefs

Cf. A002476, A014320, A058320, A268927, A330853 (first-occurrence gap sizes), A330854 (primes beginning the first-occurrence gaps).

Programs

  • PARI
    isFirstOcc=vector(9999,j,1); s=7; forprime(p=13,1e8, if(p%6!=1,next); g=p-s; if(isFirstOcc[g/6], print1(p", "); isFirstOcc[g/6]=0); s=p)

Formula

a(n) = A330853(n) + A330854(n).

A330854 Primes of the form 6k + 1 preceding the first-occurrence gaps in A330853.

Original entry on oeis.org

7, 19, 43, 241, 283, 1327, 1489, 1951, 2389, 4363, 7789, 10177, 16759, 22189, 24247, 38461, 40237, 43441, 69499, 75403, 100801, 118927, 171271, 195541, 204163, 250279, 480169, 577639, 590437, 1164607, 1207699, 1278817, 1382221, 1467937, 1526659, 1889803, 2314369
Offset: 1

Author

Alexei Kourbatov, Apr 27 2020

Keywords

Comments

Subsequence of A002476. First differs from A268926 in that that sequence does not include 283; all terms of A268926 are in this sequence but many terms of this sequence are not in A268926.

Examples

			The first two primes of the form 6k + 1 are 7 and 13, so a(1) = 7. The next prime of that form is 19, and the gap 19 - 13 = 6 already occurred; so a new term is not added to the sequence. The next prime of the form 6k + 1 is 31, and the gap 31 - 19 = 12 is occurring for the first time; therefore a(2) = 19.
The gap between 241 and the next prime of the form 6k + 1 (271) is 30. So 241 is in the sequence.
Although the gap between 283 and 307 is only 24 (which is less than 30), the gap is of a size not previously encountered. So 283 is in the sequence.
		

Crossrefs

Cf. A002476, A014320, A058320, A330853 (gap sizes), A330855.

Programs

  • PARI
    isFirstOcc=vector(9999,j,1); s=7; forprime(p=13,1e8, if(p%6!=1,next); g=p-s; if(isFirstOcc[g/6], print1(s", "); isFirstOcc[g/6]=0); s=p)

Formula

a(n) = A330855(n) - A330853(n).

A330853 First occurrences of gaps between primes 6k+1: gap sizes.

Original entry on oeis.org

6, 12, 18, 30, 24, 54, 42, 36, 48, 60, 78, 66, 72, 84, 90, 96, 114, 102, 162, 108, 126, 120, 132, 150, 138, 144, 174, 168, 156, 192, 204, 180, 198, 252, 270, 216, 222, 186, 228, 210, 240, 282, 246, 234, 276, 264, 258, 312, 330, 318, 288, 306, 294, 336, 300, 378
Offset: 1

Author

Alexei Kourbatov, Apr 27 2020

Keywords

Comments

Contains A268925 as a subsequence.
Conjecture: the sequence is a permutation of all positive multiples of 6, i.e., all positive terms of A008588.
Conjecture: a(n) = O(n). See arXiv:2002.02115 (sect.7) for discussion.

Examples

			The first primes of the form 6k+1 are 7 and 13, so a(1)=13-7=6. The next prime 6k+1 is 19, and the gap 19-13=6 already occurred, so a new term is not added to the sequence. The next prime 6k+1 is 31, and the gap 31-19=12 is occurring for the first time; therefore a(2)=12.
		

Crossrefs

Cf. A002476, A014320, A058320, A330854 (primes 6k+1 preceding the first-occurrence gaps), A330855 (primes 6k+1 at the end of the first-occurrence gaps).

Programs

  • PARI
    isFirstOcc=vector(9999,j,1); s=7; forprime(p=13,1e8, if(p%6!=1,next); g=p-s; if(isFirstOcc[g/6], print1(g", "); isFirstOcc[g/6]=0); s=p)

Formula

a(n) = A330855(n) - A330854(n).

A306486 Number of squares in the interval [e^(n-1), e^n).

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 8, 13, 21, 36, 58, 96, 159, 262, 431, 712, 1172, 1934, 3189, 5256, 8667, 14289, 23559, 38841, 64039, 105583, 174076, 287003, 473188, 780155, 1286258, 2120681, 3496412, 5764609, 9504233, 15669832, 25835185, 42595018, 70227313, 115785266
Offset: 0

Author

Alexei Kourbatov, Feb 18 2019

Keywords

Comments

The lower endpoint e^(n-1) is included; the upper endpoint is not included. The terms a(0) to a(8) coincide with the Fibonacci numbers.

Examples

			Between exp(2) and exp(3) there are two squares, namely, 9 and 16; therefore, a(3)=2.
		

Programs

  • Maple
    a:= n-> (f-> f(n)-f(n-1))(i-> ceil(exp(i/2))):
    seq(a(n), n=0..44);  # Alois P. Heinz, Feb 18 2019
  • PARI
    a(n)=ceil(sqrt(exp(n)))-ceil(sqrt(exp(n-1)));
    for(n=0,50,print1(a(n)", "))

Formula

a(n) = ceiling(sqrt(exp(n))) - ceiling(sqrt(exp(n-1))).
From Alois P. Heinz, Feb 19 2019: (Start)
Lim_{n->oo} a(n+1)/a(n) = sqrt(e) = 1.64872127... = A019774.
a(n) = A005181(n+1) - A005181(n). (End)
a(n) = (1-1/sqrt(e))*e^(n/2)+O(1) ~ 0.39346934...*e^(n/2) ~ A290506*e^(n/2). - Alexei Kourbatov, Feb 20 2019