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-4 of 4 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

A136799 Last term in a sequence of at least 3 consecutive composite integers.

Original entry on oeis.org

10, 16, 22, 28, 36, 40, 46, 52, 58, 66, 70, 78, 82, 88, 96, 100, 106, 112, 126, 130, 136, 148, 156, 162, 166, 172, 178, 190, 196, 210, 222, 226, 232, 238, 250, 256, 262, 268, 276, 280, 292, 306, 310, 316, 330, 336, 346, 352, 358, 366, 372, 378, 382, 388, 396
Offset: 1

Views

Author

Enoch Haga, Jan 21 2008

Keywords

Comments

An equivalent definition is "Last term in a sequence of at least 2 consecutive composite integers". - Jon E. Schoenfield, Dec 04 2017
The BASIC program below is useful in testing Grimm's Conjecture, subject of Carlos Rivera's Puzzle 430
Use the program with lines 30 and 70 enabled in the first run and then disabled with lines 31 and 71 enabled in the second run.
Composite numbers m such that m-1 is composite, and m+1 is not. - Martin Michael Musatov, Oct 24 2017

Examples

			a(1)=10 because 10 is the last term in a run of three composites beginning with 8 and ending with 10 (8,9,10).
		

Crossrefs

Programs

  • Magma
    [p-1: p in PrimesInInterval(4, 420) | not IsPrime(p - 2)]; // Vincenzo Librandi, Apr 11 2019
  • Mathematica
    Select[Prime@ Range@ 78, CompositeQ[# - 2] &] - 1 (* Michael De Vlieger, Oct 23 2015, after PARI *)
  • PARI
    forprime(p=5, 1000, if(isprime(p-2)==0, print1(p-1, ", "))) \\ Altug Alkan, Oct 23 2015
    
  • UBASIC
    10 'puzzle 430 (gap finder) 20 N=1 30 A=1:S=sqrt(N):print N; 31 'A=1:S=N\2:print N; 40 B=N\A 50 if B*A=N and B=prmdiv(B) then print B; 60 A=A+1 70 if A<=sqrt(N) then 40 71 'if A<=N\2 then 40 80 C=C+1:print C 90 N=N+1: if N=prmdiv(N) then C=0:print:stop:goto 90:else 30
    

Formula

a(n) = A025584(n+2) - 1. - R. J. Mathar, Jan 24 2008
a(n) ~ n log n. - Charles R Greathouse IV, Oct 27 2015

Extensions

Edited by R. J. Mathar, May 27 2009
a(53) corrected by Bill McEachen, Oct 27 2015

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

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
Showing 1-4 of 4 results.