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

A005383 Primes p such that (p+1)/2 is prime.

Original entry on oeis.org

3, 5, 13, 37, 61, 73, 157, 193, 277, 313, 397, 421, 457, 541, 613, 661, 673, 733, 757, 877, 997, 1093, 1153, 1201, 1213, 1237, 1321, 1381, 1453, 1621, 1657, 1753, 1873, 1933, 1993, 2017, 2137, 2341, 2473, 2557, 2593, 2797, 2857, 2917, 3061, 3217, 3253
Offset: 1

Views

Author

Keywords

Comments

Also, n such that sigma(n)/2 is prime. - Joseph L. Pe, Dec 10 2001; confirmed by Vladeta Jovovic, Dec 12 2002
Primes that are followed by twice a prime, i.e., are followed by a semiprime. (For primes followed by two semiprimes, see A036570.) - Zak Seidov, Aug 03 2013, Dec 31 2015
If A005382(n) is in A168421 then a(n) is a twin prime with a Ramanujan prime, A104272(k) = a(n) - 2. - John W. Nicholson, Jan 07 2016
Starting with 13 all terms are congruent to 1 mod 12. - Zak Seidov, Feb 16 2017
Numbers n such that both n and n+12 are terms are 61, 661, 1201, 4261, 5101, 6121, 6361 (all congruent to 1 mod 60). - Zak Seidov, Mar 16 2017
Primes p for which there exists a prime q < p such that 2q == 1 (mod p). Proof: q = (p + 1)/2. - David James Sycamore, Nov 10 2018
Prime numbers n such that phi(sigma(2n)) = phi(2n), excluding n=3 and n=5; as well as phi(sigma(3n)) = phi(3n), excluding n=3 only. - Richard R. Forberg, Dec 22 2020

Examples

			Both 3 and (3+1)/2 = 2 are primes, both 5 and (5+1)/2 = 3 are primes. - _Zak Seidov_, Nov 19 2012
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A subsequence of A000040 which has A036570 as subsequence.

