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-10 of 13 results. Next

A152658 Beginnings of maximal chains of primes.

Original entry on oeis.org

5, 13, 29, 37, 43, 61, 89, 109, 131, 139, 227, 251, 269, 277, 293, 359, 389, 401, 449, 461, 491, 547, 569, 607, 631, 743, 757, 773, 809, 857, 887, 947, 971, 991, 1069, 1109, 1151, 1163, 1187, 1237, 1289, 1301, 1319, 1373, 1427, 1453, 1481, 1499, 1549, 1601
Offset: 1

Views

Author

Klaus Brockhaus, Dec 10 2008

Keywords

Comments

A sequence of consecutive primes prime(k), ..., prime(k+r), r >= 1, is called a chain of primes if i*prime(i) + (i+1)*prime(i+1) is prime (the linking prime for prime(i) and prime(i+1), cf. A119487) for i from k to k+r-1. A chain of primes prime(k), ..., prime(k+r) is maximal if it is not part of a longer chain, i.e. if neither (k-1)*prime(k-1) + k*prime(k) nor (k+r)*prime(k+r) + (k+r+1)*prime(k+r+1) is prime.
A chain of primes has two or more members; a prime is called secluded if it is not member of a chain of primes (cf. A152657).

Examples

			3*prime(3) + 4*prime(4) = 3*5 + 4*7 = 43 is prime and 4*prime(4) + 5*prime(5) = 4*7 + 5*11 = 83 is prime, so 5, 7, 11 is a chain of primes. 2*prime(2) + 3*prime(3) = 2*3 + 3*5 = 21 is not prime and 5*prime(5) + 6*prime(6) = 5*11 + 6*13 = 133 is not prime, hence 5, 7, 11 is maximal and prime(3) = 5 is the beginning of a maximal chain.
		

Crossrefs

Cf. A152117 (n*(n-th prime) + (n+1)*((n+1)-th prime)), A152657 (secluded primes), A119487 (primes of the form i*(i-th prime) + (i+1)*((i+1)-th prime), linking primes).
Cf. A105454 - Zak Seidov, Feb 04 2016

Programs

  • Magma
    [ p: n in [1..253] | (n eq 1 or not IsPrime((n-1)*PreviousPrime(p) +n*p) ) and IsPrime((n)*p+(n+1)*NextPrime(p)) where p is NthPrime(n) ];

A105455 Numbers k such that k*prime(k)+(k+1)*prime(k+1)+(k+2)*prime(k+2) is prime.

Original entry on oeis.org

1, 6, 12, 20, 22, 24, 28, 30, 34, 56, 60, 142, 144, 148, 168, 192, 196, 230, 252, 260, 276, 282, 304, 322, 334, 344, 346, 352, 366, 374, 380, 386, 394, 404, 418, 424, 432, 440, 444, 470, 478, 484, 572, 590, 610, 612, 630, 642, 662, 684, 754, 766, 784, 790, 840, 842, 874, 886
Offset: 1

Views

Author

Zak Seidov, May 02 2005

Keywords

Examples

			k=1: 1*prime(1) + 2*prime(2) + 3*prime(3) = 1*2 + 2*3 + 3*5 = 23 prime,
k=6: 6*prime(6) + 7*prime(7) + 8*prime(8) = 6*13 + 7*17 + 8*19 = 349 prime. - _Zak Seidov_, Feb 18 2016
		

Crossrefs

