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

A119487 Primes of the form i*prime(i) + (i+1)*prime(i+1).

Original entry on oeis.org

43, 83, 197, 271, 359, 631, 977, 1307, 1553, 2371, 2693, 2953, 3271, 4561, 5051, 5407, 6551, 8713, 9941, 10651, 22573, 23333, 27689, 31051, 33203, 34123, 37507, 52639, 60919, 64399, 79279, 82699, 93559, 112061, 119131, 136033, 146921, 197959
Offset: 1

Views

Author

Keywords

Comments

Primes in A152117; also called linking primes, cf. A152658. - Klaus Brockhaus, Dec 11 2008

Examples

			The third prime is 5 and the fourth is 7. Therefore 5*3 + 7*4 = 15 + 28 = 43 which is a prime.
		

Crossrefs

Cf. A119488.
Cf. A152117 (n*(n-th prime) + (n+1)*((n+1)-th prime)), A152658 (beginnings of maximal chains of primes). - Klaus Brockhaus, Dec 11 2008

Programs

  • Magma
    [ q: n in [1..133] | IsPrime(q) where q is n*p+(n+1)*NextPrime(p) where p is NthPrime(n) ] // Klaus Brockhaus, Dec 11 2008
  • Maple
    P:=proc(n) local i,j; for i from 1 by 1 to n do j:=ithprime(i)*i +ithprime(i+1)*(i+1); if isprime(j) then print(i); fi; od; end: P(200);

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

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) ];

A145650 Linking prime for the first and second member of maximal chains of primes that have at least three members.

Original entry on oeis.org

43, 197, 1307, 2371, 4561, 9941, 22573, 33203, 214507, 227611, 306853, 332993, 389167, 505907, 695059, 758441, 810023, 1072657, 1202987, 1404211, 1567487, 1621621, 2407309, 2773681, 2854331, 2932511, 3013601, 3206773, 3851423
Offset: 1

Views

Author

Enoch Haga, Oct 15 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.
A145651 gives the linking prime for the second and third member of maximal chains of primes that have at least three members.
Suggested by J. M. Bergot in Puzzle 463 of Carlos Rivera's Prime Puzzles & Problems Connection

Examples

			Primes 13, 17, 19, 23 have prime indices 6, 7, 8, 9. 6*13 + 7*17 = 197 is prime; 7*17 + 8*19 = 271 is prime; 8*19 + 9*23 = 359 is prime. Neither 5*11 + 6*13 = 133 nor 9*23 + 10*29 = 497 is prime, so 13, 17, 19, 23 is maximal. Hence 6*13 + 7*17 = 197, the linking prime for 13 and 17, is in the sequence.
		

Crossrefs

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

Programs

  • Magma
    [ n*p+(n+1)*q: n in [1..520] | (n eq 1 or not IsPrime((n-1)*PreviousPrime(p)+n*p) ) and IsPrime(n*p+(n+1)*q) and IsPrime((n+1)*q+(n+2)*r) where r is NextPrime(q) where q is NextPrime(p) where p is NthPrime(n) ]; // Klaus Brockhaus, Dec 11 2008
  • PARI
    {n=1; while(n<520, c=0; while(isprime(b=n*prime(n)+(n+1)*prime(n+1)), c++; n++; if(c==1, a=b)); if(c>1, print1(a, ",")); n++)}
    

Extensions

Edited by Klaus Brockhaus, Dec 10 2008

A145651 Linking prime for the second and third member of maximal chains of primes that have at least three members.

Original entry on oeis.org

83, 271, 1553, 2693, 5051, 10651, 23333, 34123, 219389, 230933, 312007, 338017, 395309, 512891, 699437, 763999, 815257, 1078127, 1208791, 1417019, 1577561, 1629083, 2420609, 2787947, 2868787, 2944429, 3038639, 3222101, 3868201
Offset: 1

Views

Author

Enoch Haga, Oct 15 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.
A145650 gives the linking prime for the first and second member of maximal chains of primes that have at least three members.
Suggested by J. M. Bergot in Puzzle 463 of Carlos Rivera's Prime Puzzles & Problems Connection

Examples

			Primes 13, 17, 19, 23 have prime indices 6, 7, 8, 9. 6*13 + 7*17 = 197 is prime; 7*17 + 8*19 = 271 is prime; 8*19 + 9*23 = 359 is prime. Neither 5*11 + 6*13 = 133 nor 9*23 + 10*29 = 497 is prime, so 13, 17, 19, 23 is maximal. Hence 7*17 + 8*19 = 271, the linking prime for 17 and 19, is in the sequence.
		

Crossrefs

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

Programs

  • Magma
    [ (n+1)*q+(n+2)*r: n in [1..520] | (n eq 1 or not IsPrime((n-1)*PreviousPrime(p)+n*p) ) and IsPrime(n*p+(n+1)*q) and IsPrime((n+1)*q+(n+2)*r) where r is NextPrime(q) where q is NextPrime(p) where p is NthPrime(n) ]; // Klaus Brockhaus, Dec 11 2008
  • PARI
    {n=1; while(n<520, c=0; while(isprime(b=n*prime(n)+(n+1)*prime(n+1)), c++; n++; if(c==2, a=b)); if(c>1, print1(a, ",")); n++)}
    

Extensions

Edited by Klaus Brockhaus, Dec 10 2008

A268467 Smallest prime that is the (sum, k*prime(k),k=m,..n+m-1) for some m, or 0 if no such m exists.

Original entry on oeis.org

2, 43, 23, 0, 1109, 1187, 929, 0, 4973, 1291, 11197, 0, 26099, 15583, 4423, 0, 42139, 10729, 21283, 0, 36899, 27179, 21563, 0, 24359, 33863, 27361, 0, 223423, 51239, 293467, 42043, 67699, 56503, 118361, 0, 80449, 94693, 136739, 0, 127837, 136991, 387913, 0, 304259, 192013, 321721, 0, 339517, 357683
Offset: 1

Views

Author

Zak Seidov, Feb 05 2016

Keywords

Comments

Smallest prime that is the sum of n consecutive terms of A033286.
Apparently a(n) exists for any odd n.
Values of m = {1, 3, 1, 0, 7, 6, 4, 0, 9, 2, 12, 0, 17, 11, 2, 0, 17, 4, 8, 0, 11, 7, 4, 0, 3, 5, 2, 0, 27, 5, 30, 1, 5, 2, 10, 0, 3, 4, 8, 0, 5, 5, 22, 0, 15, 6, 14, 0, 13, 13, ...}. - Michael De Vlieger, Feb 05 2016

Examples

			n=1: m=1 and 1*prime(1) = 1*2 = 2 = a(1),
n=2: m=3 and 3*prime(3)+4*prime(4) = 3*5+4*7 = 43 = a(2),
n=3: m=1 and 1*prime(1)+2*prime(2)+3*prime(3) = 1*2+2*3+3*15 = 23 = a(3),
n=4: no solution => a(4) = 0,
n=5: m=7 and 7*prime(7)+..11*prime(11) = 119+152+207+290+341 = 1109 = a(5).
		

Crossrefs

Programs

  • Mathematica
    Table[If[# == 0, 0, Sum[k Prime@ k, {k, #, n + # - 1}]] &@(SelectFirst[Range[10^3], PrimeQ@ Sum[k Prime@ k, {k, #, n + # - 1}] &] /. x_ /; MissingQ@ x -> 0), {n, 50}] (* Michael De Vlieger, Feb 05 2016, Version 10.2 *)
Showing 1-8 of 8 results.