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 21-30 of 37 results. Next

A204672 Primes followed by a gap of 120.

Original entry on oeis.org

1895359, 2898239, 6085441, 7160227, 7784039, 7803491, 7826899, 8367397, 8648557, 9452959, 10052071, 10863973, 11630503, 11962823, 12109697, 12230233, 12415681, 14411737, 14531899, 15014557, 15020737, 15611909, 16179041
Offset: 1

Views

Author

M. F. Hasler, Jan 18 2012

Keywords

Crossrefs

Cf. A058193 (first gap of 6n), A140791 (first gap of 10n).
Cf. A126771 (gap 60), A126724 (gap 150), A204673 (gap 180).

Programs

  • MATLAB
    N = 2*10^7; % to get all terms <= N
    P = primes(N+120);
    J = find(P(2:end) - P(1:end-1) == 120);
    P(J)  % Robert Israel, Feb 28 2017
  • Mathematica
    Transpose[Select[Partition[Prime[Range[1100000]],2,1],Last[#]-First[#] == 120&]] [[1]] (* Harvey P. Dale, Jul 11 2014 *)
  • PARI
    g=120;c=o=0;forprime(p=1,default(primelimit),(-o+o=p)==g&write("c:/temp/b204672.txt",c++" "p-g))
    

A271211 Composite integers sandwiched between primes p, q with q-p = 4.

Original entry on oeis.org

8, 9, 10, 14, 15, 16, 20, 21, 22, 38, 39, 40, 44, 45, 46, 68, 69, 70, 80, 81, 82, 98, 99, 100, 104, 105, 106, 110, 111, 112, 128, 129, 130, 164, 165, 166, 194, 195, 196, 224, 225, 226, 230, 231, 232, 278, 279, 280, 308, 309, 310, 314, 315, 316, 350, 351, 352, 380
Offset: 1

Views

Author

Michel Marcus, Apr 02 2016

Keywords

Examples

			The composite number 8 is sandwiched between primes 7 and 11, and 11-7=4, so 8 is a member of the sequence.
		

Crossrefs

Programs

  • Mathematica
    Range[#[[1]]+1,#[[2]]-1]&/@Select[Partition[Prime[Range[100]],2,1],#[[2]]- #[[1]] == 4&]//Flatten (* Harvey P. Dale, Oct 12 2019 *)
  • PARI
    lista(nn) = {forcomposite(c=4, nn, if ((p=precprime(c)) && ((nextprime(c)-p)==4), print1(c, ", ")););}

A339920 Primes p such that p^2 - p*q + q^2 is prime, where q is the next prime after p.

Original entry on oeis.org

2, 3, 53, 151, 167, 263, 373, 443, 467, 509, 523, 571, 1063, 1103, 1117, 1217, 1493, 1553, 1901, 1973, 2161, 2207, 2281, 2399, 2713, 2837, 2963, 3259, 3347, 3511, 4073, 4297, 4373, 4463, 4523, 4673, 4691, 4877, 5147, 5237, 5303, 5419, 5471, 5851, 6211, 6311, 6367
Offset: 1

Views

Author

Michel Marcus, Dec 23 2020

Keywords

Comments

From Bernard Schott, Dec 23 2020: (Start)
Except for a(2)=3, (3, 5) gives A339698(2) = 19, there is no other pair of twin primes (p, p+2) (p in A001359) that gives a prime number of the form p^2-p*q+q^2 = p^2+2p+4.
There are no consecutive cousin primes (p, p+4) (p in A029710) that gives a prime number of the form p^2-pq+q^2 = p^2+4p+16.
There are no consecutive primes with a gap of 8 (p, p+8) (p in A031926) that give a prime number of the form p^2-pq+q^2 = p^2+8p+64. (End)

Crossrefs

Cf. A339698.

Programs

  • Maple
    q:= 2: count:= 0: R:= NULL:
    while count < 100 do
      p:= q; q:= nextprime(q);
      if isprime(p^2-p*q+q^2) then
        count:= count+1; R:= R, p;
      fi
    od:
    R; # Robert Israel, Dec 24 2020
  • PARI
    forprime(p=1, 1e4, my(q=nextprime(p+1)); if(ispseudoprime(p^2-p*q+q^2), print1(p, ", ")));

A353072 Numbers k such that nextprime(k)-k is a positive square.

Original entry on oeis.org

1, 2, 4, 6, 7, 10, 12, 13, 16, 18, 19, 22, 25, 28, 30, 33, 36, 37, 40, 42, 43, 46, 49, 52, 55, 58, 60, 63, 66, 67, 70, 72, 75, 78, 79, 82, 85, 88, 93, 96, 97, 100, 102, 103, 106, 108, 109, 112, 118, 123, 126, 127, 130, 133, 136, 138, 140, 145, 148, 150, 153
Offset: 1

Views

Author

Tanya Khovanova, Apr 21 2022

Keywords

Comments

Numbers p-1, where p is prime is a subsequence (see A006093).

Examples

			The next prime after 7 is 11, and 11-7 = 4 a square, so 7 is in this sequence.
The next prime after 118 is 127, 127-118 = 9 is a square, so 118 is a term.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2000], NextPrime[#] - # > 0 && IntegerQ[Sqrt[NextPrime[#] - #]] &]
    npsQ[n_]:=With[{c=NextPrime[n]-n},c>0&&IntegerQ[Sqrt[c]]]; Select[Range[200],npsQ] (* Harvey P. Dale, May 05 2023 *)
  • PARI
    upto(n) = {my(res = List(1), q = 2, u = nextprime(n + 1)); forprime(p = 3, u, forstep(i = sqrtint(p - q), 1, -1, listput(res, p-i^2) ); q = p ); res } \\ David A. Corneth, Apr 22 2022
    
  • PARI
    isok(k) = issquare(nextprime(k+1)-k); \\ Michel Marcus, Apr 22 2022

A078869 Number of n-tuples with elements in {2,4,6} which can occur as the differences between n+1 consecutive primes > n+1. (Values of a(11), ..., a(18) are conjectured to be correct, but are only known to be upper bounds.)

Original entry on oeis.org

3, 7, 15, 26, 38, 48, 67, 92, 105, 108, 109, 118, 130, 128, 112, 80, 36, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Labos Elemer, Dec 19 2002

Keywords

Comments

The ">n+1" rules out n-tuples like (2,2), which only occurs for the primes 3, 5, 7. All terms from a(19) on equal 0.
An n-tuple (a_1,a_2,...,a_n) is counted iff the partial sums 0, a_1, a_1+a_2, ..., a_1+...+a_n do not contain a complete residue system (mod p) for any prime p.

Crossrefs

The 26 4-tuples and 38 5-tuples are in A078868 and A078870. Cf. A001359, A008407, A029710, A031924, A022004-A022007, A078852, A078858, A078946-A078969, A020497.

Programs

  • Mathematica
    test[tuple_] := Module[{r, sums, i, j}, r=Length[tuple]; sums=Prepend[tuple.Table[If[j>=i, 1, 0], {i, 1, r}, {j, 1, r}], 0]; For[i=1, Prime[i]<=r+1, i++, If[Length[Union[Mod[sums, Prime[i]]]]==Prime[i], Return[False]]]; True]; tuples[0]={{}}; tuples[n_] := tuples[n]=Select[Flatten[Outer[Append, tuples[n-1], {2, 4, 6}, 1], 1], test]; a[n_] := Length[tuples[n]]

Extensions

Edited by Dean Hickerson, Dec 20 2002

A111981 Numbers n such that 2n-1 and 2n+3 are consecutive primes.

Original entry on oeis.org

4, 7, 10, 19, 22, 34, 40, 49, 52, 55, 64, 82, 97, 112, 115, 139, 154, 157, 175, 190, 199, 220, 229, 232, 244, 250, 307, 322, 337, 370, 379, 385, 412, 427, 430, 439, 442, 454, 469, 484, 505, 544, 547, 607, 640, 649, 652, 712, 715, 724, 742, 745, 775, 784, 790
Offset: 1

Views

Author

Ray Chandler, Aug 24 2005

Keywords

Crossrefs

Essentially the same as A088762.

Formula

a(n) = (A029708(n)-1)/2 = (A029710(n)+1)/2 = (A031505(n)-3)/2.

A174350 Square array: row n >= 1 lists the primes p for which the next prime is p+2n; read by antidiagonals.

Original entry on oeis.org

3, 5, 7, 11, 13, 23, 17, 19, 31, 89, 29, 37, 47, 359, 139, 41, 43, 53, 389, 181, 199, 59, 67, 61, 401, 241, 211, 113, 71, 79, 73, 449, 283, 467, 293, 1831, 101, 97, 83, 479, 337, 509, 317, 1933, 523, 107, 103, 131, 491, 409, 619, 773, 2113, 1069, 887
Offset: 1

Views

Author

Clark Kimberling, Mar 16 2010

Keywords

Comments

Every odd prime p = prime(i), i > 1, occurs in this array, in row (prime(i+1) - prime(i))/2. Polignac's conjecture states that each row contains an infinite number of indices. In case this does not hold, we can use the convention to continue finite rows with 0's, to ensure the sequence is well defined. - M. F. Hasler, Oct 19 2018
A permutation of the odd primes (A065091). - Robert G. Wilson v, Sep 13 2022

Examples

			Upper left hand corner of the array:
     3     5    11    17    29    41    59    71   101 ...
     7    13    19    37    43    67    79    97   103 ...
    23    31    47    53    61    73    83   131   151 ...
    89   359   389   401   449   479   491   683   701 ...
   139   181   241   283   337   409   421   547   577 ...
   199   211   467   509   619   661   797   997  1201 ...
   113   293   317   773   839   863   953  1409  1583 ...
  1831  1933  2113  2221  2251  2593  2803  3121  3373 ...
   523  1069  1259  1381  1759  1913  2161  2503  2861 ...
  (...)
Row 1: p(2) = 3, p(3) = 5, p(5) = 11, p(7) = 17,... these being the primes for which the next prime is 2 greater: (lesser of) twin primes A001359.
Row 2: p(4) = 7, p(6) = 13, p(8) = 19,... these being the primes for which the next prime is 4 greater: (lesser of) cousin primes A029710.
		

Crossrefs

Rows 35, 40, 45, 50, ...: A204792, A126722, A204764, A050434 (row 50), A204801, A204672, A204802, A204803, A126724 (row 75), A184984, A204805, A204673, A204806, A204807 (row 100); A224472 (row 150).
Column 1: A000230.
Column 2: A046789.

Programs

  • Mathematica
    rows = 10; t2 = {}; Do[t = {}; p = Prime[2]; While[Length[t] < rows - off + 1, nextP = NextPrime[p]; If[nextP - p == 2*off, AppendTo[t, p]]; p = nextP]; AppendTo[t2, t], {off, rows}]; Table[t2[[b, a - b + 1]], {a, rows}, {b, a}] (* T. D. Noe, Feb 11 2014 *)
    t[r_, 0] = 2; t[r_, c_] := Block[{p = NextPrime@ t[r, c - 1], q}, q = NextPrime@ p; While[ p + 2r != q, p = q; q = NextPrime@ q]; p]; Table[ t[r - c + 1, c], {r, 10}, {c, r, 1, -1}] (* Robert G. Wilson v, Nov 06 2020 *)
  • PARI
    A174350_row(g, N=50, i=0, p=prime(i+1), L=[])={g*=2; forprime(q=1+p, , i++; if(p+g==p=q, L=concat(L, q-g); N--||return(L)))} \\ Returns the first N terms of row g. - M. F. Hasler, Oct 19 2018

Formula

a(n) = A000040(A174349(n)). - Michel Marcus, Mar 30 2016

Extensions

Definition corrected and other edits by M. F. Hasler, Oct 19 2018

A204813 Primes followed by a gap of 256 = nextprime(p)-p.

Original entry on oeis.org

1872851947, 2362150363, 2394261637, 2880755131, 2891509333, 3353981623, 3512569873, 3727051753, 3847458487, 4008610423, 4486630573, 4541745583, 4755895531, 4837532347, 5227869607, 5389475977, 6201260587, 6229685347, 6952228483, 7325665111, 7414468513
Offset: 1

Views

Author

M. F. Hasler, Jan 19 2012

Keywords

Crossrefs

Programs

  • PARI
    list_gaps(g=256,f,N=25,p=0)=for(c=1,N,while(g+p!=p=nextprime(p+1),);if(f,write(f".txt",c" ",p-g),print1(", "p-g)))

Extensions

a(8)-a(21) from Washington Bomfim

A224472 Primes followed by a gap of 300.

Original entry on oeis.org

4758958741, 5612345261, 6169169561, 6306815239, 6646984159, 7335508261, 8645089003, 8806019249, 9047808247, 9148138313, 9466071347, 9907846261, 10055451683, 11063821453, 11475026363, 11603081459, 12292390637, 12750876857, 13833827471, 14636472007, 15876700949
Offset: 1

Views

Author

Zak Seidov, Apr 07 2013

Keywords

Comments

The first twin gap equal to 300 occurs for p = 6537587646371. - Giovanni Resta, Apr 07 2013

Crossrefs

Cf. A058193 (first gap of 6n), A140791 (first gap of 10n), A126771 (gap 60), A126724 (gap 150), A204673 (gap 180), A204807 (gap 200), A000230, A001359, A204672, A029710, A031924-A031938, A061779, A098974, A124594-A124596, A126784, A134116-A134124, A204665-A204670.

A346249 Möbius transform of A337549.

Original entry on oeis.org

0, 0, 1, 2, 1, 1, 3, 8, 10, 1, 1, 8, 3, 3, 7, 28, 1, 10, 3, 12, 15, 1, 5, 28, 16, 3, 62, 24, 1, 7, 5, 92, 13, 1, 21, 52, 3, 3, 21, 44, 1, 15, 3, 24, 56, 5, 5, 92, 58, 16, 19, 36, 5, 62, 15, 84, 27, 1, 1, 44, 5, 5, 108, 292, 27, 13, 3, 36, 37, 21, 1, 168, 5, 3, 68, 48, 39, 21, 3, 148, 346, 1, 5, 84, 21, 3, 31, 92, 7, 56
Offset: 1

Views

Author

Antti Karttunen, Jul 14 2021

Keywords

Crossrefs

Sequences A001359, A029710, A031924 give the subsets of positions of 1's, 3's and 5's in this sequence.

Programs

  • PARI
    A003972(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); eulerphi(factorback(f)); };
    A337549(n) = (A003972(n) - n);
    A346249(n) = sumdiv(n,d,moebius(n/d)*A337549(d));

Formula

a(n) = A008683(n/d) * A337549(d).
a(A000040(n)) = A001223(n)-1. - Antti Karttunen, Dec 06 2021
Previous Showing 21-30 of 37 results. Next