login
A076490
Number of common (distinct) digits of consecutive prime numbers.
4
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,26
LINKS
EXAMPLE
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.
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 *)
PROG
(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
(PARI) a(n) = my(p=prime(n)); #setintersect(Set(digits(p)), Set(digits(nextprime(p+1)))); \\ Michel Marcus, Mar 27 2023
CROSSREFS
Sequence in context: A306366 A135265 A144110 * A320278 A302111 A124278
KEYWORD
base,easy,nonn
AUTHOR
Labos Elemer, Oct 21 2002
STATUS
approved