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-10 of 32 results. Next

A168435 A029743 listed in decreasing order starting from the largest.

Original entry on oeis.org

987654103, 987653201, 987652301, 987651403, 987650413, 987650341, 987650231, 987645103, 987645013, 987643021, 987641203, 987640321, 987640123, 987632501, 987630421, 987625403, 987621053, 987612053, 987610423, 987604523, 987603521
Offset: 1

Views

Author

Lekraj Beedassy, Nov 25 2009

Keywords

Crossrefs

A010784 Numbers with distinct decimal digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 102, 103, 104, 105, 106, 107, 108, 109, 120
Offset: 1

Views

Author

Keywords

Comments

More than the usual number of terms are displayed in order to show the difference from some closely related sequences.
Also: a(1) = 0; a(n) = Min{x integer | x > a(n-1) and all digits to base 10 are distinct}.
This sequence is finite: a(8877691) = 9876543210 is the last term; a(8877690) = 9876543201. The largest gap between two consecutive terms before a(249999) = 2409653 is 104691, as a(175289) = 1098765, a(175290) = 1203456. - Reinhard Zumkeller, Jun 23 2001
Complement of A109303. - David Wasserman, May 21 2008
For the analogs in other bases b, search for "xenodromes." A001339(b-1) is the number of base b xenodromes for b >= 2. - Rick L. Shepherd, Feb 16 2013
A073531 gives the number of positive n-digit numbers in this sequence. Note that it does not count 0. - T. D. Noe, Jul 09 2013
Can be seen as irregular table whose n-th row holds the n-digit terms; length of row n is then A073531(n) = 9*9!/(10-n)! except for n = 1 where we have 10 terms, unless 0 is considered to belong to a row 0. - M. F. Hasler, Dec 10 2018

Crossrefs

Subsequence of A043096.
Cf. A109303, A029740 (odds), A029741 (evens), A029743 (primes), A001339.

