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

A076489 Number of common (distinct) digits of consecutive natural numbers.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Oct 21 2002

Keywords

Comments

a(A226637(n)) = 0. Reinhard Zumkeller, Sep 01 2013
This is the prefix overlap between the decimal expansions of n and n+1 (cf. A238845). - N. J. A. Sloane, Mar 22 2014

Crossrefs

Cf. A001477, A031298, A076490, A238845, A239092 (partial sums).

Programs

  • Haskell
    import Data.List (intersect, nub)
    a076489 n = a076489_list !! n
    a076489_list = map (length . nub) $
                   zipWith intersect (tail a031298_tabf) a031298_tabf
    -- Reinhard Zumkeller, Sep 01 2013
  • Mathematica
    Table[Length[Intersection[IntegerDigits[w], IntegerDigits[w+1]]], {w, 0, 200}]

Extensions

Initial zero prepended and offset adjusted by Reinhard Zumkeller, Sep 01 2013

A068803 Smaller of two consecutive primes which have no common digits.

Original entry on oeis.org

2, 3, 5, 7, 19, 29, 37, 47, 59, 79, 97, 397, 499, 599, 1999, 2999, 3989, 4999, 29989, 49999, 59999, 79999, 199999, 599999, 799999, 2999999, 4999999, 5999993, 19999999, 29999999, 59999999, 69999989, 99999989, 199999991, 699999953, 799999999, 5999999989, 6999999989
Offset: 1

Views

Author

Amarnath Murthy, Mar 06 2002

Keywords

Comments

Is the sequence finite or infinite?
Except for 2, 3, 5, and 7, all such primes are of the form a*10^n-b with 1 <= a <= 8 and b mod 10 = 1, 3, 7 or 9. An example of a large pair is 10^101-203 and 10^101+3. The largest known pair of probable primes is 8*10^5002-6243 and 8*10^5002+14481. - Lewis Baxter, Mar 06 2023

Examples

			397 is a term as 397 and 401 are two consecutive primes with no common digits.
		

Crossrefs

Cf. A076490.

Programs

  • Mathematica
    First /@ Select[Partition[Prime[Range[10^6]], 2, 1], Intersection @@ IntegerDigits /@ # == {} &] (* Jayanta Basu, Aug 06 2013 *)
  • PARI
    isok(p) = isprime(p) && (#setintersect(Set(digits(p)), Set(digits(nextprime(p+1)))) == 0); \\ Michel Marcus, Mar 27 2023
    
  • Python
    from itertools import count, islice
    from sympy import nextprime, prevprime
    def agen(): # generator of terms
        yield from [2, 3, 5]
        for d in count(2):
            for b in range(10**(d-1), 10**d, 10**(d-1)):
                p, q = prevprime(b), nextprime(b)
                if set(str(p)) & set(str(q)) == set():
                    yield p
    print(list(islice(agen(), 40))) # Michael S. Branicky, May 09 2023

Extensions

More terms from Larry Soule (lsoule(AT)gmail.com), Jun 21 2006
a(36) and beyond from Michael S. Branicky, May 09 2023

A076491 a(2*n), a(2*n+1) is the smallest consecutive prime pairs with at least n distinct common decimal digits.

Original entry on oeis.org

2, 3, 11, 13, 101, 103, 1031, 1033, 10223, 10243, 18379, 18397, 126079, 126097, 1206479, 1206497, 10258379, 10258397, 102346879, 102346897, 10127685439, 10127685493
Offset: 0

Views

Author

Labos Elemer, Oct 21 2002

Keywords

Comments

If the common digits were not required to be distinct, the resulting sequence would be 2, 3, 11, 13, 101, 103, 1013, 1019, 1913, 1931, 18379, 18397, 109279, 109297, 1000213, 1000231, ... - Giovanni Resta, Oct 29 2019

Crossrefs

Programs

  • Mathematica
    aa[n_] := Block[{p,q,cp,cq}, p = NextPrime[10^(n - 1)]; cp = IntegerDigits@ p; While[True, q = NextPrime[p]; cq = IntegerDigits[q]; If[ Length[ Intersection[cp, cq]] >= n, Break[]]; p=q; cp=cq]; {p, q}]; Flatten[aa /@ Range[0, 9]] (* Giovanni Resta, Oct 29 2019 *)

Extensions

Corrected and extended by Giovanni Resta, Oct 29 2019

A076492 Number of common decimal digits of n! and (n+1)!.

Original entry on oeis.org

0, 0, 0, 1, 2, 1, 2, 3, 5, 4, 4, 3, 4, 4, 3, 5, 8, 7, 7, 6, 5, 7, 9, 7, 8, 9, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 9, 9, 10, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10
Offset: 1

Views

Author

Labos Elemer, Oct 21 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Length[Intersection[IntegerDigits[(n+1)!], IntegerDigits[n!]]], {n, 1, 100}]
    Length[Intersection[#[[1]],#[[2]]]]&/@Partition[IntegerDigits[ Range[ 90]!],2,1] (* Harvey P. Dale, Jun 26 2021 *)

Extensions

More terms from Diana L. Mecum, Jun 17 2007
Showing 1-4 of 4 results.