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

A107801 a(1) = prime(1), for n >= 2, a(n) is the smallest prime not previously used which contains a digit from a(n-1).

Original entry on oeis.org

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

Views

Author

Zak Seidov & Eric Angelini, May 24 2005

Keywords

Comments

a(n) = prime(n) for almost all n. Probably a(n) = prime(n) for all n > N for some N, but N must be very large. If it exists, N > 10^1000. - Charles R Greathouse IV, Jul 19 2011

Crossrefs

Cf. A107353.
Other cases of seed: A107802 (a(1) = 3), A107803 (a(1) = 5), A107804 (a(1) = 7), A107805 (a(1) = 11), A107806 (a(1) = 13), A107807 (a(1) = 17), A107808 (a(1) = 19), A107809 (a(1) = 23), A107810 (a(1) = 29), A107811 (a(1) = 31), A107812 (a(1) = 37), A107813 (a(1) = 41), A107814 (a(1) = 43).

Programs

  • Haskell
    import Data.List (intersect, delete)
    a107801 n = a107801_list !! (n-1)
    a107801_list = 2 : f 2 (tail a000040_list) where
       f x ps = g ps where
         g (q:qs) | null (show x `intersect` show q) = g qs
                  | otherwise                        = q : f q (delete q ps)
    -- Reinhard Zumkeller, Mar 31 2012
  • Mathematica
    p=Prime[1];b={p};d=p;Do[Do[r=Prime[c];If[FreeQ[b, r]&&Intersection@@IntegerDigits/@{d, r}=!={}, b=Append[b, r];d=r;Break[]], {c, 1000}], {k, 60}];b
  • PARI
    common(a,b)=a=vecsort(eval(Vec(Str(a))),,8);b=vecsort(eval(Vec(Str(b))),,8);#a+#b>#vecsort(concat(a,b),,8)
    in(v,x)=for(i=1,#v,if(v[i]==x,return(1)));0
    lista(nn) = {my(v=[2]); for(n=2, nn, forprime(p=2, default(primelimit), if(!in(v,p)&&common(v[#v],p), v=concat(v,p); break))); v; }
    \\ Charles R Greathouse IV, Jul 20 2011
    

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Jul 19 2011
For n>=29, A(107800+i)(n) = A(107800+j)(n), 1 <= i < j <= 14. - Vladimir Shevelev, Mar 18 2012

A107814 a(1) = prime(14), for n >= 2, a(n) is the smallest prime not previously used which contains a digit from a(n-1).

Original entry on oeis.org

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

Views

Author

Zak Seidov and Eric Angelini, May 24 2005

Keywords

Comments

a(n) = prime(n) for almost all n. Probably a(n) = prime(n) for all n > N for some N, but N must be very large. - Charles R Greathouse IV, Jul 20 2011

Crossrefs

Cf. A107353.
Other cases of seed: A107801 (a(1) = 2), A107802 (a(1) = 3), A107803 (a(1) = 5), A107804 (a(1) = 7), A107805 (a(1) = 11), A107806 (a(1) = 13), A107807 (a(1) = 17), A107808 (a(1) = 19), A107809 (a(1) = 23), A107810 (a(1) = 29), A107811 (a(1) = 31), A107812 (a(1) = 37), A107813 (a(1) = 41).

Programs

  • Maple
    Cands:= subsop(14=NULL, [seq(ithprime(i),i=1..1000)]):
    S:= map(t -> convert(convert(t,base,10),set), Cands):
    R:= 43: x:= 43: xs:= {3,4}:
    for n from 2 to 100 do
      found:= false;
      for i from 1 do
        if S[i] intersect xs <> {} then
          R:= R, Cands[i];
          x:= Cands[i];
          xs:= S[i];
          Cands:= subsop(i=NULL,Cands);
          S:= subsop(i=NULL,S);
          found:= true;
          break
        fi
      od;
      if not found then break fi;
    od:
    R; # Robert Israel, Dec 16 2024
  • Mathematica
    p=Prime[14];b={p};d=p;Do[Do[r=Prime[c];If[FreeQ[b, r]&&Intersection@@IntegerDigits/@{d, r}=!={}, b=Append[b, r];d=r;Break[]], {c, 1000}], {k, 60}];b

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Jul 20 2011

A184992 a(n) is the least positive integer not occurring earlier that shares a digit with a(n-1); a(1)=1.

Original entry on oeis.org

1, 10, 11, 12, 2, 20, 21, 13, 3, 23, 22, 24, 4, 14, 15, 5, 25, 26, 6, 16, 17, 7, 27, 28, 8, 18, 19, 9, 29, 32, 30, 31, 33, 34, 35, 36, 37, 38, 39, 43, 40, 41, 42, 44, 45, 46, 47, 48, 49, 54, 50, 51, 52, 53, 55, 56, 57, 58, 59, 65, 60, 61, 62, 63, 64, 66, 67, 68, 69, 76, 70, 71, 72, 73
Offset: 1

Views

Author

Eric Angelini, Dec 22 2011

Keywords

Comments

A permutation of the positive integers.

Crossrefs

a(n) = A107353(n) for n>=3. - Alois P. Heinz, Dec 22 2011
Cf. A227118 (inverse); A067581.

Programs

  • Haskell
    import Data.List (delete, intersect); import Data.Function (on)
    a184992 n = a184992_list !! (n-1)
    a184992_list = 1 : f 1 [2..] where
       f u vs = v : f v (delete v vs)
         where v : _ = filter (not . null . (intersect `on` show) u) vs
    -- Reinhard Zumkeller, Jul 01 2013
    
  • Mathematica
    FromDigits /@ Nest[Function[a, Append[a, Block[{k = 2, d}, While[Nand[FreeQ[a, #], IntersectingQ[a[[-1]], #]] &@ Set[d, IntegerDigits@ k], k++]; d]]], {{1}}, 73] (* Michael De Vlieger, Mar 17 2018 *)
  • PARI
    A184992(n,show=0)={my(a=1,u=2^1);for(k=2,n,show && print1(a",");a=Set(Vec(Str(a))); for(j=2,9e9,bittest(u,j) && next;setintersect(Set(Vec(Str(j))),a) || next; u+=2^a=j; break));a}  \\ M. F. Hasler, Dec 22 2011
    
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        an, aset, mink = 1, {1}, 1
        while True:
            yield an
            digset = set(str(an))
            an = next(k for k in count(mink) if k not in aset and set(str(k))&digset)
            aset.add(an)
            while mink in aset: mink += 1
    print(list(islice(agen(), 74))) # Michael S. Branicky, Oct 03 2024

A107809 a(1) = prime(9), for n >= 2, a(n) is the smallest prime not previously used which contains a digit from a(n-1).

Original entry on oeis.org

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

Views

Author

Zak Seidov & Eric Angelini, May 24 2005

Keywords

Comments

a(n) = prime(n) for almost all n. Probably a(n) = prime(n) for all n > N for some N, but N must be very large. - Charles R Greathouse IV, Jul 20 2011

Crossrefs

Cf. A107353.
Other cases of seed: A107801 (a(1) = 2), A107802 (a(1) = 3), A107803 (a(1) = 5), A107804 (a(1) = 7), A107805 (a(1) = 11), A107806 (a(1) = 13), A107807 (a(1) = 17), A107808 (a(1) = 19), A107810 (a(1) = 29), A107811 (a(1) = 31), A107812 (a(1) = 37), A107813 (a(1) = 41), A107814 (a(1) = 43).

Programs

  • Mathematica
    p=Prime[9];b={p};d=p;Do[Do[r=Prime[c];If[FreeQ[b, r]&&Intersection@@IntegerDigits/@{d, r}=!={}, b=Append[b, r];d=r;Break[]], {c, 1000}], {k, 60}];b
  • PARI
    common(a,b)=a=vecsort(eval(Vec(Str(a))),,8);b=vecsort(eval(Vec(Str(b))),,8);#a+#b>#vecsort(concat(a,b),,8)
    in(v,x)=for(i=1,#v,if(v[i]==x,return(1)));0
    lista(nn) = {my(v=[23]); for(n=2, nn, forprime(p=2, default(primelimit), if(!in(v,p)&&common(v[#v],p), v=concat(v,p); break))); v; }
    \\ Charles R Greathouse IV, Jul 20 2011

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Jul 20 2011

A107802 a(1) = prime(2), for n >= 2, a(n) is the smallest prime not previously used which contains a digit from a(n-1).

Original entry on oeis.org

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

Views

Author

Zak Seidov & Eric Angelini, May 24 2005

Keywords

Comments

a(n) = prime(n) for almost all n. Probably a(n) = prime(n) for all n > N for some N, but N must be very large. - Charles R Greathouse IV, Jul 20 2011

Crossrefs

Cf. A107353.
Other cases of seed: A107801 (a(1) = 2), A107803 (a(1) = 5), A107804 (a(1) = 7), A107805 (a(1) = 11), A107806 (a(1) = 13), A107807 (a(1) = 17), A107808 (a(1) = 19), A107809 (a(1) = 23), A107810 (a(1) = 29), A107811 (a(1) = 31), A107812 (a(1) = 37), A107813 (a(1) = 41), A107814 (a(1) = 43).

Programs

  • Mathematica
    p=Prime[2];b={p};d=p;Do[Do[r=Prime[c];If[FreeQ[b, r]&&Intersection@@IntegerDigits/@{d, r}=!={}, b=Append[b, r];d=r;Break[]], {c, 1000}], {k, 60}];b
  • PARI
    common(a,b)=a=vecsort(eval(Vec(Str(a))),,8);b=vecsort(eval(Vec(Str(b))),,8);#a+#b>#vecsort(concat(a,b),,8)
    in(v,x)=for(i=1,#v,if(v[i]==x,return(1)));0
    lista(nn) = {my(v=[3]); for(n=2, nn, forprime(p=2, default(primelimit), if(!in(v,p)&&common(v[#v],p), v=concat(v,p); break))); v; }
    \\ Charles R Greathouse IV, Jul 20 2011

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Jul 20 2011

A107803 a(1) = prime(3), for n >= 2, a(n) is the smallest prime not previously used which contains a digit from a(n-1).

Original entry on oeis.org

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

Views

Author

Zak Seidov & Eric Angelini, May 24 2005

Keywords

Comments

a(n) = prime(n) for almost all n. Probably a(n) = prime(n) for all n > N for some N, but N must be very large. - Charles R Greathouse IV, Jul 20 2011

Crossrefs

Cf. A107353.
Other cases of seed: A107801 (a(1) = 2), A107802 (a(1) = 3), A107804 (a(1) = 7), A107805 (a(1) = 11), A107806 (a(1) = 13), A107807 (a(1) = 17), A107808 (a(1) = 19), A107809 (a(1) = 23), A107810 (a(1) = 29), A107811 (a(1) = 31), A107812 (a(1) = 37), A107813 (a(1) = 41), A107814 (a(1) = 43).

Programs

  • Mathematica
    p=Prime[3];b={p};d=p;Do[Do[r=Prime[c];If[FreeQ[b, r]&&Intersection@@IntegerDigits/@{d, r}=!={}, b=Append[b, r];d=r;Break[]], {c, 1000}], {k, 60}];b
  • PARI
    common(a,b)=a=vecsort(eval(Vec(Str(a))),,8);b=vecsort(eval(Vec(Str(b))),,8);#a+#b>#vecsort(concat(a,b),,8)
    in(v,x)=for(i=1,#v,if(v[i]==x,return(1)));0
    lista(nn) = {my(v=[5]); for(n=2, nn, forprime(p=2, default(primelimit), if(!in(v,p)&&common(v[#v],p), v=concat(v,p); break))); v; }
    \\ Charles R Greathouse IV, Jul 20 2011

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Jul 20 2011

A107804 a(1) = prime(4), for n >= 2, a(n) is the smallest prime not previously used which contains a digit from a(n-1).

Original entry on oeis.org

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

Views

Author

Zak Seidov & Eric Angelini, May 24 2005

Keywords

Comments

a(n) = prime(n) for almost all n. Probably a(n) = prime(n) for all n > N for some N, but N must be very large. - Charles R Greathouse IV, Jul 20 2011

Crossrefs

Cf. A107353.
Other cases of seed: A107801 (a(1) = 2), A107802 (a(1) = 3), A107803 (a(1) = 5), A107805 (a(1) = 11), A107806 (a(1) = 13), A107807 (a(1) = 17), A107808 (a(1) = 19), A107809 (a(1) = 23), A107810 (a(1) = 29), A107811 (a(1) = 31), A107812 (a(1) = 37), A107813 (a(1) = 41), A107814 (a(1) = 43).

Programs

  • Mathematica
    p=Prime[4];b={p};d=p;Do[Do[r=Prime[c];If[FreeQ[b, r]&&Intersection@@IntegerDigits/@{d, r}=!={}, b=Append[b, r];d=r;Break[]], {c, 1000}], {k, 60}];b
  • PARI
    common(a,b)=a=vecsort(eval(Vec(Str(a))),,8);b=vecsort(eval(Vec(Str(b))),,8);#a+#b>#vecsort(concat(a,b),,8)
    in(v,x)=for(i=1,#v,if(v[i]==x,return(1)));0
    lista(nn) = {my(v=[7]); for(n=2, nn, forprime(p=2, default(primelimit), if(!in(v,p)&&common(v[#v],p), v=concat(v,p); break))); v; }
    \\ Charles R Greathouse IV, Jul 20 2011

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Jul 20 2011

A107805 a(1) = prime(5), for n >= 2, a(n) is the smallest prime not previously used which contains a digit from a(n-1).

Original entry on oeis.org

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

Views

Author

Zak Seidov & Eric Angelini, May 24 2005

Keywords

Comments

a(n) = prime(n) for almost all n. Probably a(n) = prime(n) for all n > N for some N, but N must be very large. - Charles R Greathouse IV, Jul 20 2011

Crossrefs

Cf. A107353.
Other cases of seed: A107801 (a(1) = 2), A107802 (a(1) = 3), A107803 (a(1) = 5), A107804 (a(1) = 7), A107806 (a(1) = 13), A107807 (a(1) = 17), A107808 (a(1) = 19), A107809 (a(1) = 23), A107810 (a(1) = 29), A107811 (a(1) = 31), A107812 (a(1) = 37), A107813 (a(1) = 41), A107814 (a(1) = 43).

Programs

  • Mathematica
    p=Prime[5];b={p};d=p;Do[Do[r=Prime[c];If[FreeQ[b, r]&&Intersection@@IntegerDigits/@{d, r}=!={}, b=Append[b, r];d=r;Break[]], {c, 1000}], {k, 60}];b
  • PARI
    common(a,b)=a=vecsort(eval(Vec(Str(a))),,8);b=vecsort(eval(Vec(Str(b))),,8);#a+#b>#vecsort(concat(a,b),,8)
    in(v,x)=for(i=1,#v,if(v[i]==x,return(1)));0
    lista(nn) = {my(v=[11]); for(n=2, nn, forprime(p=2, default(primelimit), if(!in(v, p)&&common(v[#v], p), v=concat(v, p); break))); v; }
    \\ Charles R Greathouse IV, Jul 20 2011

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Jul 20 2011

A107806 a(1) = prime(6), for n >= 2, a(n) is the smallest prime not previously used which contains a digit from a(n-1).

Original entry on oeis.org

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

Views

Author

Zak Seidov & Eric Angelini, May 24 2005

Keywords

Comments

a(n) = prime(n) for almost all n. Probably a(n) = prime(n) for all n > N for some N, but N must be very large. - Charles R Greathouse IV, Jul 20 2011

Crossrefs

Cf. A107353.
Other cases of seed: A107801 (a(1) = 2), A107802 (a(1) = 3), A107803 (a(1) = 5), A107804 (a(1) = 7), A107805 (a(1) = 11), A107807 (a(1) = 17), A107808 (a(1) = 19), A107809 (a(1) = 23), A107810 (a(1) = 29), A107811 (a(1) = 31), A107812 (a(1) = 37), A107813 (a(1) = 41), A107814 (a(1) = 43).

Programs

  • Mathematica
    p=Prime[6];b={p};d=p;Do[Do[r=Prime[c];If[FreeQ[b, r]&&Intersection@@IntegerDigits/@{d, r}=!={}, b=Append[b, r];d=r;Break[]], {c, 1000}], {k, 60}];b
  • PARI
    common(a,b)=a=vecsort(eval(Vec(Str(a))),,8);b=vecsort(eval(Vec(Str(b))),,8);#a+#b>#vecsort(concat(a,b),,8)
    in(v,x)=for(i=1,#v,if(v[i]==x,return(1)));0
    lista(nn) = {my(v=[13]); for(n=2, nn, forprime(p=2, default(primelimit), if(!in(v,p)&&common(v[#v],p), v=concat(v,p); break))); v; }
    \\ Charles R Greathouse IV, Jul 20 2011

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Jul 20 2011

A107807 a(1) = prime(7), for n >= 2, a(n) is the smallest prime not previously used which contains a digit from a(n-1).

Original entry on oeis.org

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

Views

Author

Zak Seidov & Eric Angelini, May 24 2005

Keywords

Comments

a(n) = prime(n) for almost all n. Probably a(n) = prime(n) for all n > N for some N, but N must be very large. - Charles R Greathouse IV, Jul 20 2011

Crossrefs

Cf. A107353.
Other cases of seed: A107801 (a(1) = 2), A107802 (a(1) = 3), A107803 (a(1) = 5), A107804 (a(1) = 7), A107805 (a(1) = 11), A107806 (a(1) = 13), A107808 (a(1) = 19), A107809 (a(1) = 23), A107810 (a(1) = 29), A107811 (a(1) = 31), A107812 (a(1) = 37), A107813 (a(1) = 41), A107814 (a(1) = 43).

Programs

  • Mathematica
    p=Prime[7];b={p};d=p;Do[Do[r=Prime[c];If[FreeQ[b, r]&&Intersection@@IntegerDigits/@{d, r}=!={}, b=Append[b, r];d=r;Break[]], {c, 1000}], {k, 60}];b
  • PARI
    common(a,b)=a=vecsort(eval(Vec(Str(a))),,8);b=vecsort(eval(Vec(Str(b))),,8);#a+#b>#vecsort(concat(a,b),,8)
    in(v,x)=for(i=1,#v,if(v[i]==x,return(1)));0
    lista(nn) = {my(v=[17]); for(n=2, nn, forprime(p=2, default(primelimit), if(!in(v,p)&&common(v[#v],p), v=concat(v,p); break))); v; }
    \\ Charles R Greathouse IV, Jul 20 2011

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Jul 20 2011
Showing 1-10 of 35 results. Next