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.

A068868 Numbers prime(k) such that A068863(k) = prime(k).

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 37, 41, 47, 61, 101, 107, 331, 443, 463, 563, 853, 859, 1049, 2819, 7229, 9241, 10799, 10837, 31123, 31177, 51133, 51151, 71069, 91297, 111211, 289031, 511177, 689233, 689257, 689267, 689291, 889349, 889363, 911171, 911179, 1109477
Offset: 1

Views

Author

Amarnath Murthy, Mar 13 2002

Keywords

Crossrefs

Extensions

Definition corrected. More terms from b068863.txt. - R. J. Mathar, Nov 25 2015
Missing 41 and 47 inserted and corrections arising from incorrect b-file in A068863 and more terms from Sean A. Irvine, Mar 19 2024

A068861 a(1) = 1; a(n+1) is the smallest number not already in the sequence which differs from a(n) at every digit.

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, Mar 13 2002

Keywords

Examples

			11 follows 20 as the smallest number not included earlier and differing at every digit position.
		

Crossrefs

Programs

  • Haskell
    import Data.List (delete)
    a068861 n = a068861_list !! (n-1)
    a068861_list = f "x" (map show [1..]) where
       f u us = g us where
         g (v:vs)
           | and $ zipWith (/=) u v = (read v :: Int) : f v (delete v us)
           | otherwise = g vs
    -- Reinhard Zumkeller, Dec 21 2013

A068853 a(1) = 2; a(n+1) is the smallest prime > a(n) which differs from it in every digit.

Original entry on oeis.org

2, 3, 5, 7, 11, 23, 31, 43, 59, 61, 73, 89, 97, 101, 223, 307, 419, 503, 617, 701, 823, 907, 1013, 2129, 3001, 4127, 5003, 6121, 7013, 8101, 9013, 10139, 21001, 30113, 41039, 50101, 61027, 70111, 81023, 90107, 101021, 210109, 301013, 410141, 501013, 610157, 701009
Offset: 1

Views

Author

Amarnath Murthy, Mar 12 2002

Keywords

Comments

a(8996) has 1001 digits. - Michael S. Branicky, Mar 19 2024

Examples

			223 is a member and the next few primes are 227, 229, ... 283, 297, 307. 307 is the smallest one which differs from 223 in all corresponding positions.
		

Crossrefs

Cf. A068863.

Programs

  • Python
    from sympy import isprime
    from itertools import count, islice, product
    def diffgen(n): # generator of numbers >n sharing no digits with n
        s = str(n)
        P = [list(str(d) for d in range(10) if str(d) != si) for si in s]
        if s[0] < '9':
            f = [d for d in P[0] if d > s[0]]
            for t in product(*([f]+P[1:])):
                yield int("".join(t))
        for e in count(1):
            for t in product("123456789", *(["0123456789"]*(e-1) + P)):
                yield int("".join(t))
    def agen(): # generator of terms
        an = 2
        while True:
            yield an
            an = next(k for k in diffgen(an) if isprime(k))
    print(list(islice(agen(), 47))) # Michael S. Branicky, Mar 19 2024

Extensions

Corrected and extended by Ray Chandler, Jul 19 2003
a(46) and beyond from Michael S. Branicky, Mar 19 2024

A284146 a(n+1) is the smallest prime not already in the sequence which shares no digit with a(n).

Original entry on oeis.org

2, 3, 5, 7, 11, 23, 17, 29, 13, 47, 19, 37, 41, 53, 61, 43, 59, 31, 67, 83, 71, 89, 73, 101, 79, 103, 97, 113, 227, 109, 223, 107, 229, 131, 257, 139, 277, 149, 233, 151, 239, 157, 263, 179, 283, 167, 293, 181, 269, 137, 409, 127, 349
Offset: 1

Views

Author

Zak Seidov, Mar 20 2017

Keywords

Comments

The sequence is not a permutation of prime numbers.
E.g., after calculating 2001 terms of the sequence, the first absent primes are 1973,3719,3917,7193,9137,9173,9371. It's evident that these numbers will never appear in the sequence because any last term of the sequence should use at least one of digits 1,3,7,9.
The first nine terms {2, 3, 5, 7, 11, 23, 17, 29, 13} coincide with A068863(1..9).
The only fixed points are a(n) for n={1, 2, 3, 4, 5, 7, 12, 13, 17, 19} are {2, 3, 5, 7, 11, 17, 37, 41, 59, 67} that is for these n's a(n)=prime(n)=A000040(n).
a (100*k) for k = 1,20: {443, 1193, 1741, 1621, 4567, 6047, 5851, 6491, 7151, 7559, 9349, 10601, 11119, 11699, 13001, 11839, 14107, 16111, 15073, 16487}.

Crossrefs

Programs

  • Mathematica
    a = {2}; While[ Length[a] < 100, d = IntegerDigits@ Last@ a; p = 2; While[ Intersection[ IntegerDigits@p, d] != {} || MemberQ[a, p], p = NextPrime@ p]; AppendTo[a, p]]; a (* Giovanni Resta, Mar 21 2017 *)
Showing 1-4 of 4 results.