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.

A076490 Number of common (distinct) digits of consecutive prime numbers.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 1, 2, 0, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2
Offset: 1

Views

Author

Labos Elemer, Oct 21 2002

Keywords

Examples

			1 to 9 common digits for {11 and 13},{101,103},{1031,1033}, {10223,10243},{97213,97231},{126079,126097},{1206479,1206497}, {10186237,10186273},{100438279,100438297} respectively.
		

Crossrefs

Programs

  • Haskell
    import Data.List (intersect, nub); import Data.Function (on)
    a076490 n = a076490_list !! n
    a076490_list = map (length . nub) $
       zipWith (intersect `on` show) (tail a000040_list) a000040_list
    -- Reinhard Zumkeller, Sep 01 2013
    
  • Mathematica
    Table[Length[Intersection[IntegerDigits[Prime[w]], IntegerDigits[ Prime[ w+1]]]], {w, 1, 200}] (* corrected by Harvey P. Dale, May 14 2014 *)
    Length[Intersection@@IntegerDigits[#]]&/@Partition[Prime[Range[110]],2,1] (* Harvey P. Dale, May 14 2014 *)
  • PARI
    a(n) = my(p=prime(n)); #setintersect(Set(digits(p)), Set(digits(nextprime(p+1)))); \\ Michel Marcus, Mar 27 2023