Programs

  • Haskell
    a010784 n = a010784_list !! (n-1)
    a010784_list = filter ((== 1) . a178788) [1..]
    -- Reinhard Zumkeller, Sep 29 2011
    
  • Mathematica
    Select[Range[0,100], Max[DigitCount[#]] == 1 &] (* Harvey P. Dale, Apr 04 2013 *)
  • PARI
    is(n)=my(v=vecsort(digits(n)));v==vecsort(v,,8) \\ Charles R Greathouse IV, Sep 17 2012
    
  • PARI
    select( is(n)=!n||#Set(digits(n))==logint(n,10)+1, [0..120]) \\ M. F. Hasler, Dec 10 2018
    
  • PARI
    apply( A010784_row(n,L=List(if(n>1,[])))={forvec(d=vector(n,i,[0,9]),forperm(d,p,p[1]&&listput(L,fromdigits(Vec(p)))),2);Set(L)}, [1..2]) \\ A010784_row(n) returns all terms with n digits. - M. F. Hasler, Dec 10 2018
    
  • Python
    A010784_list = [n for n in range(10**6) if len(set(str(n))) == len(str(n))] # Chai Wah Wu, Oct 13 2019
    
  • Python
    # alternate for generating full sequence
    from itertools import permutations
    afull = [0] + [int("".join(p)) for d in range(1, 11) for p in permutations("0123456789", d) if p[0] != "0"]
    print(afull[:100]) # Michael S. Branicky, Aug 04 2022
    
  • Scala
    def hasDistinctDigits(n: Int): Boolean = {
      val numerStr = n.toString
      val digitSet = numerStr.split("").toSet
      numerStr.length == digitSet.size
    }
    (0 to 99).filter(hasDistinctDigits) // Alonso del Arte, Jan 09 2020

Formula

A178788(a(n)) = 1; A178787(a(n)) = n; A043537(a(n)) = A055642(a(n)). - Reinhard Zumkeller, Jun 30 2010
A107846(a(n)) = 0. - Reinhard Zumkeller, Jul 09 2013

Extensions

Offset changed to 1 and first comment adjusted by Reinhard Zumkeller, Jun 14 2010

A046732 "Norep emirps": primes with distinct digits which remain prime when reversed.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 31, 37, 71, 73, 79, 97, 107, 149, 157, 167, 179, 347, 359, 389, 701, 709, 739, 743, 751, 761, 769, 907, 937, 941, 953, 967, 971, 983, 1069, 1097, 1237, 1249, 1259, 1279, 1283, 1409, 1429, 1439, 1453, 1487, 1523, 1583, 1597, 1657, 1723, 1753
Offset: 1

Views

Author

Keywords

Comments

There are no 10-digit terms because their sum of digits would be 45 and thus the number would be divisible by 3.
There are 25332 terms in this sequence, the last of which is 987653201, as found by Harvey P. Dale. - see Martin Gardner's column in Scientific American.

Crossrefs

Programs

  • Maple
    read(transforms): A046732 := proc(n) option remember: local d,k,p,distdig: if(n=1)then return 2: fi: p:=procname(n-1): do p:=nextprime(p): if(isprime(digrev(p)))then d:=convert(p,base,10): distdig:=true: for k from 0 to 9 do if(numboccur(d,k)>1)then distdig:=false: break: fi: od: if(distdig)then return p: fi: fi: od: end: seq(A046732(n),n=1..52); # Nathaniel Johnston, May 29 2011
  • Mathematica
    Select[Prime[Range[280]], Length[Union[x = IntegerDigits[#]]] == Length[x] && PrimeQ[FromDigits[Reverse[x]]] &] (* Jayanta Basu, Jun 28 2013 *)
  • Python
    from sympy import prime, isprime
    A046732 = [p for p in (prime(n) for n in range(1,10**3)) if len(str(p)) == len(set(str(p))) and isprime(int(str(p)[::-1]))] # Chai Wah Wu, Aug 14 2014

Extensions

More terms from Jud McCranie.

A050758 Primes containing at least one pair of consecutive equal digits.

Original entry on oeis.org

11, 113, 199, 211, 223, 227, 229, 233, 277, 311, 331, 337, 433, 443, 449, 499, 557, 577, 599, 661, 677, 733, 773, 811, 877, 881, 883, 887, 911, 977, 991, 997, 1009, 1033, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1223, 1229
Offset: 1

Views

Author

Patrick De Geest, Sep 15 1999

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[205]],MemberQ[Differences[IntegerDigits[#]],0]&] (* Jayanta Basu, May 31 2013 *)
    Select[Prime[Range[300]],SequenceCount[IntegerDigits[#],{x_,x_}]>0&] (* The program uses the SequenceCount function from Mathematica version 10 *) (* Harvey P. Dale, Feb 20 2016 *)
  • PARI
    is(n)=my(d=digits(n)); for(i=2,#d,if(d[i]==d[i-1], return(isprime(n)))); 0 \\ Charles R Greathouse IV, Aug 29 2015

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Aug 29 2015

A243363 Numbers with divisors containing all the digits 0-9 and each digit appears exactly once (in base 10).

Original entry on oeis.org

203457869, 203465789, 203465897, 203468579, 203475869, 203478659, 203485697, 203485769, 203495867, 203548967, 203564897, 203568947, 203574689, 203584679, 203584769, 203594687, 203596847, 203598467, 203645879, 203645987, 203648957, 203654987, 203659487, 203674589
Offset: 1

Views

Author

Jaroslav Krizek, Jun 04 2014

Keywords

Comments

Primes made up of distinct digits except 1.
There are no composite numbers with divisors containing all the digits 0-9 and each digit appears exactly once.
Subsequence of A029743 (primes with distinct digits).
Numbers n such that A243360(n) = 9876543210.
Sequence contains 19558 terms, the last term is a(19558) = 987625403.

Crossrefs

Programs

  • Magma
    [n: n in [1..203457879] | Seqint(Sort(&cat[(Intseq(k)): k in Divisors(n)])) eq 9876543210];
    
  • Mathematica
    Select[Range[203*10^6,204*10^6],Sort[Flatten[IntegerDigits/@ Divisors[#]]] == Range[0,9]&] (* Harvey P. Dale, Aug 22 2016 *)
  • Python
    # generates entire sequence
    from sympy import isprime
    from itertools import permutations as perms
    dist = (int("".join(p)) for p in perms("023456789", 9) if p[0] != "0")
    afull = [k for k in dist if isprime(k)]
    print(afull[:24]) # Michael S. Branicky, Aug 04 2022

A160402 Primes made up of all distinct digits except 0 and 1.

Original entry on oeis.org

23456789, 23458679, 23459687, 23465789, 23465987, 23469587, 23475869, 23478569, 23489657, 23495867, 23496587, 23498567, 23546879, 23546987, 23548697, 23564897, 23564987, 23567849, 23569487, 23576489, 23584679, 23587649, 23589647, 23594687
Offset: 1

Views

Author

Lekraj Beedassy, May 13 2009

Keywords

Comments

More precisely, "primes made up of all distinct digits from 2 to 9, each occurring once." Since this restricts the number of digits to 8, the sequence is finite.
The last term of this sequence is a(3098) = 98745623. - Nathaniel Johnston, Jun 24 2011
Also numbers n such that the list of divisors of n contains all the digits 1-9 and each digit appears exactly once (in base 10). There are no composite numbers with this property. Numbers n such that A243360(n) = 987654321. - Jaroslav Krizek, Jun 19 2014

Crossrefs

Cf. A029743, A106116. Subsequence of A074665.

Programs

  • Magma
    [n: n in [1..100000000] | Seqint(Sort(&cat[(Intseq(k)): k in Divisors(n)])) eq 987654321] // Jaroslav Krizek, Jun 19 2014
  • Maple
    A160402:={}: p:=23456789: while p<=98765432 do d:=convert(p,base,10): ddig:=true: for k from 0 to 9 do if((k<=1 and numboccur(k,d)>0) or (k>=2 and numboccur(k,d)<>1))then ddig:=false:break: fi: od: if(ddig)then A160402:=A160402 union {p}: fi: p:=nextprime(p): od: op(sort(convert(A160402,list))); # Nathaniel Johnston, Jun 24 2011

Extensions

Keywords "base,fini" added by R. J. Mathar, May 14 2009

A343921 The maximum number of times a positive number can be added to n such that the digits in each resulting sum are distinct.

Original entry on oeis.org

36, 9, 12, 13, 12, 11, 15, 12, 11, 26, 14, 13, 23, 11, 11, 13, 26, 11, 12, 12, 13, 23, 14, 11, 24, 12, 13, 35, 25, 12, 12, 16, 13, 12, 12, 11, 13, 11, 17, 12, 13, 12, 15, 9, 12, 12, 25, 9, 14, 22, 12, 23, 12, 25, 34, 11, 11, 13, 22, 11, 16, 12, 14, 12, 12, 24, 13, 13, 15, 12, 13, 10, 11, 11, 9
Offset: 0

Views

Author

Scott R. Shannon, May 04 2021

Keywords

Comments

See A338659 for the smallest positive number that can be added to n a total of a(n) times such that the digits in each resulting sum are distinct.
See A343922 for the largest positive number that can be added to n a total of a(n) times such that the digits in each resulting sum are distinct.

Examples

			a(8) = 11 as A338659(8) = A343922(8) = 150 can be added to 8 a total of 11 times with each sum containing distinct digits. The sums are 158, 308, 458, 608, 758, 908, 1058, 1208, 1358, 1508, 1658. No other positive number can be added to 8 a total of 11 or more times to produce such sums.
		

Crossrefs

Formula

a(n) = 0 for n >= 9876543210.

A085451 Numbers n such that n and prime[n] together use only distinct digits.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 10, 12, 15, 16, 17, 19, 20, 21, 24, 25, 27, 28, 35, 39, 40, 45, 53, 57, 58, 60, 61, 69, 70, 72, 79, 85, 89, 90, 91, 93, 96, 98, 104, 108, 120, 124, 145, 146, 147, 150, 162, 236, 237, 253, 254, 259, 315, 316, 359, 380, 384, 390, 405, 406, 460, 461, 518
Offset: 1

Views

Author

Zak Seidov, Jul 01 2003

Keywords

Comments

There are exactly 101 such numbers in the sequence. Numbers with distinct digits in A010784. Primes with distinct digits in A029743. The case n and n^2 (exactly 22 numbers) in A059930.
A178788(A045532(a(n))) = 1. [From Reinhard Zumkeller, Jun 30 2010]

Examples

			3106 is in the sequence (and the last term) because it and prime[3106]=28549 together use all 10 distinct digits.
		

Crossrefs

Programs

  • Mathematica
    bb = {}; Do[idpn = IntegerDigits[Prime[n]]; idn = IntegerDigits[n]; If[Length[idn] + Length[idpn] == Length[Union[idn, idpn]], bb = {bb, n}], {n, 1, 100000}]; Flatten[bb]

A155024 Primes with distinct nonprime digits.

Original entry on oeis.org

19, 41, 61, 89, 109, 149, 401, 409, 419, 461, 491, 601, 619, 641, 691, 809, 941, 1049, 1069, 1409, 1489, 1609, 4019, 4091, 4691, 4801, 4861, 6089, 6091, 6481, 6491, 6841, 8069, 8419, 8461, 8609, 8641, 8941, 9041, 9461, 9601, 14869, 18049, 40169, 40189
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 19 2009

Keywords

Comments

Nonprime digits = 0, 1, 4, 6, 8 and 9.
There are only 153 terms in this sequence, all of which are in the linked b-file. - Harvey P. Dale, Dec 30 2012

Crossrefs

Cf. A029743, A034844. - R. J. Mathar, Mar 29 2010

Programs

  • Mathematica
    Select[Prime[Range[5000]],Union[PrimeQ[IntegerDigits[#]]] == {False} && Max[ DigitCount[#]]==1&] (* Harvey P. Dale, Dec 30 2012 *)
  • PARI
    is(k) = isprime(k) && setintersect([0, 1, 4, 6, 8, 9], v=vecsort(digits(k))) == v; \\ Jinyuan Wang, Mar 27 2020

Extensions

Entries checked by R. J. Mathar, Mar 29 2010

A323387 Primes whose digits are distinct square digits, i.e., consisting of only digits 0, 1, 4, 9.

Original entry on oeis.org

19, 41, 109, 149, 401, 409, 419, 491, 941, 1049, 1409, 4019, 4091, 9041
Offset: 1

Views

Author

Bernard Schott, Jan 13 2019

Keywords

Comments

There are only fourteen terms in this sequence, which is a finite subsequence of A061246.

Examples

			1049 is the smallest prime containing all the square digits exactly once, and 9041 is the largest one.
		

Crossrefs

Subsequence of A061246. Subsequence of A029743.
Showing 1-10 of 32 results. Next