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.

A103825 Choose a(n) to be the smallest number not yet used such that: a(1) = 1, a(2n) = composite, a(2n+1) = prime and partial sums are alternately prime or composite.

Original entry on oeis.org

1, 4, 3, 9, 5, 15, 2, 8, 7, 25, 11, 49, 13, 21, 17, 33, 19, 27, 23, 39, 29, 119, 31, 77, 37, 35, 41, 51, 43, 45, 47, 55, 53, 57, 59, 91, 61, 65, 67, 87, 71, 69, 73, 93, 79, 85, 83, 95, 89, 63, 97, 81, 101, 99, 103, 75, 107, 105, 109, 141, 113, 115, 127, 125, 131, 111, 137
Offset: 1

Views

Author

Ray Chandler Feb 16 2005

Keywords

Crossrefs

Programs

  • Maple
    N:= 1000: # for terms before the first term > N
    Avail:= [$2..N]:
    A[1]:= 1: T:= 1:
    for n from 2 while assigned(A[n-1]) do
      for j from 1 to N+1-n do
        x:= Avail[j];
        if (n::even and isprime(x+T) and not isprime(x)) or
           (n::odd and isprime(x) and not isprime(x+T)) then
          A[n]:= x; T:= T+x;
          Avail:= subsop(j=NULL, Avail);
          break
        fi
      od
    od:
    seq(A[i],i=1..n-2); # Robert Israel, Nov 26 2020

Extensions

Definition corrected by Zak Seidov, Feb 20 2005

A075593 a(1) = 1, a(2n) = prime, a(2n+1) = composite and sum of two successive terms is alternately composite or prime.

Original entry on oeis.org

1, 3, 4, 2, 9, 5, 6, 19, 10, 11, 8, 7, 12, 13, 16, 17, 14, 31, 22, 23, 18, 37, 24, 41, 20, 29, 30, 47, 26, 43, 28, 53, 36, 59, 38, 61, 40, 71, 32, 67, 34, 83, 44, 73, 54, 79, 48, 97, 42, 101, 50, 103, 46, 89, 60, 109, 58, 107, 56, 113, 66, 137, 62, 127, 52, 131, 68, 139, 72
Offset: 1

Views

Author

Amarnath Murthy, Sep 27 2002

Keywords

Comments

This is not a permutation of the positive integers; odd composites > 9 will not appear in the sequence. - Klaus Brockhaus, Feb 06 2006

Crossrefs

Extensions

Extended by Ray Chandler Feb 16 2005

A103824 Choose a(n) to be the smallest number not yet used such that: a(1) = 1, a(2n) = prime, a(2n+1) = composite and partial sums are alternately composite or prime.

Original entry on oeis.org

1, 3, 9, 2, 4, 5, 35, 7, 65, 11, 15, 13, 21, 17, 25, 19, 55, 23, 49, 29, 91, 31, 27, 37, 115, 41, 77, 43, 121, 47, 85, 53, 125, 59, 39, 61, 33, 67, 133, 71, 143, 73, 119, 79, 95, 83, 81, 89, 145, 97, 51, 101, 99, 103, 45, 107, 57, 109, 87, 113, 69, 127, 75, 131, 111, 137
Offset: 1

Views

Author

Ray Chandler Feb 16 2005

Keywords

Crossrefs

Extensions

Definition corrected by Zak Seidov, Feb 20 2005

A103934 Choose a(n) to be the smallest odd number not yet used such that: a(1) = 1, a(2n) = prime, a(2n+1) = composite and partial sums are alternately composite or prime.

Original entry on oeis.org

1, 3, 9, 5, 25, 7, 21, 11, 15, 13, 27, 17, 39, 19, 45, 23, 33, 29, 55, 31, 35, 37, 57, 41, 49, 43, 119, 47, 51, 53, 91, 59, 77, 61, 125, 67, 143, 71, 69, 73, 65, 79, 63, 83, 75, 89, 121, 97, 81, 101, 99, 103, 87, 107, 117, 109, 135, 113, 93, 127, 111, 131, 129, 137, 115, 139
Offset: 1

Views

Author

Ray Chandler Feb 21 2005, based on a suggestion from Zak Seidov

Keywords

Crossrefs

A103935 Choose a(n) to be the smallest odd number not yet used such that: a(1) = 1, a(2n) = composite, a(2n+1) = prime and partial sums are alternately composite or prime.

Original entry on oeis.org

1, 9, 3, 15, 13, 21, 5, 25, 11, 27, 7, 33, 23, 35, 29, 39, 17, 45, 31, 49, 19, 51, 61, 55, 37, 57, 43, 63, 53, 65, 41, 69, 71, 75, 79, 77, 73, 81, 59, 85, 47, 87, 103, 91, 83, 93, 113, 95, 109, 99, 127, 105, 149, 111, 139, 115, 89, 117, 107, 119, 97, 121, 131, 123, 67, 125
Offset: 1

Views

Author

Ray Chandler Feb 21 2005, based on a suggestion from Zak Seidov

Keywords

Crossrefs

A179485 Sums of two successive primes s such that s+-3 are primes.

Original entry on oeis.org

8, 100, 1120, 1220, 1300, 2240, 2380, 2414, 3536, 3634, 4906, 4940, 5566, 5740, 6706, 7240, 8864, 9224, 9394, 10136, 10850, 12040, 12476, 12586, 12920, 13180, 13334, 13754, 14630, 14720, 15134, 16270, 17710, 18430, 18800, 19916, 21014, 21320
Offset: 1

Views

Author

Keywords

Comments

Intersection of A001043 and A087695. - Robert Israel, Oct 25 2017

Examples

			3+5=8,8-3=5(prime),8+3=11(prime),..
		

Crossrefs

Programs

  • Maple
    q:= 2; p:= 3;
    count:= 0:
    while count < 100 do
      q:= p; p:= nextprime(p);
      s:= q+p;
      if isprime(s-3) and isprime(s+3) then
        count:= count+1; A[count]:= s;
      fi
    od:
    seq(A[i],i=1..count); # Robert Israel, Oct 25 2017
  • Mathematica
    q=3;Select[Table[Prime[n]+Prime[n+1],{n,7!}],PrimeQ[ #-q]&&PrimeQ[ #+q]&]
    Select[Total/@Partition[Prime[Range[1400]],2,1],AllTrue[#+{3,-3},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 04 2018 *)
Showing 1-6 of 6 results.