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

A075607 a(1) = 1, a(n) = smallest number not occurring earlier such that the concatenation a(n-1) and a(n) is a prime.

Original entry on oeis.org

1, 3, 7, 9, 11, 17, 21, 13, 19, 31, 37, 27, 29, 39, 23, 33, 43, 49, 51, 47, 59, 53, 81, 61, 63, 67, 79, 93, 41, 57, 83, 69, 71, 77, 89, 99, 73, 121, 97, 87, 103, 91, 127, 123, 113, 111, 109, 133, 117, 101, 107, 119, 129, 169, 151, 141, 131, 143, 137, 147, 139
Offset: 1

Views

Author

Amarnath Murthy, Sep 28 2002

Keywords

Comments

Almost certainly a permutation of A045572. - David W. Wilson, Jan 15 2005

Crossrefs

Programs

  • Mathematica
    a = {{1}}; Do[k = 2; While[Nand[! MemberQ[a, #], PrimeQ@ FromDigits@ Join[a[[n - 1]], #]] &@ Set[d, IntegerDigits@ k], k++]; AppendTo[a, d], {n, 2, 61}]; FromDigits /@ a (* Michael De Vlieger, May 08 2017 *)
  • PARI
    A075607(n,show=0,a=1,u=[])={for(n=2,n,show&&print1(a","); u=setunion(u,[a]); while(#u>1&&u[2]==u[1]+2,u=u[2..-1]); forstep(k=u[1]+2, 9e9, 2, setsearch(u,k)&&next; isprime(eval(Str(a,k))) && (a=k) && break)); a} \\ Use 2nd, 3rd or 4th optional arg to print intermediate terms, to use another starting value or to exclude some terms. - M. F. Hasler, Nov 25 2015

Extensions

More terms from Michel ten Voorde Jun 23 2003

A073641 a(1) = 2; a(n) = smallest prime not included earlier such that concatenation of two successive terms is a prime.

Original entry on oeis.org

2, 3, 7, 19, 13, 61, 31, 37, 67, 79, 103, 43, 73, 127, 139, 97, 151, 157, 109, 199, 181, 193, 163, 211, 229, 223, 241, 271, 277, 331, 283, 397, 337, 313, 307, 367, 457, 421, 349, 373, 379, 433, 439, 409, 463, 523, 487, 601, 541, 547, 499, 571, 673, 613, 577
Offset: 1

Views

Author

Amarnath Murthy, Aug 09 2002

Keywords

Comments

Conjecture: every prime besides 5 is in this list. - Gabriel Cunningham (gcasey(AT)mit.edu), Apr 11 2003
It appears that the terms belong to A007645. There are no primes of form 6k-1 in this sequence. - Alexander Adamchuk, Aug 15 2006
The above conjecture by Cunningham (Apr 11 2003) is false: Since a(2)=3 and a(3)=7 == 1 mod 6, all subsequent terms must also be 1 mod 6 because concatenations of numbers 1 mod 6 with 5 mod 6 are 0 mod 3. - Bob Selcoe, Aug 25 2015

Crossrefs

Programs

  • Maple
    N:= 10000: # to get all terms before the first one > N
    A[1]:= 2:
    Primes:= Vector(select(isprime,[seq(2*i+1 , i=1..floor((N-1)/2))])):
    Nprimes:= LinearAlgebra:-Dimension(Primes):
    Next:= Vector(Nprimes):
    Prev:= Vector(Nprimes):
    for i from 1 to Nprimes-1 do Next[i]:= i+1; Prev[i+1]:= i od:
    first:= 1:
    found:= true:
    for n from 2 while found do
      i:= first;
      found:= false;
      while i <> 0 do
        p:= Primes[i];
        if isprime(10^(1+ilog10(p))*A[n-1] + p) then
          found:= true;
          A[n]:= p;
          if i = first then first:= Next[first]
          else Next[Prev[i]]:= Next[i]
          fi;
          if Next[i] <> 0 then
            Prev[Next[i]]:= Prev[i]
          fi;
          break
        fi;
        i:= Next[i];
      od
    od:
    seq(A[i],i=1..n-2); # Robert Israel, Aug 25 2015
  • Mathematica
    t = {2}; Do[i = 2; While[! PrimeQ[FromDigits[Flatten[IntegerDigits[{Last[t], x = Prime[i]}]]]] || MemberQ[t, x], i++]; AppendTo[t, x], {54}]; t (* Jayanta Basu, Jul 03 2013 *)

Formula

a(n) = A075609(n) for n>1. - Alexander Adamchuk, Aug 15 2006

Extensions

More terms from Gabriel Cunningham (gcasey(AT)mit.edu), Apr 11 2003
Corrected and extended by Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 20 2003

A075608 a(1) = 1, a(n) = smallest composite number not occurring earlier such that the concatenation a(n-1) and a(n) is a prime.

Original entry on oeis.org

1, 9, 77, 27, 49, 33, 91, 51, 133, 39, 119, 69, 143, 21, 121, 57, 203, 93, 169, 63, 247, 81, 299, 147, 209, 123, 217, 87, 187, 111, 253, 153, 259, 99, 289, 129, 221, 159, 161, 141, 301, 177, 319, 117, 329, 201, 287, 219, 361, 183, 343, 237, 581, 171, 341, 273, 323
Offset: 1

Views

Author

Amarnath Murthy, Sep 28 2002

Keywords

Crossrefs

Extensions

More terms from Michel ten Voorde Jun 23 2003

A075610 a(1) = 1, a(n) = smallest prime number not occurring earlier such that the concatenation a(n-1) and a(n) is a composite number.

Original entry on oeis.org

1, 2, 5, 7, 11, 13, 3, 19, 17, 29, 23, 31, 41, 37, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 97, 89, 103, 101, 109, 107, 113, 127, 131, 137, 139, 149, 151, 167, 157, 173, 163, 179, 181, 191, 193, 197, 199, 223, 227, 211, 233, 229, 239, 241, 251, 269, 263, 271, 257, 277
Offset: 1

Views

Author

Amarnath Murthy, Sep 28 2002

Keywords

Crossrefs

Extensions

More terms from Michel ten Voorde Jun 23 2003

A083439 a(1) = 3; then a(n+1) = smallest prime not already in the sequence such that the concatenations a(n)a(n+1) and a(n+1)a(n) are both primes.

Original entry on oeis.org

3, 7, 19, 13, 61, 151, 31, 139, 67, 37, 79, 193, 163, 127, 157, 97, 43, 103, 307, 367, 457, 643, 73, 277, 223, 229, 373, 199, 109, 313, 211, 271, 241, 421, 181, 283, 397, 337, 349, 331, 577, 523, 463, 613, 439, 541, 571, 433, 787, 547, 661, 769, 487, 601, 823, 709
Offset: 3

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Apr 30 2003

Keywords

Crossrefs

Programs

  • PARI
    { p=3; S=Set(); while(!setsearch(S,p), S=setunion(S,Set([p])); print1(p,", "); forprime(q=2,10^4, if(setsearch(S,q),next); if( isprime(eval(concat(Str(p),Str(q)))) && isprime(eval(concat(Str(q),Str(p)))), p=q; break))) } \\ Max Alekseyev, Apr 24 2009

Extensions

Corrected and extended by Max Alekseyev, Apr 24 2009
Showing 1-5 of 5 results.