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.

Previous Showing 11-20 of 32 results. Next

A323578 Primes with distinct digits for which parity of digits alternates.

Original entry on oeis.org

2, 3, 5, 7, 23, 29, 41, 43, 47, 61, 67, 83, 89, 103, 107, 109, 127, 149, 163, 167, 307, 347, 349, 367, 389, 503, 509, 521, 523, 541, 547, 563, 569, 587, 701, 709, 743, 761, 769, 907, 941, 947, 967, 983, 2143, 2309
Offset: 1

Views

Author

Bernard Schott, Jan 18 2019

Keywords

Comments

There are 4426 terms (found by David A. Corneth) in this sequence, which is a subsequence of A030144.
The largest prime of this sequence is 987654103 which is also the largest prime with distinct digits in A029743.

Examples

			2143 is a term as 2, 1, 4 and 3 have even and odd parity alternately and these four digits are all distinct.
		

Crossrefs

Intersection of A030144 and A029743.

Programs

  • Mathematica
    {2}~Join~Select[Prime@ Range@ 350, And[Max@ Tally[#][[All, -1]] == 1, AllTrue[#[[Range[2, Length[#], 2] ]], EvenQ], AllTrue[#[[Range[1, Length[#], 2] ]], OddQ]] &@ Reverse@ IntegerDigits@ # &] (* Michael De Vlieger, Jan 19 2019 *)
  • PARI
    allTerms() = {my(res = List([2])); c = vector(10); odd = [1, 3, 5, 7, 9]; even = [0, 2, 4, 6, 8]; for(i = 0, 119, pi = numtoperm(5, i); vi = vector(5, k, odd[pi[k]]); for(j = 0, 119, pj = numtoperm(5, j); vj = vector(5, k, even[pj[k]]); for(m = 1, 5, c[2*m] = vi[m]; c[2*m - 1] = vj[m]; ); cv = fromdigits(c); for(m = 1, 10, if(isprime(cv % 10^m), listput(res, cv % 10^m); ) ) ) ); listsort(res, 1); res } \\ David A. Corneth, Jan 18 2019

A050757 Primes containing no pair of consecutive equal digits.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 239, 241, 251, 257, 263, 269, 271, 281, 283, 293, 307, 313, 317, 347, 349
Offset: 1

Views

Author

Patrick De Geest, Sep 15 1999

Keywords

Crossrefs

Programs

  • Mathematica
    t={}; Do[p = Prime[n]; If[!MemberQ[Differences[IntegerDigits[p]],0], AppendTo[t,p]], {n,70}]; t (* Jayanta Basu, May 04 2013 *)

Extensions

Offset corrected by Arkadiusz Wesolowski, Jan 12 2012

A210441 Nonprime numbers with distinct decimal digits.

Original entry on oeis.org

1, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 26, 27, 28, 30, 32, 34, 35, 36, 38, 39, 40, 42, 45, 46, 48, 49, 50, 51, 52, 54, 56, 57, 58, 60, 62, 63, 64, 65, 68, 69, 70, 72, 74, 75, 76, 78, 80, 81, 82, 84, 85, 86, 87, 90, 91, 92, 93, 94, 95, 96, 98
Offset: 1

Views

Author

Jaroslav Krizek, Jan 20 2013

Keywords

Comments

Sequence is finite with 8594603 terms, last term is a(8594603) = 9876543210.
Complement of A029743 with respect to A010784.

Crossrefs

Cf. A010784 (numbers with distinct decimal digits), A029743 (primes with distinct decimal digits).

Programs

  • Mathematica
    Select[Range[100],!PrimeQ[#]&&Max[DigitCount[#]]<2&] (* Harvey P. Dale, Jan 22 2023 *)

A249953 Primes with distinct digits: a(n) is the least prime > a(n-1) such that a(n-1) and a(n) share just one digit.

Original entry on oeis.org

13, 17, 19, 29, 59, 79, 89, 97, 107, 139, 157, 163, 179, 239, 241, 257, 263, 271, 283, 307, 349, 367, 389, 409, 421, 439, 457, 461, 479, 509, 521, 547, 563, 571, 593, 613, 647, 653, 691, 701, 739, 751, 769, 809, 821, 839, 857, 863, 937, 941, 953, 967, 983, 1049, 1237, 1409, 1523, 1607
Offset: 1

Views

Author

Zak Seidov, Dec 05 2014

Keywords

Comments

The last term is a(163) = 102437.

Crossrefs

Subsequence of A029743.
Cf. A030284.

Programs

  • Mathematica
    a249953[n_Integer] := Module[{t = {1}, i},
      Do[If[And[DuplicateFreeQ[IntegerDigits[Prime[i]]],
         Length[Intersection[IntegerDigits[Last@t],
            IntegerDigits[Prime[i]]]] == 1], True;
    t = Append[t, Prime[i]]], {i, 1, n}]; Rest[t]]; a249953[120000] (* Michael De Vlieger, Dec 14 2014 *)
    lp1d[n_]:=Module[{p=NextPrime[n]},While[Length[Intersection[ IntegerDigits[ n],IntegerDigits[p]]]!=1||!DuplicateFreeQ[ IntegerDigits[ p]],p= NextPrime[ p]];p]; NestList[lp1d,13,60] (* Harvey P. Dale, May 31 2019 *)

A260814 Powers of 2 with distinct digits.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 1048576, 536870912
Offset: 1

Views

Author

Zak Seidov, Aug 02 2015

Keywords

Crossrefs

Programs

  • Mathematica
    Select[2^Range[0,34], Max@ DigitCount@ # == 1 &] (* Michael De Vlieger, Aug 03 2015 *)
  • PARI
    lista() = {lim = ceil(log(10^11)/(log(2))); for (n=0, lim, d = digits(2^n); if (#vecsort(d,,8) == #d, print1(n, ", ")););} \\ Michel Marcus, Aug 03 2015

Formula

a(n) = 2^A084688(n).

A320969 Semiprimes with distinct digits.

Original entry on oeis.org

4, 6, 9, 10, 14, 15, 21, 25, 26, 34, 35, 38, 39, 46, 49, 51, 57, 58, 62, 65, 69, 74, 82, 85, 86, 87, 91, 93, 94, 95, 106, 123, 129, 134, 142, 143, 145, 146, 158, 159, 169, 178, 183, 185, 187, 194, 201, 203, 205, 206, 209, 213, 214, 215, 217, 218, 219, 235, 237, 247, 249, 253, 254, 259, 265, 267, 274
Offset: 1

Views

Author

Zak Seidov, Oct 25 2018

Keywords

Comments

This sequence has 864939 terms, the last being 987654301.
Number of n-digit terms, for n = 1..9: 3, 27, 183, 1140, 6240, 27666, 99543, 277146, 452991. There are no semiprimes with distinct digits for n > 9.
Indeed, a 10-digit pandigital number is divisible by 9=3*3, so it can't be semiprime, and there are not more than 10 distinct digits in base 10. - M. F. Hasler, Oct 29 2018

Examples

			a(n*10^5) for n= 1..8: 6710843 = 173*38791, 30541627 = 881*34667, 62148035 = 5*12429607, 95068217 = 41*2318737, 280196547 = 3*93398849, 476891503 = 11*43353773, 654037129 = 79*8278951, 861247059 = 3*287082353.
		

Crossrefs

Intersection of A001358 and A010784.
Cf. A029743.

Programs

  • Mathematica
    Select[Range[300],PrimeOmega[#]==2&&Max[DigitCount[#]]==1&] (* Harvey P. Dale, Jan 29 2022 *)
  • PARI
    is(n)=bigomega(n)==2&& #Set(n=digits(n))=#n \\ M. F. Hasler, Oct 29 2018
    
  • PARI
    row(n,L=List())=forvec(d=vector(n,i,[0,9]),for(i=!d[1]*(n-1)!,n!-1,bigomega(fromdigits(vecextract(d,numtoperm(n,i))))==2||next;  listput(L,fromdigits(vecextract(d,numtoperm(n,i))))),2);Set(L) \\ Returns the n-digit terms. - M. F. Hasler, Oct 29 2018

Extensions

More terms from M. F. Hasler, Oct 29 2018

A338659 The smallest positive number that can be added to n the maximum number of times, see A343921(n), such that the digits in each resulting sum are distinct, or -1 if no such number exists.

Original entry on oeis.org

27, 1, 34, 81, 15, 81, 48, 86, 150, 37, 355, 23, 37, 47, 56, 15, 37, 44, 55, 37, 43, 37, 14, 17, 27, 340, 811, 27, 37, 340, 15, 37, 37, 15, 23, 35, 14, 91, 22, 48, 44, 233, 63, 33, 53, 75, 37, 3, 75, 37, 14, 27, 811, 37, 27, 88, 37, 63, 37, 171, 22, 391, 74, 43, 44, 37, 43, 480, 37, 37, 478
Offset: 0

Views

Author

Scott R. Shannon, Apr 22 2021

Keywords

Examples

			a(0) = 27 as 27 can be added to 0 a total of A343921(0) = 36 times with each sum containing distinct digits. The 36 sums are 27, 54, 81, 108, 135, ..., 918, 945, 972. No other positive number can be added 36 or more times to 0 to produce such sums.
a(1) = 1 as 1 can be added to 1 a total of A343921(1) = 9 times with each sum containing distinct digits. The sums are 2,3,4,5,6,7,8,9,10. There are fourteen positive numbers in all which can be added to 1 a total of 9 times producing sums with distinct digits, the largest being 7012 (see A343922).
a(2) = 34 as 34 can be added to 2 a total of A343921(2) = 12 times with each sum containing distinct digits. The sums are 36, 70, 104, 138, 172, 206, 240, 274, 308, 342, 376, 410. No other positive number can be added 12 or more times to 2 to produce such sums.
		

Crossrefs

Formula

a(n) = -1 for n >= 9876543210.

A343922 The largest positive number that can be added to n the maximum number of times, see A343921(n), such that the digits in each resulting sum are distinct, or -1 if no such number exists.

Original entry on oeis.org

27, 7012, 34, 81, 15, 781, 48, 86, 150, 37, 355, 23, 37, 47, 56, 15, 37, 931, 55, 355, 44, 37, 14, 17, 27, 340, 811, 27, 37, 340, 31, 37, 37, 15, 778, 61, 14, 91, 22, 48, 44, 233, 63, 299, 606, 75, 37, 9111, 75, 37, 14, 27, 7811, 37, 27, 91, 37, 63, 37, 171, 287, 391, 74, 43, 44, 37, 43, 480
Offset: 0

Views

Author

Scott R. Shannon, May 04 2021

Keywords

Examples

			a(0) = 27 as 27 can be added to 0 a total of A343921(0) = 36 times with each sum containing distinct digits. The 36 sums are 27, 54, 81, 108, 135, ..., 918, 945, 972. No other positive number can be added 36 or more times to 0 to produce such sums.
a(1) = 7012 as 7012 can be added to 1 a total of A343921(1) = 9 times with each sum containing distinct digits. The sums are 7013, 14025, 21037, 28049, 35061, 42073, 49085, 56097, 63109. There are fourteen positive numbers in all which can be added to 1 a total of 9 times producing sums with distinct digits, the smallest being 1 (see A338659).
a(47) = 9111 as 9111 can be added to 47 a total of A343921(47) = 9 times with each sum containing distinct digits. The sums are 9158, 18269, 27380, 36491, 45602, 54713, 63824, 72935, 82046. There are five positive numbers in all which can be added to 47 a total of 9 times producing sums with distinct digits, the smallest being 3 (see A338659).
		

Crossrefs

Formula

a(n) = -1 for n >= 9876543210.

A356196 Consider pairs of consecutive primes {p,q} such that p, q, q-p and q+p all with distinct digits. Sequence gives lesser primes p.

Original entry on oeis.org

2, 3, 5, 13, 17, 19, 23, 29, 31, 37, 41, 43, 59, 61, 67, 73, 79, 83, 89, 103, 107, 137, 157, 167, 173, 193, 239, 241, 251, 257, 263, 269, 281, 283, 359, 389, 397, 401, 419, 421, 457, 461, 463, 467, 487, 523, 601, 613, 617, 619, 641, 643, 683
Offset: 1

Views

Author

Zak Seidov, Oct 31 2022

Keywords

Comments

This sequence has 1843 terms, the last being 927368041.

Examples

			For last term: p = 927368041, q = 927368051, q-p = 10, q+p = 1854736092.
		

Crossrefs

Subsequence of A029743 (primes with distinct digits).

Programs

  • Python
    from sympy import isprime, nextprime
    from itertools import combinations, permutations
    def distinct(n): s = str(n); return len(s) == len(set(s))
    def afull():
        for d in range(1, 10):
            s = set()
            for p in permutations("0123456789", d):
                if p[0] == "0": continue
                p = int("".join(p))
                if not isprime(p): continue
                q = nextprime(p)
                if not all(distinct(t) for t in [q, q-p, q+p]): continue
                s.add(p)
            yield from sorted(s)
    print(list(afull())) # Michael S. Branicky, Nov 01 2022

A363963 a(n) is the greatest number with distinct decimal digits and n prime factors, counted with multiplicity, or -1 if there is no such number.

Original entry on oeis.org

1, 987654103, 987654301, 9876541023, 9876542103, 9876543102, 9876543201, 9876543210, 9876542130, 9876543120, 9876534120, 9876345120, 9876514032, 9876431250, 9876045312, 9875324160, 9876523104, 9863147520, 9875312640, 9635217408, 9845637120, 9715064832, 9574023168, 9805234176, 5892341760, 6398410752, -1, -1, -1, 536870912
Offset: 0

Views

Author

Zak Seidov and Robert Israel, Jun 29 2023

Keywords

Comments

a(n) = -1 for n > 29.

Examples

			a(2) = 987654301 = 486769*2029 has distinct digits and 2 prime factors counted with multiplicity, and is the largest such number.
		

Crossrefs

Programs

  • Maple
    N:= 29: V:= Array(0..N,-1):
    for m from 10 to 1 by -1 do
      for L in combinat:-permute([9,8,7,6,5,4,3,2,1,0],m) while count < N do
      if L[1] = 0 then break fi;
      x:= add(L[i]*10^(m-i),i=1..m);
      v:= numtheory:-bigomega(x);
      if v <= N and V[v] = -1 then V[v]:= x; count:= count+1 fi
    od od:
    convert(V,list);
  • Python
    from sympy import primeomega
    from itertools import count, islice, permutations as P
    def agen(): # generator of terms
        n, adict = 0, {0:1, 1:987654103, 2:987654301} # a(1), a(2) take a while
        D = [p for d in range(10, 0, -1) for p in P("9876543210", d) if p[0] != "0"]
        for k in (int("".join(t)) for t in D):
            v = primeomega(k)
            if v not in adict:
                adict[v] = k
                while n in adict: yield adict[n]; n += 1
        yield from (adict[n] if n in adict else -1 for n in count(n))
    print(list(islice(agen(), 19))) # Michael S. Branicky, Apr 05 2024
Previous Showing 11-20 of 32 results. Next