Programs

  • Haskell
    a005383 n = a005383_list !! (n-1)
    a005383_list = [p | p <- a065091_list, a010051 ((p + 1) `div` 2) == 1]
    -- Reinhard Zumkeller, Nov 06 2012
    
  • MATLAB
    LIMIT = 8000 % Find all members of A005383 less than LIMIT A = primes(LIMIT); n = length(A); %n is number of primes less than LIMIT B = 2*A - 1; C = ones(n, 1)*A; %C is an n X n matrix, with C(i, j) = j-th prime D = B'*ones(1, n); %D is an n X n matrix, with D(i, j) = (i-th prime)*2 - 1 [i, j] = find(C == D); A(j)
    
  • Magma
    [n: n in [1..3300] | IsPrime(n) and IsPrime((n+1) div 2) ]; // Vincenzo Librandi, Sep 25 2012
    
  • Maple
    for n to 300 do
      X := ithprime(n);
    Y := ithprime(n+1);
    Z := 1/2 mod Y;
      if isprime(Z) then print(Y);
    end if:
    end do:
    # David James Sycamore, Nov 11 2018
  • Mathematica
    Select[Prime[Range[1000]], PrimeQ[(# + 1)/2] &] (* Zak Seidov, Nov 19 2012 *)
  • PARI
    A005383_list(n) = select(m->isprime(m\2+1),primes(n)[2..n]) \\ Charles R Greathouse IV, Sep 25 2012
    
  • Python
    from sympy import isprime
    [n for n in range(3, 5000) if isprime(n) and isprime((n + 1)//2)]
    # Indranil Ghosh, Mar 17 2017
    
  • Sage
    [n for n in prime_range(3, 1000) if is_prime((n + 1) // 2)]
    # F. Chapoton, Dec 17 2019

Formula

a(n) = A129521(n)/A005382(n). - Reinhard Zumkeller, Apr 19 2007
A000035(a(n))*A010051(a(n))*A010051((a(n)+1)/2) = 1. - Reinhard Zumkeller, Nov 06 2012
a(n) = 2*A005382(n) - 1. - Zak Seidov, Nov 19 2012
a(n) = A005382(n) + phi(A005382(n)) = A005382(n) + A000010(A005382(n)). - Torlach Rush, Mar 10 2014

Extensions

More terms from David Wasserman, Jan 18 2002
Name changed by Jianing Song, Nov 27 2021

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

A350675 Numbers k such that tau(k) + tau(k+1) + tau(k+2) = 10, where tau is the number of divisors function A000005.

Original entry on oeis.org

6, 11, 13, 17, 21, 37, 57, 157, 177, 381, 501, 541, 717, 877, 1201, 1317, 1381, 1437, 1621, 1821, 2017, 2557, 2577, 2857, 2901, 3061, 3117, 3777, 4281, 4357, 4441, 4677, 4701, 5077, 5097, 5581, 5637, 5701, 5937, 6337, 6637, 6661, 6717, 6997, 7417, 8221, 8781
Offset: 1

Views

Author

Jon E. Schoenfield, Jan 10 2022

Keywords

Comments

Since tau(k) + tau(k+1) + tau(k+2) = 10 and no three consecutive integers include more than one square, the triple (tau(k), tau(k+1), tau(k+2)) must consist of three even numbers, so it must be one of (2, 2, 6), (2, 4, 4), (2, 6, 2), (4, 2, 4), (4, 4, 2), and (6, 2, 2). Of these, (2, 2, 6) and (6, 2, 2) are impossible. Of the remaining patterns:
(2, 4, 4) requires that k be an odd prime other than 3, followed by two semiprimes, so k is a prime p such that (p+1)/2 and (p+2)/3 are also prime, and such primes are 13, 37, 157, 541, ... (A036570);
(2, 6, 2) requires that (k, k+2) be a twin prime pair whose average has exactly 6 divisors, and is thus either 12 or 18, so k is 11 or 17;
(4, 2, 4) requires that k+1 be an odd prime, with both k and k+2 having exactly 4 divisors, even though one of them is a multiple of 4, so that one is k+2 = 2^3 = 8, so k = 6;
(4, 4, 2) requires that k+2 be an odd prime > 3, preceded by two semiprimes, so k+2 is a prime p such that (p-1)/2 and (p-2)/3 are also prime, so k+2 is in {23, 59, 179, 383, ...} (which is A181841, after its first two terms, 7 and 11), so k is in {A181841(n) - 2} \ {5, 9}, i.e., k is in {21, 57, 177, 381, ...}.
Tau(k) + tau(k+1) + tau(k+2) >= 10 for all sufficiently large k; the only numbers k for which tau(k) + tau(k+1) + tau(k+2) < 10 are 1..5, 7, and 9.

Examples

			Each of the patterns (tau(k), ..., tau(k+2)) that appears repeatedly for large k corresponds to one of the two possible orders in which the multipliers m=1..3 can appear among 3 consecutive integers of the form m*prime. E.g., k=37 begins a run of 3 consecutive integers having the form (p, 2*q, 3*r), where p, q, and r are distinct primes > 3; k=57 begins a similar run, but there the 3 consecutive integers have the form (3*p, 2*q, r).
For each of the patterns of tau values that does not occur repeatedly for large k, one or more of the three consecutive integers in k..k+2 has no prime factor > 3; in the table below, each such integer appears in parentheses in the columns on the right.
.
                              factorization as
              # divisors of    m*(prime > 3)
  n  a(n)=k     k  k+1 k+2      k   k+1  k+2
  -  ------    --- --- ---    ---- ---- ----
  1      6      4   2   4      (6)   q   (8)
  2     11      2   6   2       p  (12)   r
  3     13      2   4   4       p   2q   3r
  4     17      2   6   2       p  (18)   r
  5     21      4   4   2      3p   2q    r
  6     37      2   4   4       p   2q   3r
  7     57      4   4   2      3p   2q    r
		

Crossrefs

Numbers k such that Sum_{j=0..N-1} tau(k+j) = 2*Sum_{k=1..N} tau(k): A000040 (N=1), A350593 (N=2), (this sequence) (N=3), A350686 (N=4), A350699 (N=5), A350769 (N=6), A350773 (N=7), A350854 (N=8).

Programs

  • Mathematica
    Position[Plus @@@ Partition[Array[DivisorSigma[0, #] & , 10^4], 3, 1], 10] // Flatten (* Amiram Eldar, Jan 11 2022 *)
  • PARI
    isok(k) = numdiv(k) + numdiv(k+1) + numdiv(k+2) == 10; \\ Michel Marcus, Jan 16 2022

Formula

{ k : tau(k) + tau(k+1) + tau(k+2) = 10 }.
UNION({6}, {11, 17}, A036570, {A181841(n) - 2} \ {5, 9}).
a(n) = A317670(n) - 1.

A278583 Numbers k such that k+1 is a prime, k+2 is twice a prime, and k+3 is three times a prime.

Original entry on oeis.org

12, 36, 156, 540, 876, 1200, 1380, 1620, 2016, 2556, 2856, 3060, 4356, 4440, 5076, 5580, 5700, 6336, 6636, 6660, 6996, 7416, 8220, 9180, 9660, 9900, 10836, 11496, 12456, 12600, 12720, 12756, 13680, 14436, 15240, 16920, 17076, 18216, 18300, 18396, 19440, 21000, 21576, 22620, 23556, 24480
Offset: 1

Views

Author

N. J. A. Sloane, Nov 30 2016

Keywords

Comments

All terms are divisible by 12. - Daniel Poveda Parrilla, Dec 12 2016

References

  • R. K. Guy, Posting to Number Theory Mailing List, Nov 30 2016

Crossrefs

Equals A036570(n) - 1.
Positions of terms >= 3 in A278500.
Cf. A074200.

Programs

  • Mathematica
    Select[Range[12,25000,12],AllTrue[{#+1,(#+2)/2,(#+3)/3},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 26 2020 *)
  • PARI
    list(lim)=my(v=List()); forprime(p=2,lim+1, if(p%6==1 && isprime(p\2+1) && isprime(p\3+1), listput(v,p-1))); Vec(v) \\ Charles R Greathouse IV, Dec 03 2016

A181841 Supersafe primes.

Original entry on oeis.org

7, 11, 23, 59, 179, 383, 503, 719, 1319, 1439, 1823, 2579, 2903, 3119, 3779, 4283, 4679, 4703, 5099, 5639, 5939, 6719, 8783, 8819, 10079, 12659, 12983, 13523, 15299, 15683, 16223, 17483, 18743, 19079, 21059, 21383, 21563, 22643, 23099, 23603, 24659, 25343
Offset: 1

Views

Author

Peter Luschny, Nov 17 2010

Keywords

Comments

p is a supersafe prime iff p is a safe prime (A005385) and floor(p/3) is a prime.
Each prime p > 7 is preceded by two semiprimes; a third semiprime is not possible. See A036570. - Zak Seidov, Sep 30 2012
Terms > 7 are congruent to 11 (mod 12). - Zak Seidov, Feb 09 2015

Examples

			11 is a supersafe prime because floor(11/2) = 5 and floor(11/3) = 3 are primes.
		

Crossrefs

Programs

  • Maple
    A181841_list := n->select(i->isprime(iquo(i,3)),
    select(i->isprime(iquo(i,2)), select(i->isprime(i),[$1..n]))):
  • Mathematica
    Join[{7}, Select[Table[Prime[n], {n, 4000}], PrimeQ[(# - 1)/2] && PrimeQ[(# - 2)/3] &]] (* Vladimir Joseph Stephan Orlovsky, Jun 21 2011 *)

A278585 Numbers k such that k+1 is a prime, k+2 is twice a prime, k+3 is three times a prime, and k+4 is four times a prime.

Original entry on oeis.org

12720, 16920, 19440, 24480, 49680, 61560, 104160, 229320, 255360, 259680, 266400, 291720, 298200, 311040, 331920, 419400, 423480, 436800, 446880, 471240, 525240, 532800, 539400, 581520, 600600, 663600, 704160, 709920, 783720, 867000, 904800, 908040, 918360
Offset: 1

Views

Author

N. J. A. Sloane, Nov 30 2016

Keywords

Comments

a(n) == 0 mod 120 (see comment in A163573). - Chai Wah Wu, Nov 30 2016

Crossrefs

Equals A163573(n) - 1.
Positions of terms >= 4 in A278500, thus a subsequence of A278583, A089965 and A006093.

Programs

  • Mathematica
    Select[Range[920000],AllTrue[{#+1,(#+2)/2,(#+3)/3,(#+4)/4},PrimeQ]&] (* Harvey P. Dale, Aug 08 2021 *)
  • PARI
    is(k)=k%120==0 && isprime(k+1) && isprime(k/2+1) && isprime(k/3+1) && isprime(k/4+1) \\ Charles R Greathouse IV, Dec 03 2016
  • Python
    from sympy import prime, isprime
    A278585_list = [4*q-4 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
    

A147615 a(n) = 13 + Sum_{j=4..n+3} j!.

Original entry on oeis.org

13, 37, 157, 877, 5917, 46237, 409117, 4037917, 43954717, 522956317, 6749977117, 93928268317, 1401602636317, 22324392524317, 378011820620317, 6780385526348317, 128425485935180317, 2561327494111820317, 53652269665821260317, 1177652997443428940317
Offset: 0

Views

Author

Ricky Pollack (rickypollack(AT)gmail.com), Apr 30 2009

Keywords

Comments

Are there infinitely many terms in the intersection of this sequence and A036570?
Answer from Don Reble, Mar 25 2016: No, after the ninth term, all terms are multiples of 13.

Examples

			a(0) = 13, a(1) = 13 + 4!, a(2) = 13 + 4! + 5!, ....
		

Crossrefs

Programs

  • Magma
    [n eq 0 select 13 else 13 + (&+[Factorial(j+4): j in [0..n-1]]): n in [0..30]]; // G. C. Greubel, Oct 24 2022
    
  • Mathematica
    A147615[n_]:= 13 +Sum[j!, {j,4,n+3}]; Table[A147615[n], {n,0,30}] (* G. C. Greubel, Oct 24 2022 *)
  • SageMath
    def A147615(n): return 13 + sum(factorial(j+4) for j in range(n))
    [A147615(n) for n in range(30)] # G. C. Greubel, Oct 24 2022

Formula

a(n) = 13 + !(n+4) - !4 = 13 + A003422(n+4) - A003422(4). - G. C. Greubel, Oct 24 2022

A386540 Primes p such that 2p - 1, 3p - 2, (p + 1)/2, and (p + 2)/3 are also prime.

Original entry on oeis.org

37, 2557, 3061, 5581, 88741, 124021, 157081, 178537, 216217, 216757, 217057, 330661, 344821, 352081, 387577, 423481, 459397, 477577, 521137, 790861, 806521, 865957, 869521, 1369657, 1517881, 1673401, 1704397, 1710661, 1970257, 2132797, 2292781, 2361781, 2680141
Offset: 1

Views

Author

Holger Wallenta, Jul 25 2025

Keywords

Comments

All terms are congruent to 1 modulo 12.
Let q = (p + 1)/2 and r = (p + 2)/3; then 3r = 2q + 1.

Examples

			37 is a term, since it is prime and 2*37 - 1 = 73, 3*37 - 2 = 109, (37 + 1)/2 = 19 and (37 + 2)/3 = 13 are all prime.
		

Crossrefs

Intersection of A036570 and A174734.

Programs

  • Maple
    select(p -> andmap(isprime,[p, 2*p-1,3*p-2,(p+1)/2,(p+2)/3]), [seq(1+12*i,i=1..10^6)]); # Robert Israel, Jul 25 2025
  • Mathematica
    Select[Prime[Range[2*10^5]],AllTrue[{2#-1,3#-2,(#+1)/2,(#+2)/3},PrimeQ]&] (* James C. McMahon, Jul 25 2025 *)
  • Python
    from gmpy2 import is_prime
    def ok(p): return p&1 and p%3 == 1 and all(is_prime(q) for q in [p, 2*p-1, 3*p-2, (p+1)//2, (p+2)//3])
    print([k for k in range(1, 10**7, 12) if ok(k)]) # Michael S. Branicky, Jul 25 2025

A306467 Let S(n)_k be the smallest positive integer t that t!k is a multiple of n (t!k is k-tuple factorial of t); then a(n) is the smallest k for which S(n)_k = n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 3, 2, 2, 1, 3, 1, 2, 3, 5, 1, 4, 1, 5, 3, 2, 1, 9, 4, 2, 7, 7, 1, 6, 1, 9, 3, 2, 5, 13, 1, 2, 3, 15, 1, 6, 1, 11, 10, 2, 1, 15, 6, 8, 3, 13, 1, 14, 5, 21, 3, 2, 1, 15, 1, 2, 14, 17, 5, 6, 1, 17, 3, 10, 1, 35, 1, 2, 12, 19, 7, 6, 1, 25
Offset: 1

Views

Author

Lechoslaw Ratajczak, Feb 17 2019

Keywords

Comments

If p is prime, a(p) = 1.
Conjecture: consecutive primes p satisfying the equation a(p+1) = 2 are consecutive elements of A005383 (primes p such that (p+1)/2 are also primes, for p > 3). The conjecture was checked for all primes < 10^4.
Conjecture: consecutive primes p satisfying the equations a(p+1) = 2 and a(p+2) = 3 are consecutive elements of A036570 (primes p such that (p+1)/2 and (p+2)/3 are also primes). The conjecture was checked for all primes < 10^4.
The first six solutions of the equation a(n) = a(n+1) are 1, 2, 3, 4, 9, 27. Is there a larger n? If such a number n exists, it is larger than 4000.

Examples

			a(8) = 3 because:
- for k = 1 is: 1!1, 2!1, 3!1 are not multiples of 8 and 4!1 is a multiple of 8, then (t = 4 = S(8)_1) <> (n = 8);
- for k = 2 is: 1!2, 2!2, 3!2 are not multiples of 8 and 4!2 is a multiple of 8, then (t = 4 = S(8)_2) <> (n = 8);
- for k = 3 is: 1!3, 2!3, 3!3, 4!3, 5!3, 6!3, 7!3 are not multiples of 8 and 8!3 is a multiple of 8, then (t = 8 = S(8)_3) = (n = 8), hence a(8) = k = 3.
		

Crossrefs

Showing 1-9 of 9 results.