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

A163573 Primes p such that (p+1)/2, (p+2)/3 and (p+3)/4 are also primes.

Original entry on oeis.org

12721, 16921, 19441, 24481, 49681, 61561, 104161, 229321, 255361, 259681, 266401, 291721, 298201, 311041, 331921, 419401, 423481, 436801, 446881, 471241, 525241, 532801, 539401, 581521, 600601, 663601, 704161, 709921, 783721, 867001, 904801
Offset: 1

Views

Author

Keywords

Comments

Are all terms == 1 (mod 10)?
Subsequence of A005383, of A091180 and of A036570. - R. J. Mathar, Aug 01 2009
Since (p+2)/3 and (p+3)/4 must be integer, the Chinese remainder theorem shows that all terms are == 1 (mod 12). - R. J. Mathar, Aug 01 2009
All terms are of the form 120k+1: a(n)=120*A163625(n)+1. - Zak Seidov, Aug 01 2009
Each term is congruent to 1 mod 120, so the last digits are always '1': For all four values to be integers it must be that p = 1 (mod 12). As p is prime, it must be that p = 1, 13, 37, 49, 61, 73, 97, or 109 (mod 120). In all but the first case either (p+3)/4 is even or one of the three expressions gives a value divisible by 5 (or both, and possibly the same expression). - Rick L. Shepherd, Aug 01 2009
{6*a(n)}A050498.%20Proof:%20with%20p%20=%20a(n)%20the%20arithmetic%20progression%20with%20four%20terms%20of%20difference%206%20and%20constant%20value%20of%20Euler's%20phi,%20namely%202*(p-1),%20is%206*(p,%202*(p+1)/2,%203*(p+2)/3,%204*(p+3)/4).%20Use%20phi(n,%20prime)%20=%20phi(n)*(prime-1)%20if%20gcd(n,%20prime)%20=%201.%20Here%20n%20=%206,%2012,%2018,%2024%20and%20prime%20%3E%203%20for%20p%20%3E=%20a(1).%20Thanks%20to%20_Hugo%20Pfoertner">{n >= 1} is a subsequence of A050498. Proof: with p = a(n) the arithmetic progression with four terms of difference 6 and constant value of Euler's phi, namely 2*(p-1), is 6*(p, 2*(p+1)/2, 3*(p+2)/3, 4*(p+3)/4). Use phi(n, prime) = phi(n)*(prime-1) if gcd(n, prime) = 1. Here n = 6, 12, 18, 24 and prime > 3 for p >= a(1). Thanks to _Hugo Pfoertner for a link to the present sequence in connection with A339883. - Wolfdieter Lang, Jan 11 2021

Crossrefs

Programs

  • Magma
    [p: p in PrimesInInterval(6, 1200000) | IsPrime((p+1) div 2) and IsPrime((p+2) div 3) and IsPrime((p+3) div 4)]; // Vincenzo Librandi, Apr 09 2013
    
  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[(p+1)/2]&&PrimeQ[(p+2)/3]&&PrimeQ[(p+3)/ 4],AppendTo[lst,p]],{n,2*9!}];lst
  • PARI
    is(n)=n%120==1 && isprime(n) && isprime(n\2+1) && isprime(n\3+1) && isprime(n\4+1) \\ Charles R Greathouse IV, Nov 30 2016
    
  • Python
    from sympy import prime, isprime
    A163573_list = [4*q-3 for q in (prime(i) for i in range(1,10000)) if isprime(4*q-3) and isprime(2*q-1) and (not (4*q-1) % 3) and isprime((4*q-1)//3)] # Chai Wah Wu, Nov 30 2016

Extensions

Slightly edited by R. J. Mathar, Aug 01 2009

A036570 Primes p such that (p+1)/2 and (p+2)/3 are also primes.

Original entry on oeis.org

13, 37, 157, 541, 877, 1201, 1381, 1621, 2017, 2557, 2857, 3061, 4357, 4441, 5077, 5581, 5701, 6337, 6637, 6661, 6997, 7417, 8221, 9181, 9661, 9901, 10837, 11497, 12457, 12601, 12721, 12757, 13681, 14437, 15241, 16921, 17077, 18217
Offset: 1

Views

Author

Keywords

Comments

The prime p is followed by two semiprimes; a third semiprime is not possible. - T. D. Noe, Jul 23 2008
A subsequence of A005383, which has A163573 as a subsequence. - M. F. Hasler, Feb 26 2012
Similarly, the only "prime sandwiched by semiprimes" is 5. - Zak Seidov, Aug 04 2013
For n > 1, a(n) == 1 or (7 mod 10). If a(n) == 3 (mod 10), then (a(n) + 2)/3 == 0 (mod 5) which is a composite number if a(n) > 13. - Chai Wah Wu, Nov 30 2016
All terms are congruent to 1 (mod 12). - Zak Seidov, Feb 16 2017

Crossrefs

A278583 is an equivalent sequence.
See also A278585.

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[(p+1)/2]&&PrimeQ[(p+2)/3],AppendTo[lst,p]],{n,8!}];lst (* Vladimir Joseph Stephan Orlovsky, Jul 31 2009 *)
  • PARI
    is_A036570(n)={ !(n%3-1) & isprime(n\3+1) & isprime(n\2+1) & isprime(n) }
    for(n=1,2e4,is_A036570(n) & print1(n","))  \\ M. F. Hasler, Feb 26 2012

A278500 a(n) = largest k such that n+1 = a prime, n+2 = 2 * a prime, ..., n+k is k times a prime, a(n) = 0 if n+1 is not a prime.

Original entry on oeis.org

1, 2, 0, 2, 0, 1, 0, 0, 0, 1, 0, 3, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Antti Karttunen, Nov 30 2016

Keywords

Comments

First 4 occurs at n=12720, first 5 occurs at n=19440. See A074200.

Examples

			a(12) = 3 as 13 = 1*prime, 14 = 2*prime, 15 = 3*prime.
		

Crossrefs

Cf. A072668 (positions of zeros), A006093 (nonzeros), A089965 (positions of terms >= 2), A278583 (of terms >= 3), A278585 (of terms >= 4).
Cf. A074200 (position of the first term >= n).

Programs

  • Mathematica
    Table[If[CompositeQ[n + 1], 0, k = 1; While[Times @@ Boole@ Map[PrimeQ, MapIndexed[#1/First@ #2 &, (n + Range@ k)]] == 1, k++]; k - 1], {n, 120}] (* Michael De Vlieger, Dec 01 2016 *)
  • PARI
    A278500(n) = { my(k=1); while((!((n+k)%k) && isprime((n+k)/k)), k = k+1); (k-1); }
    for(n=1, 2^20, write("b278500.txt", n, " ", A278500(n)));
    
  • Scheme
    (define (A278500 n) (let loop ((k 1)) (let ((h (/ (+ n k) k))) (if (or (not (integer? h)) (zero? (A010051 h))) (- k 1) (loop (+ 1 k))))))
Showing 1-3 of 3 results.