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

A119393 Numbers n such that the index of the prime and the prime share some digit.

Original entry on oeis.org

7, 11, 13, 14, 18, 23, 29, 30, 31, 32, 33, 34, 37, 38, 41, 52, 54, 55, 56, 62, 63, 73, 74, 75, 78, 80, 81, 82, 83, 84, 92, 94, 95, 97, 100, 103, 105, 107, 109, 110, 112, 113, 114, 115, 116, 121, 125, 126, 127, 128, 129, 130, 131, 132, 133, 135, 136, 137, 138, 139, 140
Offset: 1

Views

Author

Robert G. Wilson v, Jul 25 2006

Keywords

Examples

			7 is a member since the seventh prime is 17 with the index and the prime sharing the digit 7.
		

Crossrefs

Cf. A000027, A000040, A243355 (complement).

Programs

  • Haskell
    import Data.List (intersect)
    a119393 n = a119393_list !! (n-1)
    a119393_list = filter
       (\x -> not $ null $ show x `intersect` (show $ a000040 x)) [1..]
    -- Reinhard Zumkeller, Sep 14 2014
  • Mathematica
    Select[Range@140, Intersection[IntegerDigits@#, IntegerDigits@ Prime@# ] != {} &]

Formula

Intersection of A000027&A000040 which share a digit.

A243390 Numbers k such that, taken pairwise, k, prime(k) and phi(k) have no common digits.

Original entry on oeis.org

2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 20, 22, 39, 44, 46, 48, 65, 66, 77, 87, 93, 99, 123, 134, 146, 154, 165, 230, 246, 430, 441, 446, 494, 522, 528, 552, 555, 566, 622, 662, 711, 737, 738, 740, 825, 855, 984, 1155, 1160, 1170, 1180, 1214, 2230, 5055, 8878
Offset: 1

Views

Author

Colin Barker, Jun 04 2014

Keywords

Comments

a(95) > 10^10 if it exists. - David A. Corneth, Aug 25 2020

Examples

			n = 1214, prime(1214) = 9839, phi(1214) = 606; (1214,9839), (1214,606) and (9839,606) have no common digits. So 1214 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    ncdQ[n_]:=Module[{a=IntegerDigits[n],b=IntegerDigits[Prime[n]],c = IntegerDigits[ EulerPhi[n]]},Intersection[a,b] == Intersection[b,c] == Intersection[a,c]=={}]; Select[Range[9000],ncdQ] (* Harvey P. Dale, Aug 24 2020 *)
  • PARI
    { s=[];
      for(n=1, 50000,
        u=vecsort(digits(n),,8);
        v=vecsort(digits(prime(n)),,8);
        w=vecsort(digits(eulerphi(n)),,8);
        if(setintersect(u, v)==[]&&setintersect(u, w)==[]&&setintersect(v, w)==[],
          s=concat(s, n)
        )
      );
      s }
    
  • PARI
    upto(n) = {my(t=1,res=List()); forprime(p=2, oo, st=Set(digits(t)); sp=Set(digits(p)); if(#setintersect(st, sp)==0, se=Set(digits(eulerphi(t))); if(#setintersect(st,se)==0 && #setintersect(sp,se)==0, listput(res,t))); t++; if(t>=n,return(res)))} \\ David A. Corneth, Aug 25 2020
Showing 1-2 of 2 results.