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 15 results. Next

A067774 Primes p such that p+2 is not a prime.

Original entry on oeis.org

2, 7, 13, 19, 23, 31, 37, 43, 47, 53, 61, 67, 73, 79, 83, 89, 97, 103, 109, 113, 127, 131, 139, 151, 157, 163, 167, 173, 181, 193, 199, 211, 223, 229, 233, 241, 251, 257, 263, 271, 277, 283, 293, 307, 313, 317, 331, 337, 349, 353, 359, 367, 373, 379, 383, 389
Offset: 1

Views

Author

Benoit Cloitre, Feb 06 2002

Keywords

Comments

Primes n such that n!*B(n+1) is an integer where B(k) are the Bernoulli numbers.
All primes except for the lower members of twin primes - i.e. remove 3, 5, 11, 17, 29, 41, 59, 71, 101, 107, 137, ... - Gerard Schildberger, Feb 13 2005

Crossrefs

Cf. A049591.
Complement of A001359 in A000040, A025584, A007510.

Programs

Formula

Except for a(1)=2, a(n+1)=A049591(n).
a(n) ~ n log n. - Charles R Greathouse IV, Jul 01 2013

Extensions

Better description from Vladeta Jovovic, Dec 14 2002

A136798 First term in a sequence of at least 3 consecutive composite integers.

Original entry on oeis.org

8, 14, 20, 24, 32, 38, 44, 48, 54, 62, 68, 74, 80, 84, 90, 98, 104, 110, 114, 128, 132, 140, 152, 158, 164, 168, 174, 182, 194, 200, 212, 224, 230, 234, 242, 252, 258, 264, 272, 278, 284, 294, 308, 314, 318, 332, 338, 350, 354, 360, 368, 374, 380, 384, 390, 398
Offset: 1

Views

Author

Enoch Haga, Jan 21 2008

Keywords

Comments

The meaning of "first" is that the run of composites is started with this term, that is, it is the one after a prime.
The number of terms in any run of composites is odd, because the difference between the relevant consecutive primes is even.
Composite numbers m such that m+1 is also composite, but m-1 is not. - Reinhard Zumkeller, Aug 04 2015

Examples

			a(1)=8 because 8 is the first term in a sequential run of 3 composites, 8,9,10
		

Crossrefs

a(n) = 2 * A104280(n).

