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 51-60 of 85 results. Next

A117507 Numerators of partial sums of the Brun series divided by 4.

Original entry on oeis.org

2, 23, 3919, 1400972, 1332221503, 2440266733544, 9013120937567806, 47710925260763230958, 503649376979113850651329, 5954610779280903922363948937, 114594038963707117577230115067496
Offset: 1

Views

Author

Wolfdieter Lang, Apr 13 2006

Keywords

Comments

The Brun series is the sum over reciprocals of the (odd) twin primes (see the mathworld link).
The denominators divided by 5 are given in A117508.
A001359 gives the lesser of the twin primes (offset 1).
A006512 gives the greater of the twin primes (offset 1).
A029707=[2,3,5,7,10,..] gives the indices for the lesser of the (odd) twin primes (offset 0).
The proof that the partial sums of the Brun series have numerators divisible by 4 and denominators divisible by 5 can be given by induction.

Examples

			Rationals 4*A117507(n)/5*A117508(n): 8/15, 92/105, 15676/15015,
5603888/4849845, 5328886012/4360010655,...
		

Formula

a(n)=numerator(r(n))/4, with r(n):=sum(1/ltp(k) + 1/(ltp(k)+2),k=1..n), n>=1, with ltp(k):=A001359(k) (lesser twin primes).

A163981 a(n) is the smallest prime of the form prime(n+1)*k - prime(n), k >= 1, where prime(n) is the n-th prime.

Original entry on oeis.org

7, 2, 2, 37, 2, 89, 2, 73, 151, 2, 43, 127, 2, 239, 59, 419, 2, 73, 359, 2, 401, 419, 1163, 881, 307, 2, 967, 2, 569, 3697, 397, 691, 2, 457, 2, 163, 821, 839, 179, 1259, 2, 2111, 2, 1777, 2, 223, 3803, 3863, 2, 3499, 1201, 2, 2269, 263, 269, 1889, 2, 283, 1409, 2, 2647
Offset: 1

Views

Author

Leroy Quet, Aug 07 2009

Keywords

Comments

a(n) = 2 if and only if n is in A029707. - Robert Israel, Jan 16 2019

Crossrefs

Contains A085704.

Programs

  • Maple
    a := proc (n) local k: for k while isprime(ithprime(n+1)*k-ithprime(n)) = false do end do: ithprime(n+1)*k-ithprime(n) end proc: seq(a(n), n = 1 .. 65); # Emeric Deutsch, Aug 10 2009
  • Mathematica
    a[n_] := Module[{p, q, r}, For[p = Prime[n]; q = Prime[n + 1]; k = 1, True, k++, If[PrimeQ[r = q k - p], Return[r]]]];
    Array[a, 100] (* Jean-François Alcover, Aug 28 2020 *)
  • PARI
    a(n) = my(k=1); while (!isprime(p=prime(n+1)*k - prime(n)), k++); p; \\ Michel Marcus, Jul 02 2021
  • Python
    from sympy import isprime, nextprime, prime
    def a(n):
        pn = prime(n); pn1 = nextprime(pn); k = 1
        while not isprime(pn1*k - pn): k += 1
        return pn1*k - pn
    print([a(n) for n in range(1, 62)]) # Michael S. Branicky, Jul 02 2021
    

Extensions

Extended by Emeric Deutsch, Aug 10 2009

A320704 Indices of primes followed by a gap (distance to next larger prime) of 12.

Original entry on oeis.org

46, 47, 91, 97, 114, 121, 139, 168, 197, 203, 214, 232, 239, 240, 242, 267, 278, 280, 290, 312, 317, 342, 357, 363, 376, 381, 404, 423, 437, 439, 449, 452, 461, 470, 472, 489, 499, 511, 546, 550, 562, 565, 599, 600, 617, 633, 634, 647, 653, 657, 675, 680, 692, 698, 716, 728
Offset: 1

Views

Author

M. F. Hasler, Oct 19 2018

Keywords

Comments

Indices of the primes given in A031930.

Crossrefs

