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

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

A136801 Largest prime factor of the composites in the n-th prime gap larger than 2.

Original entry on oeis.org

5, 7, 11, 13, 17, 19, 23, 17, 29, 31, 23, 37, 41, 43, 47, 11, 53, 37, 61, 43, 67, 73, 31, 79, 83, 43, 89, 61, 97, 103, 109, 113, 29, 79, 83, 127, 131, 89, 137, 139, 97, 151, 103, 157, 163, 167, 173, 13, 179, 181, 53, 47, 191, 193, 197, 199, 101, 139, 211, 109, 17, 223
Offset: 1

Views

Author

Enoch Haga, Jan 24 2008

Keywords

Comments

The largest prime factor of numbers in the interval [A136798(n),A136799(n)].
The sequence is obtained from A052248 by removing terms from composites in prime gaps of size 2.

Examples

			a(1)=5 because the composites in the run from 8, 9, 10 contain prime factors 2, 3, and 5, with 5 being the largest at N=10.
		

Crossrefs

Programs

  • Maple
    A006530 := proc(n) max( op(numtheory[factorset](n))) ; end:
    A136798 := proc(n) local a; if n = 1 then 8; else a := nextprime( procname(n-1))+1 ; while nextprime(a)-a <=2 do a := nextprime(a)+1 ; od; RETURN(a) ; fi; end:
    A136801 := proc(n) local a,i; i := A136798(n) ; a := A006530( i) ; while not isprime(i+1) do i := i+1 ; a := max(a, A006530(i)) ; od: a ; end:
    seq(A136801(n),n=1..20) ; # R. J. Mathar, May 27 2009

Extensions

Edited by R. J. Mathar, May 27 2009

A136800 Number of composites in prime gaps of size 3 or larger, in order of appearance.

Original entry on oeis.org

3, 3, 3, 5, 5, 3, 3, 5, 5, 5, 3, 5, 3, 5, 7, 3, 3, 3, 13, 3, 5, 9, 5, 5, 3, 5, 5, 9, 3, 11, 11, 3, 3, 5, 9, 5, 5, 5, 5, 3, 9, 13, 3, 3, 13, 5, 9, 3, 5, 7, 5, 5, 3, 5, 7, 3, 7, 9, 9, 5, 3, 5, 7, 3, 3, 11, 7, 3, 7, 3, 5, 11
Offset: 1

Views

Author

Enoch Haga, Jan 22 2008

Keywords

Comments

The sequence counts the terms in the runs of composites associated with A136798-A136799.
A129856 is obtained by removing the composites (9, 15 etc.) from this sequence.
This is sequence A046933, with the zero and all the 1's deleted. - R. J. Mathar, Jan 24 2008

Examples

			a(1)=3 because in the run 8, 9, 10 there are three terms.
		

Crossrefs