Programs

  • Haskell
    import Data.List (elemIndices)
    a136798 n = a136798_list !! (n-1)
    a136798_list = tail $ map (+ 1) $ elemIndices 1 $
       zipWith (*) (0 : a010051_list) $ map (1 -) $ tail a010051_list
    -- Reinhard Zumkeller, Aug 04 2015
  • Mathematica
    Prime/@Flatten[Position[Differences[Prime[Range[80]]],?(#>2&)]]+1 (* _Harvey P. Dale, Jun 19 2013 *)

Formula

a(n) = A049591(n)+1. - R. J. Mathar, Jan 23 2008
A010051(a(n)-1) * (1 - A010051(a(n)) - A010051(a(n)+1)) = 1. - Reinhard Zumkeller, Aug 04 2015

Extensions

Edited by R. J. Mathar, May 27 2009

A067775 Primes p such that p + 4 is composite.

Original entry on oeis.org

2, 5, 11, 17, 23, 29, 31, 41, 47, 53, 59, 61, 71, 73, 83, 89, 101, 107, 113, 131, 137, 139, 149, 151, 157, 167, 173, 179, 181, 191, 197, 199, 211, 227, 233, 239, 241, 251, 257, 263, 269, 271, 281, 283, 293, 311, 317, 331, 337, 347, 353, 359, 367, 373, 383, 389
Offset: 1

Views

Author

Benoit Cloitre, Feb 06 2002

Keywords

Comments

Primes n such that n!*B(n+3) is an integer where B(k) are the Bernoulli numbers B(1) = -1/2, B(2) = 1/6, B(4) = -1/30, ..., B(2m+1) = 0 for m > 1.
If n is prime n!*B(n-1) is always an integer. Note that if Goldbach's conjecture (2n = p1 + p2 for all n >= 2) is false and K is the smallest value of n for which it fails, then for 2(K-2) = p3 + p4, the primes p3 and p4 must be taken from this list. See similar comment for A140555. - Keith Backman, Apr 06 2012
Complement of A023200 (primes p such that p + 4 is also prime) with respect to A000040 (primes). For p > 2: primes p such that there is no prime of the form r^2 + p where r is prime, subsequence of A232010. Example: the prime 7 is not in the sequence because 2^2 + 7 = 11 (prime). A232009(a(n)) = 0 for n > 1 . - Jaroslav Krizek, Nov 22 2013

Crossrefs

Programs

  • Mathematica
    A067775 = {}; Do[p = Prime@ n; If[ IntegerQ[ p! BernoulliB[p + 3]], AppendTo[A067775, p]], {n, 77}]; A067775 (* Robert G. Wilson v, Aug 19 2008 *)
    Select[Prime[Range[80]], Not[PrimeQ[# + 4]] &] (* Alonso del Arte, Apr 02 2014 *)
  • PARI
    lista(nn) = {forprime(p=1, nn, if (! isprime(p+4), print1(p, ", ")););} \\ Michel Marcus, Nov 22 2013

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Nov 22 2013

Extensions

New name from Klaus Brockhaus at the suggestion of Michel Marcus, Nov 22 2013

A105399 Largest prime <= numbers of the form 6k+3 (duplicates removed).

Original entry on oeis.org

3, 7, 13, 19, 23, 31, 37, 43, 47, 53, 61, 67, 73, 79, 83, 89, 97, 103, 109, 113, 127, 131, 139, 151, 157, 163, 167, 173, 181, 193, 199, 211, 223, 229, 233, 241, 251, 257, 263, 271, 277, 283, 293, 307, 313, 317, 331, 337, 349, 353, 359, 367, 373, 379, 383, 389
Offset: 1

Views

Author

Giovanni Teofilatto, May 01 2005

Keywords

Comments

Apart from the initial 3, the same as A049591. [Proof from T. Khovanova, Jan 23 2008: True for primes up to 5 by inspection. Higher primes must be of the form 6k+1 or 6k+5 since 6k+2 and 6k+4 are divisible by 2 and 6k+3 is divisible by 3. So searching the prime p backwards from the composite, odd 6k+3 in steps of 2 implies that p+2, skipped during that scan, is composite. So p is not in A001359 but in A049591.] - R. J. Mathar, Jan 28 2008

Examples

			7 is in the sequence because 7 is the largest prime < 9=6*1+3.
		

Crossrefs

Cf. A106002.
Cf. A049591.

Programs

  • Mathematica
    pp[n_] := Block[{k = n},While[ ! PrimeQ[k], k-- ];k];Union[Table[pp[6n + 3], {n, 0, 65}]] (* Ray Chandler, Oct 17 2006 *)
    Union[If[PrimeQ[#],#,NextPrime[#,-1]]&/@(6*Range[0,70]+3)] (* Harvey P. Dale, Aug 20 2021 *)

Extensions

Edited, corrected and extended by Ray Chandler, Oct 17 2006

A297925 Even numbers k such that k - 5 is prime but k - 3 is not prime.

Original entry on oeis.org

12, 18, 24, 28, 36, 42, 48, 52, 58, 66, 72, 78, 84, 88, 94, 102, 108, 114, 118, 132, 136, 144, 156, 162, 168, 172, 178, 186, 198, 204, 216, 228, 234, 238, 246, 256, 262, 268, 276, 282, 288, 298, 312, 318, 322, 336, 342, 354, 358, 364, 372, 378, 384, 388, 394, 402, 406, 414, 426, 438, 444, 448, 454
Offset: 1

Views

Author

David James Sycamore, Jan 08 2018

Keywords

Comments

Even numbers that are the sum of 5 and another prime, but not the sum of 3 and another prime. For n >= 1, a(n) - 5 = A049591(n), a(n) - 3 = A107986(n+1).
Let r(n) = a(n) - 5, Then r(n) is the greatest prime < a(n), and therefore A056240(a(n)) = 5*r(n). Furthermore, since r(n) + 2 must be composite, A056240(a(n)) = 5*A049591(n).
The terms in this sequence, combined with those in A298366 and A298252 form a partition of A005843(n);n>=3 (nonnegative even numbers>=6). This is because any even integer n>=6 satisfies either (i) n-3 is prime, (ii) n-5 is prime but n-3 is composite, or (iii) both n-5 and n-3 are composite.

Examples

			12 is a term because 12 - 5 = 7 is prime, and 12 - 3 = 9 is composite. Also A049591(1)+5=7+5=12 and A107986(2)+3=9+3=12.
18 is a term because 18 - 5 = 13 is prime, and 18 - 3 = 15 is composite.
16 is not a term because 16 - 5 = 11 and 16 - 3 = 13 are both prime.
		

Crossrefs

Similar to A130038. Subsequence of A175222.

Programs

  • GAP
    Filtered([8..500], k-> IsPrime(k-5) and not IsPrime(k-3) and (k mod 2)=0); # G. C. Greubel, May 21 2019
  • Magma
    [n: n in [3..500] | IsPrime(n-5) and not IsPrime(n-3) and (n mod 2) eq 0]; // G. C. Greubel, May 21 2019
    
  • Maple
    N:=100
    for n from 8 to N by 2 do
    if isprime(n-5) and not isprime(n-3) then print (n);
    end if
    end do
  • Mathematica
    Select[Range[6, 500, 2], And[PrimeQ[# - 5], ! PrimeQ[# - 3]] &] (* Michael De Vlieger, Jan 10 2018 *)
    Select[Range[6, 500, 2], Boole[PrimeQ[# -{5, 3}]] == {1, 0} &] (* Harvey P. Dale, Jan 30 2024 *)
  • PARI
    isok(n) = !(n % 2) && isprime(n-5) && !isprime(n-3); \\ Michel Marcus, Jan 09 2018
    
  • Sage
    [n for n in (3..500) if is_prime(n-5) and not is_prime(n-3) and (mod(n, 2)==0)] # G. C. Greubel, May 21 2019
    

Formula

a(n) = A049591(n) + 5 = A107986(n+1) + 3 for all n >= 1.

A263091 Primes p for which A049820(x) = p has no solution.

Original entry on oeis.org

7, 13, 19, 37, 43, 67, 79, 103, 109, 113, 131, 163, 167, 193, 229, 241, 251, 257, 271, 293, 307, 313, 353, 359, 379, 383, 397, 401, 439, 463, 479, 487, 491, 499, 503, 509, 563, 571, 647, 653, 661, 673, 701, 739, 743, 757, 761, 773, 823, 859, 863, 883, 887, 911, 937, 941, 953, 967, 971, 977, 983, 1009, 1093, 1103, 1109, 1171, 1181, 1193, 1217, 1279, 1283, 1291, 1297, 1307, 1321, 1361
Offset: 1

Views

Author

Antti Karttunen, Oct 11 2015

Keywords

Comments

Primes p that there is no such k for which k - d(k) = p, where d(k) is the number of divisors of k (A000005).

Crossrefs

Complement among primes: A263090.
Intersection of A000040 and A045765.
Subsequence of A067774 (A049591).

Programs

  • Mathematica
    lim = 10000; s = Select[Complement[Range@ lim, Sort@ DeleteDuplicates@ Table[n - DivisorSigma[0, n], {n, lim}]], PrimeQ]; Take[s, 76] (* Michael De Vlieger, Oct 13 2015 *)
  • PARI
    allocatemem(123456789);
    uplim1 = 2162160 + 320; \\ = A002182(41) + A002183(41).
    v060990 = vector(uplim1);
    for(n=3, uplim1, v060990[n-numdiv(n)]++);
    A060990 = n -> if(!n,2,v060990[n]);
    n=0; forprime(p=2, 524287, if((0 == A060990(p)), n++; write("b263091.txt", n, " ", p)));
    
  • Scheme
    ;; With Antti Karttunen's IntSeq-library.
    (define A263091 (MATCHING-POS 1 1 (lambda (n) (and (= 1 (A010051 n)) (zero? (A060990 n))))))

A069231 Numbers n such that there are exactly 3 primes p satisfying the inequality n < p < n + tau(n)^2 where tau(n) = A000005(n).

Original entry on oeis.org

4, 9, 21, 51, 55, 62, 74, 77, 82, 86, 87, 91, 106, 122, 123, 129, 134, 142, 143, 145, 146, 155, 158, 159, 161, 177, 183, 214, 215, 217, 237, 249, 254, 259, 265, 274, 278, 298, 299, 301, 309, 334, 335, 339, 341, 343, 358, 365, 371, 377, 382, 386, 394, 395, 407
Offset: 1

Views

Author

Benoit Cloitre, Apr 13 2002

Keywords

Crossrefs

Programs

  • Maple
    filter:= n -> nops(select(isprime, [$(n+1) .. (n+numtheory:-tau(n)^2-1)]))=3:
    select(filter, [$1..1000]); # Robert Israel, Jan 05 2018
  • Mathematica
    fQ[n_] := Block[{r = Range[n, n + DivisorSigma[0, n]^2]}, If[ PrimeQ@ n, r = Rest@ r]; If[ PrimeQ[ r[[-1]]], r = Most@ r]; Length@ Select[r, PrimeQ] == 3]; Select[Range@410, fQ] (* Robert G. Wilson v, Jan 05 2018 *)
  • PARI
    isok(n) = #select(x->isprime(x), vector(numdiv(n)^2-1, k, k+n)) == 3; \\ Michel Marcus, Jun 18 2017

A069232 Numbers n such that there are exactly 2 primes p satisfying the inequality n < p < n + tau(n)^2 where tau(n) = A000005(n).

Original entry on oeis.org

2, 25, 85, 118, 119, 133, 141, 194, 209, 213, 235, 247, 253, 323, 326, 327, 329, 355, 362, 381, 391, 393, 398, 411, 413, 415, 422, 445, 466, 473, 481, 482, 493, 501, 502, 511, 514, 515, 517, 519, 533, 535, 537, 538, 542, 543, 545, 551, 553, 573, 579, 581, 583
Offset: 1

Views

Author

Benoit Cloitre, Apr 13 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[900],Length[Select[Range[#+1,#+DivisorSigma[0,#]^2-1],PrimeQ]] == 2&] (* Harvey P. Dale, Sep 20 2020 *)
  • PARI
    isok(n) = #select(x->isprime(x), vector(numdiv(n)^2-1, k, k+n)) == 2; \\ Michel Marcus, Jun 18 2017

Extensions

Missing term 2 added by Michel Marcus, Jun 18 2017

A069233 Numbers k such that there is exactly 1 prime p satisfying the inequality k < p < k + tau(k)^2 where tau(k) = A000005(k).

Original entry on oeis.org

3, 5, 11, 17, 29, 41, 49, 59, 71, 101, 107, 111, 115, 121, 137, 149, 169, 179, 191, 197, 201, 202, 203, 205, 206, 227, 239, 269, 281, 287, 289, 291, 295, 311, 314, 319, 321, 347, 361, 403, 419, 431, 461, 469, 471, 505, 521, 526, 527, 569, 599, 617, 622, 623
Offset: 1

Views

Author

Benoit Cloitre, Apr 13 2002

Keywords

Comments

Numbers k such that A069230(k) = 1. - Amiram Eldar, Jan 29 2025

Crossrefs

Programs

A297150 Let b(k) denote A292081(k); the sequence lists numbers b(2n) where for all m > n, b(2m) > b(2n).

Original entry on oeis.org

35, 65, 95, 115, 155, 185, 215, 235, 265, 305, 335, 365, 395, 415, 445, 485, 515, 545, 565, 635, 655, 695, 755, 785, 815, 835, 865, 905, 965, 995, 1055, 1115, 1145, 1165, 1205, 1255, 1285, 1315, 1355, 1385, 1415, 1465, 1535, 1565, 1585, 1655, 1685, 1745, 1765, 1795, 1835, 1865, 1895, 1915, 1945, 1985
Offset: 1

Views

Author

David James Sycamore, Dec 26 2017

Keywords

Comments

This is also an ascending subsequence of the even-indexed terms of A056240(2n) (of which A292081 is a subsequence). For n >= 1, a(n) is a semiprime of the form a(n)=5*A049591(n), and the index m in A056240 of any term in this sequence belongs to the sequence of even numbers m such that m-5 is prime and m-3 is not prime (A297925). See A297925 for explanation.

Examples

			a(1)=5*A049591(1)=5*7=35. Also A056240(A297925(1))=A056240(12)=35.
a(17)=5*A049591(17)=5*103=515. Also A056240(A297925(17))=A056240(108)=515.
		

Crossrefs

Programs

  • Magma
    [5*p: p in PrimesInInterval(3, 500) | not IsPrime(p + 2)]; // Vincenzo Librandi, Nov 12 2018
  • Mathematica
    5 Select[Prime[Range[3, 100]], ! PrimeQ[(# + 2)] &] (* Vincenzo Librandi, Nov 12 2018 *)

Formula

a(n) = 5*A049591(n) = A056240(A297925(n)).
Showing 1-10 of 15 results. Next