Equals A000720 o A031930.
Row 6 of A174349.
Indices of 12's in A001223.
Cf. A029707, A029709, A320701, A320702, ..., A320720 (analog for gaps 2, 4, 6, 8, ..., 44), A116493 (gap 70), A116496 (gap 100), A116497 (gap 200), A116495 (gap 210).

Programs

  • Magma
    [n: n in [1..1000] | NthPrime(n+1) - NthPrime(n) eq 12]; // Vincenzo Librandi, Mar 21 2019
  • Mathematica
    Select[Range[1000], Prime[#] + 12 == Prime[# + 1] &] (* Vincenzo Librandi, Mar 21 2019 *)
  • PARI
    A320704_vec(N=100,g=12,p=2,i=primepi(p)-1,L=List())={forprime(q=1+p,,i++; if(p+g==p=q, listput(L,i); N--||break));Vec(L)} \\ returns the list of first N terms of the sequence
    

Formula

a(n) = A000720(A031930(n)).
A320704 = { i > 0 | prime(i+1) = prime(i) + 12 }.

A320705 Indices of primes followed by a gap (distance to next larger prime) of 14.

Original entry on oeis.org

30, 62, 66, 137, 146, 150, 162, 223, 250, 283, 309, 350, 360, 382, 402, 410, 424, 434, 503, 514, 526, 532, 536, 570, 610, 649, 654, 666, 687, 704, 706, 747, 780, 790, 867, 906, 919, 929, 967, 978, 981, 992, 1011, 1023, 1038, 1042, 1057, 1072, 1133, 1154, 1160, 1177, 1184
Offset: 1

Views

Author

M. F. Hasler, Oct 19 2018

Keywords

Comments

Indices of the primes listed in A031932.

Crossrefs

Equals A000720 o A031932.
Row 7 of A174349.
Indices of 14's in A001223.
Cf. A029707, A029709, A320701, A320702, ..., A320720 (analog for gaps 2, 4, 6, 8, ..., 44), A116493 (gap 70), A116496 (gap 100), A116497 (gap 200), A116495 (gap 210).

Programs

  • Magma
    [n: n in [1..1500] | NthPrime(n+1) - NthPrime(n) eq 14]; // Vincenzo Librandi, Mar 19 2019
  • Mathematica
    Select[Range[1500], Prime[#] + 14 == Prime[# + 1] &] (* Vincenzo Librandi, Mar 19 2019 *)
    Position[Differences[Prime[Range[1200]]],14]//Flatten (* Harvey P. Dale, Nov 28 2024 *)
  • PARI
    A(N=100,g=14,p=2,i=primepi(p)-1,L=List())={forprime(q=1+p,,i++; if(p+g==p=q, listput(L,i); N--||break));Vec(L)} \\ returns the list of first N terms of the sequence
    

Formula

a(n) = A000720(A031932(n)).
A320705 = { i > 0 | prime(i+1) = prime(i) + 14 }.

A320706 Indices of primes followed by a gap (distance to next larger prime) of 16.

Original entry on oeis.org

282, 295, 319, 331, 335, 378, 409, 445, 476, 478, 481, 510, 560, 566, 619, 624, 674, 701, 739, 775, 856, 871, 881, 886, 935, 941, 1007, 1069, 1077, 1121, 1146, 1193, 1222, 1261, 1286, 1322, 1331, 1356, 1372, 1388, 1405, 1460, 1487, 1500, 1587, 1603, 1608, 1612, 1699, 1719, 1734, 1740, 1811, 1876, 1924, 1956, 1969, 1977, 2002, 2022, 2034, 2042, 2071
Offset: 1

Views

Author

M. F. Hasler, Oct 19 2018

Keywords

Comments

Indices of the primes listed in A031934.

Crossrefs

Equals A000720 o A031934.
Row 8 of A174349.
Indices of 16's in A001223.
Cf. A029707, A029709, A320701, A320702, ..., A320720 (analog for gaps 2, 4, 6, 8, ..., 44), A116493 (gap 70), A116496 (gap 100), A116497 (gap 200), A116495 (gap 210).

Programs

Formula

a(n) = A000720(A031934(n)).
A320706 = { i > 0 | prime(i+1) = prime(i) + 16 }.

A320707 Indices of primes followed by a gap (distance to next larger prime) of 18.

Original entry on oeis.org

99, 180, 205, 221, 274, 293, 326, 368, 416, 529, 539, 573, 597, 602, 607, 623, 635, 639, 677, 693, 725, 785, 811, 838, 844, 852, 855, 916, 937, 939, 942, 945, 968, 997, 1028, 1093, 1130, 1151, 1203, 1227, 1252, 1304, 1311, 1349, 1508, 1514, 1519, 1523, 1540, 1547, 1629, 1636, 1641, 1654, 1656
Offset: 1

Views

Author

M. F. Hasler, Oct 19 2018

Keywords

Comments

Indices of the primes listed in A031936.

Crossrefs

Equals A000720 o A031936.
Row 9 of A174349.
Indices of 18's in A001223.
Cf. A029707, A029709, A320701, A320702, ..., A320720 (analog for gaps 2, 4, 6, 8, ..., 44), A116493 (gap 70), A116496 (gap 100), A116497 (gap 200), A116495 (gap 210).

Programs

  • Magma
    [n: n in [1..1700] | NthPrime(n+1) - NthPrime(n) eq 18]; // Vincenzo Librandi, Mar 22 2019
  • Mathematica
    Select[Range[1700], Prime[#] + 18 == Prime[# + 1] &] (* Vincenzo Librandi, Mar 22 2019 *)
    Flatten[Position[Differences[Prime[Range[2000]]],18]] (* Harvey P. Dale, May 12 2022 *)
  • PARI
    A(N=100,g=18,p=2,i=primepi(p)-1,L=List())={forprime(q=1+p,,i++; if(p+g==p=q, listput(L,i); N--||break));Vec(L)} \\ returns the list of first N terms of the sequence
    

Formula

a(n) = A000720(A031936(n)).
A320707 = { i > 0 | prime(i+1) = prime(i) + 18 } = A001223^(-1)({18}).

A320713 Indices of primes followed by a gap (distance to next larger prime) of 30.

Original entry on oeis.org

590, 650, 708, 757, 842, 890, 928, 985, 1006, 1051, 1108, 1556, 1570, 1648, 1650, 1675, 1754, 1900, 1919, 2027, 2125, 2149, 2321, 2391, 2397, 2429, 2631, 2637, 2699, 2781, 2866, 2918, 2989, 2993, 3010, 3085, 3153, 3207, 3315, 3340, 3350, 3373, 3420, 3511, 3551, 3580, 3637, 3751, 3777, 3948
Offset: 1

Views

Author

M. F. Hasler, Oct 19 2018

Keywords

Comments

Indices of the primes listed in A124596.

Crossrefs

Equals A000720 o A124596.
Indices of 30's in A001223.
Row 15 of A174349.
Subsequence of A107730 (prime(n+1) ends in same digit as prime(n)).
Cf. A029707, A029709, A320701, A320702, ..., A320720 (analog for gaps 2, 4, 6, 8, ..., 44), A116493 (gap 70), A116496 (gap 100), A116497 (gap 200), A116495 (gap 210).

Programs

  • PARI
    A(N=100,g=30,p=2,i=primepi(p)-1,L=List())={forprime(q=1+p,,i++; if(p+g==p=q, listput(L,i); N--||break));Vec(L)} \\ returns the list of first N terms of the sequence

Formula

a(n) = A000720(A124596(n)).
A320713 = { i>0 | prime(i+1) = prime(i) + 30 } = A001223^(-1)({30}).

A320718 Indices of primes followed by a gap (distance to next larger prime) of 40.

Original entry on oeis.org

2191, 2344, 2524, 2788, 3562, 4058, 4677, 5030, 5349, 6076, 6145, 6256, 6320, 6442, 6454, 6902, 7232, 7488, 8119, 8152, 8245, 8366, 8553, 8567, 8591, 8746, 9260, 9361, 10536, 10735, 11095, 11407, 11534, 11781, 12227, 12312, 12663, 12815, 12940, 13015, 13333, 13676, 13873, 14065, 14123
Offset: 1

Views

Author

M. F. Hasler, Oct 19 2018

Keywords

Comments

Indices of the primes listed in A126721.

Crossrefs

Equals A000720 o A126721.
Row 20 of A174349.
Subsequence of A107730 (prime(n+1) ends in same digit as prime(n)).
Indices of 40's in A001223.
Cf. A029707, A029709, A320701, A320702, ..., A320720 (analog for gaps 2, 4, 6, 8, ..., 44), A116493 (gap 70), A116496 (gap 100), A116497 (gap 200), A116495 (gap 210).

Programs

  • PARI
    A(N=100,g=40,p=2,i=primepi(p)-1,L=List())={forprime(q=1+p,,i++; if(p+g==p=q, listput(L,i); N--||break));Vec(L)} \\ returns the list of first N terms of the sequence

Formula

a(n) = A000720(A126721(n)).
A320718 = { i > 0 | prime(i+1) = prime(i) + 40 } = A001223^(-1)({40}).

A320719 Indices of primes followed by a gap (distance to next larger prime) of 42.

Original entry on oeis.org

1879, 3732, 4059, 4135, 4714, 5355, 5948, 6160, 6841, 7434, 7724, 7746, 7952, 7980, 8081, 8269, 8580, 9303, 9395, 9971, 10045, 10305, 10968, 11023, 11135, 11251, 11338, 11399, 11515, 11807, 11888, 11901, 12089, 12374, 12488, 13277, 13447, 14497, 14802, 15086, 15089, 15350, 15612, 15785
Offset: 1

Views

Author

M. F. Hasler, Oct 19 2018

Keywords

Comments

Indices of the primes listed in A134120.

Crossrefs

Cf. A029707, A029709 (analog for gaps 2 & 4), A320701, A320702, ... A320720 (analog for gaps 6, 8, ..., 44), A116493 (gap 70), A116496 (gap 100), A116497 (gap 200), A116495 (gap 210).
Equals A000720 o A134120.
Indices of 42's in A001223.
Row 21 of A174349.

Programs

  • Mathematica
    Position[Differences[Prime[Range[16000]]],42]//Flatten (* Harvey P. Dale, Feb 22 2020 *)
  • PARI
    A(N=100,g=42,p=2,i=primepi(p)-1,L=List())={forprime(q=1+p,,i++; if(p+g==p=q, listput(L,i); N--||break));Vec(L)} \\ returns the list of first N terms of the sequence

Formula

a(n) = A000720(A134120(n)).

A341284 a(n) is the least prime == -prime(n) (mod 2*prime(n+1)).

Original entry on oeis.org

7, 23, 37, 41, 89, 59, 73, 151, 157, 43, 127, 131, 239, 59, 419, 307, 73, 359, 367, 401, 419, 1163, 881, 307, 311, 967, 547, 569, 3697, 397, 691, 419, 457, 757, 163, 821, 839, 179, 1259, 907, 2111, 967, 1777, 599, 223, 3803, 3863, 2063, 3499, 1201, 3617, 2269, 263, 269, 1889, 2441, 283, 1409
Offset: 2

Views

Author

J. M. Bergot and Robert Israel, Feb 25 2021

Keywords

Comments

a(k) is the least odd prime == -prime(k) (mod prime(k+1)).
a(k) = A163981(k) if and only if k is not in A029707.
a(k) = 2*prime(k+1)-prime(k) if and only if prime(k+1) is in A071680.

Examples

			a(3) = 23 is the least prime == -5 (mod 14), where prime(3) = 5 and prime(4) = 7.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
      for k from 2*ithprime(n+1)-ithprime(n) by 2*ithprime(n+1)  do
        if isprime(k) then return k fi
      od;
    end proc:
    map(f, [$2..100]);
  • PARI
    a(n) = forprime(p=2,, if (Mod(p, 2*prime(n+1)) == -prime(n), return (p))); \\ Michel Marcus, Feb 25 2021

Formula

(a(k) + prime(k)) mod (2*prime(k+1)) = 0.
Previous Showing 51-60 of 85 results. Next