Programs

  • Mathematica
    Select[#[[2]]-#[[1]]-1&/@Partition[Prime[Range[100]],2,1],#>2&] (* Harvey P. Dale, Apr 08 2015 *)

Formula

a(n)=A136799(n)-A136798(n)+1.

Extensions

Edited by R. J. Mathar, May 27 2009

A225461 a(n) = (prime(k) + prime(k+1))/2 where k = A098015(n).

Original entry on oeis.org

9, 15, 21, 26, 34, 39, 45, 50, 56, 64, 69, 76, 81, 86, 99, 105, 111, 120, 129, 134, 144, 154, 160, 165, 170, 176, 186, 195, 225, 231, 236, 246, 254, 260, 266, 274, 279, 288, 300, 309, 315, 324, 334, 342, 351, 356, 370, 376, 381, 386, 399
Offset: 1

Views

Author

Richard R. Forberg, May 13 2013

Keywords

Comments

Former name: Numbers n such that n^2 = prime(i)*prime(i+1) + prime(j)^2, for some i, j > 0 and such that prime(i+1) = prime(i) + 2*prime(j).
The solution values for n = prime(i) + prime(j), when restricted by the condition prime(i+1) = prime(i) + 2*prime(j). Rather than being overly restrictive, the condition applies to the most prevalent type of solution to the equation above for n^2.
The density of solutions, as a percentage of prime(i) values, is 51.33% in the first 10000 primes, and 49.29% in the second 10000 primes.
Values of prime(j) for these solutions range from the prime 2 to the prime 31 in the first 10000 values of prime(i). In the second 10000 values of prime(i) the solutions shift somewhat to higher p(j) values. This trend is expected with increases in the average spacing of primes. This has the effect of slowing the decline in density of solutions at higher p(i) relative to the decline in density of primes themselves.
There is an infinite family of similar equations when "1" is replaced by "d" as in the following: n^2 = prime(i)*prime(i+d) + prime(j)^2, for any i,j, or d > 0.
In this general case, the condition becomes: prime(i+d) = prime(i) + 2*prime(j).
The solution sequence of n values, of course, differs for each d, as does the sequence of primes(i) that create them.
For this generalized version of the equation (and the condition) it is also true that the solution values of n = prime(i) + prime(j), for all d.
[This can be shown with basic algebra as follows, where p() = prime(): n^2 = (p(i) + p(j))^2 = p(i)^2 + 2*p(i)*p(j) + p(j)^2.
Now replace the first p(j) above with (p(i+d) - p(i))/2, and get: n^2 = p(i)^2 + 2*p(i)*(p(i+d) - p(i))/2 + p(j)^2 = p(i)*p(i+d) + p(j)^2.]
This also proves that for each p(i) there is, at most, one solution when the condition is applied.
There are other solutions to the equation above for n^2 with primes that do NOT obey the condition above. These are sparse. For d=1 (this case) they include 8, 18, 72, 450, and 882. All four of these are found at low values of i (i <= 13). These solutions, for all values of d, appear to have the form n = p(j) + 1, if they exist at all for given d. It can be shown, however, that for any given d NOT all p(i) have a solution, but they can occur with the same p(i) as the "algebraic" solutions above.
This sequence appears to be a large subset of (A136798 + A136799)/2 (the center of composite runs). - Bill McEachen, Oct 22 2015
Heuristically, A001223(n)/2 should be prime with probability ~ 1/log log n, so (prime(n) + prime(n+1))/2 is in the sequence with probability ~ 1/log log n. - Robert Israel, Nov 30 2015

Examples

			n = 9 is in the sequence (with i = 4 and j = 1), because 9^2 = 7*11 + 2^2 = prime(4)*prime(4+1) + 2*prime(1) and prime(4+1) = 11 = 7 + 2*2 = prime(4) + 2*prime(1). Moreover, 9 = 7 + 2 = prime(4) + prime(1).
Whereas n = 8 (not in the sequence) satisfies the first condition with i = 2 and j = 4 (8^2 = 3*5 + 7^2), it does NOT meet the second condition: p(i+1) = 5 != p(i) + 2*p(j) = 3 + 2*7 = 17. Moreover, 8 != 3 + 7.
		

Crossrefs

Cf. A000040. Subsequence of A024675. - Zak Seidov, May 18 2013
Cf. A136798 and A136799, first and last values for runs of adjacent composites.

Programs

  • Maple
    P:= select(isprime, [2,seq(2*i+1,i=1..10^4)]):
    G2:= (P[2..-1] - P[1..-2])/2:
    inds:= select(i -> isprime(G2[i]),[$2..nops(G2)]):
    seq(P[i] + G2[i],i=inds); # Robert Israel, Nov 30 2015
  • Mathematica
    Reap[For[p = 2, p < 400, p = NextPrime[p], p1 = NextPrime[p]; If[PrimeQ[pj = (p1 - p)/2] && IntegerQ[n = Sqrt[p*p1 + pj^2]], Sow[n]]]][[2, 1]](* Jean-François Alcover, May 17 2013 *)

Extensions

Example edited by Danny Rorabaugh, Oct 26 2015
Name changed by Robert Israel, Nov 30 2015

A136802 The composite with the largest prime factor in the n-th prime gap larger than 2.

Original entry on oeis.org

10, 14, 22, 26, 34, 38, 46, 51, 58, 62, 69, 74, 82, 86, 94, 99, 106, 111, 122, 129, 134, 146, 155, 158, 166, 172, 178, 183, 194, 206, 218, 226, 232, 237, 249, 254, 262, 267, 274, 278, 291, 302, 309, 314, 326, 334, 346, 351, 358, 362, 371, 376, 382, 386, 394
Offset: 1

Views

Author

Enoch Haga, Jan 24 2008

Keywords

Comments

Pick the number in the interval [A136798(n),A136799(n)] with the largest prime factor.
The sequence is obtained from A114331 by removing terms in prime gaps of size 2.

Examples

			a(1)=10 because at N=10 the largest prime factor is 5.
		

Crossrefs

Programs

  • Maple
    A006530 := proc(n) max( op(numtheory[factorset](n))) ; end:
    A136798 := proc(n) local a; if n = 1 then 8; else a := nextprime( procname(n-1))+1 ; while nextprime(a)-a <=2 do a := nextprime(a)+1 ; od; RETURN(a) ; fi; end:
    A136802 := proc(n) local c,lpf,a; c := A136798(n) ; lpf := A006530(c) ; a := c; while not isprime(c+1) do c := c+1 ; if A006530(c) > lpf then a := c ; lpf := A006530(c) ; fi; od: a ; end:
    seq(A136802(n),n=1..80) ; # R. J. Mathar, May 27 2009

Formula

A006530(a(n)) = A136801(n).

Extensions

Edited by R. J. Mathar, May 27 2009

A296012 Primes of the form k + k+1 + k+2 +-1 where k, k+1, and k+2 are all composite numbers.

Original entry on oeis.org

79, 101, 103, 149, 151, 167, 191, 193, 227, 229, 257, 277, 281, 283, 347, 349, 353, 359, 367, 373, 401, 431, 433, 439, 461, 463, 479, 509, 557, 563, 607, 613, 617, 619, 641, 643, 647, 653, 659, 661, 709, 733, 739, 743, 761, 797, 821, 823, 857, 859, 863, 887, 907, 911, 967, 971, 977, 983, 1019, 1021
Offset: 1

Views

Author

Martin Michael Musatov, Dec 02 2017

Keywords

Comments

Primes p such that floor((p-2)/3) and floor((p-2)/3)+2 are composite. - Robert Israel, Dec 03 2017

Examples

			25 + 26 + 27 + 1 = 79,
33 + 34 + 35 - 1 = 101,
33 + 34 + 35 + 1 = 103, etc.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local k;
      if not isprime(n) then return false fi;
      k:= floor((n-2)/3);
      not isprime(k) and not isprime(k+1) and not isprime(k+2)
    end proc:
    select(filter, [seq(i,i=5..2000, 2)]); # Robert Israel, Dec 03 2017
  • Mathematica
    Select[Join @@ Map[{{Total@ # - 1, #}, {Total@ # + 1, #}} &, Partition[Range@ 350, 3, 1]], And[PrimeQ@ First@ #, AllTrue[Last@ #, CompositeQ]] &][[All, 1]] (* Michael De Vlieger, Dec 03 2017 *)
  • Python
    from _future_ import division
    from sympy import nextprime, isprime
    A296012_list, p = [], 2
    while len(A296012_list) < 10000:
        k = (p-2)//3
        if not (isprime(k) or isprime(k+2)):
            A296012_list.append(p)
        p = nextprime(p) # Chai Wah Wu, Jan 24 2018
Showing 1-6 of 6 results.