Programs

  • Magma
    [n: n in [1..1000] | IsPrime(n*NthPrime(n)+(n+1)*NthPrime(n+1)+(n+2)*NthPrime(n+2))]; // Vincenzo Librandi, Feb 06 2016
    
  • Mathematica
    bb={};Do[If[PrimeQ[n Prime[n]+(n+1) Prime[n+1]+(n+2) Prime[n+2]], bb=Append[bb, n]], {n, 1, 400}];bb
    Select[Range@ 900, PrimeQ[# Prime[#] + (# + 1) Prime[# + 1] + (# + 2) Prime[# + 2]] &] (* Michael De Vlieger, Feb 05 2016 *)
  • PARI
    lista(nn) = {for(n=1, nn, if(ispseudoprime(n*prime(n)+(n+1)*prime(n+1)+(n+2)*prime(n+2)), print1(n, ", "))); } \\ Altug Alkan, Feb 05 2016
    
  • Python
    from itertools import islice
    from sympy import isprime, nextprime
    def agen(): # generator of terms
        m, p, q, r = 1, 2, 3, 5
        while True:
            t = m*p + (m+1)*q + (m+2)*r
            if isprime(t): yield m
            m, p, q, r = m+1, q, r, nextprime(r)
    print(list(islice(agen(), 58))) # Michael S. Branicky, May 17 2022

A152117 a(n) = n*(n-th prime) + (n+1)*((n+1)-th prime).

Original entry on oeis.org

8, 21, 43, 83, 133, 197, 271, 359, 497, 631, 785, 977, 1135, 1307, 1553, 1851, 2101, 2371, 2693, 2953, 3271, 3647, 4045, 4561, 5051, 5407, 5777, 6157, 6551, 7327, 8129, 8713, 9247, 9941, 10651, 11245, 12003, 12707, 13433, 14259, 14941, 15815, 16705
Offset: 1

Views

Author

Klaus Brockhaus, Dec 10 2008

Keywords

Comments

a(n) = A033286(n) + A033286(n+1).

Examples

			5*(fifth prime) + 6*(sixth prime) = 5*11 + 6*13 = 55 + 78 = 133.
		

Crossrefs

Cf. A000040 (prime numbers), A033286 (n*(n-th prime)), A033287 (first differences of A033286), A119487 (primes in this sequence).

Programs

  • Magma
    [ n*NthPrime(n)+(n+1)*NthPrime(n+1): n in [1..43] ];
    
  • Mathematica
    Total/@Partition[Times@@@Table[{n,Prime[n]},{n,50}],2,1] (* Harvey P. Dale, Aug 13 2019 *)
  • PARI
    a(n) = n*prime(n) + (n+1)*prime(n+1); \\ Michel Marcus, Feb 05 2016

A152735 Count of links in n-th maximal chain of primes.

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, Dec 16 2008

Keywords

Comments

One less than count of members of n-th maximal chain of primes. For definitions see A152658.

Examples

			The consecutive primes 5, 7, 11 form the first maximal chain of primes (see example in A152658); it has three members, two links. Therefore a(1) = 2.
		

Crossrefs

Cf. A152658 (beginnings of maximal chains of primes), A152657 (secluded primes), A119487 (primes of the form i*(i-th prime) + (i+1)*((i+1)-th prime), linking primes).

Programs

  • PARI
    {n=1; while(n<560, c=0; while(isprime(n*prime(n)+(n+1)*prime(n+1)), c++; n++); if(c>0, print1(c, ",")); n++)}

A152962 Beginning of the first maximal chain of primes with n links (n+1 members).

Original entry on oeis.org

29, 5, 13, 61, 417037, 2153, 4580041
Offset: 1

Views

Author

Klaus Brockhaus, Dec 16 2008

Keywords

Comments

For definitions see A152658.
The prime indices of the terms are 10, 3, 6, 18, 35153, 325, 321150.
Is this sequence finite, i.e. is the length (count of members) of chains of primes bounded?

Examples

			First maximal chain of primes with one link (two members) is 29, 31; the linking prime is 631.
		

Crossrefs

Cf. A152658 (beginnings of maximal chains of primes), A152735 (count of links in n-th maximal chain of primes), A119487 (primes of the form i*(i-th prime) + (i+1)*((i+1)-th prime), linking primes), A152865, A152866, A152867, A152868, A152869, A152963, A152964.

A152963 Beginnings of maximal chains of primes with seven members (six links).

Original entry on oeis.org

2153, 10316897, 114286307, 220073429, 406733477
Offset: 1

Views

Author

Klaus Brockhaus, Dec 16 2008

Keywords

Comments

For definitions see A152658, of which this is a subsequence.

Examples

			First maximal chain of primes with seven members is 2153, 2161, 2179, 2203, 2207, 2213, 2221; the six linking primes are 1404211, 1417019, 1435117, 1448687, 1456393, 1465441.
		

Crossrefs

Cf. A152658 (beginnings of maximal chains of primes), A152962 (beginning of the first maximal chain of primes with n links), A152735 (count of links in n-th maximal chain of primes), A119487 (primes of the form i*(i-th prime) + (i+1)*((i+1)-th prime), linking primes), A152865, A152866, A152867, A152868, A152869, A152964.

A152964 Beginnings of maximal chains of primes with eight members (seven links).

Original entry on oeis.org

4580041, 608744947, 2784514741, 3336893489, 3743034679
Offset: 1

Views

Author

Klaus Brockhaus, Dec 16 2008

Keywords

Comments

For definitions see A152658, of which this is a subsequence.
Terms were computed by Farideh Firoozbakht (see C. Rivera link), who remarks that there are no other terms with prime indices up to 372*10^6, i.e., terms below approx. 8*10^9. The prime indices of the given terms are 321150, 31757516, 134558368, 159849354, 178323284.

Examples

			First maximal chain of primes with eight members is 4580041, 4580077, 4580117, 4580131, 4580141, 4580143, 4580201, 4580209; the seven linking primes are 2941776475777, 2941810043411, 2941836545827, 2941853413757, 2941866427879, 2941894857 521, 2941925214169.
		

Crossrefs

Cf. A152962 (beginning of the first maximal chain of primes with n links), A152658 (beginnings of maximal chains of primes), A152735 (count of links in n-th maximal chain of primes), A119487 (primes of the form i*(i-th prime) + (i+1)*((i+1)-th prime), linking primes), A152865, A152866, A152867, A152868, A152869, A152963.

A105454 Numbers k such that k*prime(k)+(k+1)*prime(k+1) is prime.

Original entry on oeis.org

3, 4, 6, 7, 8, 10, 12, 14, 15, 18, 19, 20, 21, 24, 25, 26, 29, 32, 34, 35, 49, 50, 54, 57, 59, 60, 62, 72, 77, 79, 87, 89, 94, 101, 104, 111, 115, 132, 134, 137, 138, 140, 141, 142, 148, 154, 161, 162, 164, 167, 168, 180, 181, 182, 183, 186, 190, 192, 195, 203, 204
Offset: 1

Views

Author

Zak Seidov, May 02 2005

Keywords

Comments

Or, numbers k such that A152117(k) is prime. - Zak Seidov, Feb 05 2016

Examples

			4*prime(4)+5*prime(5) = 4*7+5*11 = 83 prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..250] | IsPrime(n*NthPrime(n)+(n+1)*NthPrime(n+1))]; // Vincenzo Librandi, Feb 06 2016
  • Mathematica
    bb={};Do[If[PrimeQ[n Prime[n]+(n+1)Prime[n+1]], bb=Append[bb, n]], {n, 400}];bb
    Select[Range[250],PrimeQ[# Prime[#]+(#+1)Prime[#+1]]&] (* Harvey P. Dale, Dec 08 2011 *)
  • PARI
    isok(n) = isprime(n*prime(n)+(n+1)*prime(n+1)); \\ Michel Marcus, Feb 05 2016
    
  • PARI
    lista(nn) = {for(n=1, nn, if(ispseudoprime(n*prime(n)+(n+1)*prime(n+1)), print1(n, ", ")));} \\ Altug Alkan, Feb 05 2016
    

A152657 Secluded primes.

Original entry on oeis.org

2, 3, 59, 83, 107, 127, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 239, 241, 263, 311, 313, 317, 331, 337, 347, 349, 353, 373, 379, 383, 419, 421, 431, 433, 439, 443, 467, 479, 487, 503, 509, 521, 523, 541, 563, 577, 587, 593, 599, 601, 617
Offset: 1

Views

Author

Klaus Brockhaus, Dec 10 2008

Keywords

Comments

A prime p is called secluded if it is not member of a chain of primes. A sequence of consecutive primes prime(k), ..., prime(k+r), r >= 1, is called a chain of primes if i*prime(i) + (i+1)*prime(i+1)* is prime for i from k to k+r-1.

Examples

			16*prime(16) + 17*prime(17) = 16*53 + 17*69 = 1851 = 3*617 is not prime; 17*prime(17) + 18*prime(18) = 17*59 + 18*61 = 2101 = 11+191 is not prime. Hence prime(17) = 59 is secluded.
		

Crossrefs

Cf. A152117 (n*(n-th prime) + (n+1)*((n+1)-th prime)), A152658 (beginnings of maximal chains of primes), A119487 (primes of the form i*(i-th prime) + (i+1)*((i+1)-th prime), linking primes).

Programs

  • Magma
    [ p: n in [1..113] | (n eq 1 or not IsPrime((n-1)*NthPrime(n-1)+k)) and not IsPrime(k+(n+1)*NthPrime(n+1)) where k is n*p where p is NthPrime(n) ];

A119488 Primes of the form prime(i+1)*(i+1) - prime(i)*i, for increasing values of i.

Original entry on oeis.org

13, 23, 41, 83, 103, 89, 103, 113, 227, 229, 547, 373, 419, 263, 373, 787, 419, 433, 593, 563, 577, 739, 487, 811, 823, 683, 1013, 599, 1153, 641, 827, 1571, 1223, 863, 883, 719, 1567, 1187, 1279, 1999, 1361, 1373, 1951, 1297, 2477, 1091, 1399, 1117, 2897, 1459
Offset: 1

Views

Author

Keywords

Comments

Some terms are repeated: e.g. 157*37 - 151*36 = 197*45 - 193*44 = 373.
The first numbers that are repeated 3 times are 96553, 104597, 109793, 139303, etc.

Examples

			The fourth prime is 7 and the third is 5.
Therefore 7*4 - 5*3 = 28 - 15 = 13 that is a prime.
		

Crossrefs

Cf. A119487.

Programs

  • Magma
    [m: i in [1..300] | IsPrime(m) where m is NthPrime(i+1)*(i+1)-NthPrime(i)*i]; // Bruno Berselli, Jun 06 2017
  • Maple
    P:=proc(n) local i, j; j:=ithprime(n+1)*(n+1)-ithprime(n)*n;
    if isprime(j) then j; fi; end: a:=seq(P(i), i=1..10000);
  • Mathematica
    Select[#[[2]] - #[[1]] &/@ Partition[Table[n Prime[n], {n, 300}], 2, 1], PrimeQ] (* Harvey P. Dale, Jun 05 2017 *)
Showing 1-10 of 13 results. Next