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 31-40 of 47 results. Next

A358097 a(n) is the smallest integer m > n such that m and n have no common digit, or -1 when such integer m does not exist.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 22, 20, 30, 20, 20, 20, 20, 20, 20, 20, 31, 30, 30, 40, 30, 30, 30, 30, 30, 30, 41, 40, 40, 40, 50, 40, 40, 40, 40, 40, 51, 50, 50, 50, 50, 60, 50, 50, 50, 50, 61, 60, 60, 60, 60, 60, 70, 60, 60, 60, 71, 70, 70, 70, 70, 70, 70, 80, 70, 70, 81, 80, 80, 80, 80
Offset: 0

Views

Author

Bernard Schott, Oct 29 2022

Keywords

Comments

When n is pandigital with or without 0 (A050278, A050289, A171102), m does not exist, so a(n) = -1; see examples for smallest pandigital cases.

Examples

			a(10) = 22; a(11) = 20; a(12) = 30.
a(123456789) = -1; a(1234567890) = -1.
		

Crossrefs

Cf. A030283 (trajectory starting 0).
Cf. A358098 (similar, with largest integer m < n).

Programs

  • Mathematica
    a[n_] := Module[{d = Complement[Range[0, 9], IntegerDigits[n]], m = n + 1}, If[d == {} || d == {0}, -1, While[! AllTrue[IntegerDigits[m], MemberQ[d, #] &], m++]; m]]; Array[a, 100, 0] (* Amiram Eldar, Oct 29 2022 *)
  • PARI
    isfull(d) = my(dd=setminus([0..9], d)); (dd==[]) || (dd==[0]);
    a(n) = my(d=Set(digits(n))); if (isfull(d), -1, my(k=n+1); while (#setintersect(Set(digits(k)), d), k++); k); \\ Michel Marcus, Oct 29 2022
    
  • Python
    from itertools import count, product
    def a(n):
        s = str(n)
        r = sorted(set("1234567890") - set(s))
        if len(r) == 0 or r == ["0"]: return -1
        for d in count(len(s)):
            for p in product(r, repeat=d):
                m = int("".join(p))
                if m > n: return m
    print([a(n) for n in range(75)]) # Michael S. Branicky, Oct 29 2022

Formula

a(10^n-k) = 10^n when n >= 2 and 1 <= k <= 8.
a(10^n) = 2 * A002275(n+1), when n >= 1.

A358098 a(n) is the largest integer m < n such that m and n have no common digit, or -1 when such integer m does not exist.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 19, 9, 19, 19, 19, 19, 19, 19, 19, 18, 29, 29, 19, 29, 29, 29, 29, 29, 29, 28, 39, 39, 39, 29, 39, 39, 39, 39, 39, 38, 49, 49, 49, 49, 39, 49, 49, 49, 49, 48, 59, 59, 59, 59, 59, 49, 59, 59, 59, 58, 69, 69, 69, 69, 69, 69, 59, 69, 69, 68, 79
Offset: 1

Views

Author

Bernard Schott, Oct 29 2022

Keywords

Comments

Note that only when n is pandigital with 0 (A050278, A171102), such m does not exist and a(n) = -1; see examples for smallest pandigital cases.

Examples

			a(19) = 8, a(20) = 19; a(21) = 9.
a(123456789) = 0; a(1234567890) = -1.
		

Crossrefs

Cf. A358097 (similar, with smallest integer m > n).

Programs

  • Mathematica
    a[n_] := Module[{d = Complement[Range[0, 9], IntegerDigits[n]], m = n - 1}, If[d == {} || d == {0}, -1, While[m >= 0 && ! AllTrue[IntegerDigits[m], MemberQ[d, #] &], m--]; m]]; Array[a, 100] (* Amiram Eldar, Oct 29 2022 *)
  • PARI
    a(n) = my(d=Set(digits(n))); forstep (m=n-1, 0, -1, if (!#setintersect(d, Set(digits(m))), return(m))); return(-1); \\ Michel Marcus, Oct 30 2022
  • Python
    from itertools import product
    def a(n):
        s = str(n)
        r = sorted(set("1234567890") - set(s), reverse=True)
        if len(r) == 0: return -1
        if r == ["0"]: return 0
        for d in range(len(s), 0, -1):
            for p in product(r, repeat=d):
                m = int("".join(p))
                if m < n: return m
    print([a(n) for n in range(1, 81)]) # Michael S. Branicky, Oct 29 2022
    

Formula

a(10^n) = 10^n - 1 for n >= 0.
a(A050289(n))=0.

A113640 Zeroless pandigital strong pseudoprimes (base-2).

Original entry on oeis.org

6913548721, 11396574289, 13842496537, 14872531669, 16952474813, 16963825147, 16974152381, 18632427859, 27569184173, 28239546721, 47569352881, 54689213377, 54987116329, 68719214593, 79633524181, 93541462873, 95126134837, 118214685793, 121899457633, 123572846953
Offset: 1

Views

Author

Shyam Sunder Gupta, Jan 15 2006

Keywords

Examples

			a(1) = 6913548721 is a term because 6913548721 is a strong pseudoprime (base-2) and also contains all digits from 1 to 9 so it is also zeroless pandigital.
		

Crossrefs

Intersection of A050289 and A001262.

Extensions

More terms from Amiram Eldar, Nov 10 2019

A113641 Zeroless pandigital pseudoprimes (base-2).

Original entry on oeis.org

1267834459, 1957283461, 2449856317, 2452396871, 2459637181, 2523476981, 3815417629, 4176385921, 4357289761, 4682134579, 5748693121, 6913548721, 7531426981, 7693527841, 8129734561, 9146572381, 9752463781, 11396574289, 12679888453, 13842496537, 13946829751, 14872531669
Offset: 1

Views

Author

Shyam Sunder Gupta, Jan 15 2006

Keywords

Examples

			a(1) = 1267834459 is a term because 1267834459 is a pseudoprime (base-2) and also contain all digits from 1 to 9 so zeroless pandigital also.
		

Crossrefs

Intersection of A050289 and A001567.

Extensions

More terms from Amiram Eldar, Nov 10 2019

A113644 Zeroless pandigital Carmichael numbers.

Original entry on oeis.org

5748693121, 9146572381, 13946829751, 15989367241, 28239546721, 28637914561, 36976452481, 73487592361, 79623874561, 92437591681, 95287763341, 121254376891, 129855637441, 149378245633, 189634571281, 195376852441
Offset: 1

Views

Author

Shyam Sunder Gupta, Jan 15 2006

Keywords

Examples

			a(1) = 5748693121 is a term because 5748693121 is a Carmichael number and also contains all the digits from 1 to 9, so it is also a zeroless pandigital number.
		

Crossrefs

Intersection of A002997 and A050289.

A159568 Zeroless pandigital emirps.

Original entry on oeis.org

1123564987, 1123586479, 1123869547, 1124356789, 1124378659, 1124685973, 1124698537, 1124753689, 1124763589, 1124785639, 1124879563, 1124895367, 1124896753, 1124956837, 1124978563, 1125347689, 1125386749, 1125398467, 1125487963, 1125648379, 1125748693
Offset: 1

Views

Author

Lekraj Beedassy, Apr 15 2009

Keywords

Comments

There are 56104 10-digit terms. - Jud McCranie, Jul 01 2013

Crossrefs

Extensions

Corrected and more terms added by Jud McCranie, Jul 01 2013

A241528 Primes p such that p + 1234567890 is also prime where 1234567890 is the first pandigital number with digits in order.

Original entry on oeis.org

17, 23, 37, 59, 131, 139, 157, 199, 241, 311, 353, 359, 397, 433, 479, 547, 673, 691, 769, 877, 937, 947, 953, 1051, 1091, 1097, 1181, 1297, 1301, 1409, 1451, 1471, 1489, 1531, 1609, 1619, 1697, 1709, 1861, 1879, 1889, 1913, 1951, 2053, 2063, 2089, 2099, 2113
Offset: 1

Views

Author

K. D. Bajpai, Apr 25 2014

Keywords

Examples

			17 is prime and appears in the sequence because 17 + 1234567890 = 1234567907, which is also prime.
23 is prime and appears in the sequence because 23 + 1234567890 = 1234567913, which is also prime.
19 is prime but not included in the sequence since 19 + 1234567890 = 1234567909 = (59107)*(20887), which is not prime.
		

Crossrefs

Programs

  • Maple
    KD := proc() local a,k; k:=ithprime(n);a:=k+1234567890; if isprime(a) then RETURN (k); fi; end: seq(KD(), n=1..1000);
  • Mathematica
    lst={}; Do[p=Prime[n]; If[PrimeQ[p+1234567890], AppendTo[lst,p]],{n,1,1000}]; lst
    (* For the b-file *)  c=0; k=Prime[n]; a=k+1234567890; Do[If[PrimeQ[a], c++; Print[c," ",k]],{n,1,10^5}]
    Select[Prime[Range[400]],PrimeQ[#+1234567890]&] (* Harvey P. Dale, Nov 18 2021 *)
  • PARI
    s=[]; forprime(p=2, 3000, if(isprime(p+1234567890), s=concat(s, p))); s \\ Colin Barker, Apr 25 2014

A241537 Cubes c such that c + 1234567890 is prime where 1234567890 is the first pandigital number with digits in order.

Original entry on oeis.org

1, 50653, 79507, 456533, 571787, 1295029, 1685159, 1771561, 2248091, 2685619, 3307949, 4173281, 7880599, 9393931, 10218313, 10793861, 11697083, 17373979, 18191447, 22665187, 30664297, 47045881, 70444997, 111284641, 146363183, 151419437, 156590819, 192100033
Offset: 1

Views

Author

K. D. Bajpai, Apr 25 2014

Keywords

Examples

			50653 = 37^3 and appears in the sequence because 50653 + 1234567890 = 1234618543, which is prime.
79507 = 43^3  and appears in the sequence because 79507 + 1234567890 = 1234647397, which is prime.
64000 = 40^3 but not included in the sequence since 64000 + 1234567890 = 1234631890 = (2)*(5)*(29389)*(4201), which is not prime.
		

Crossrefs

Programs

  • Maple
    KD := proc() local a,c; c:=n^3;a:=c+1234567890; if isprime(a) then RETURN (c); fi; end: seq(KD(), n=1..1000);
  • Mathematica
    lst={}; Do[c=n^3; If[PrimeQ[c+1234567890], AppendTo[lst,c]], {n,1,1000}]; lst
    (*For the b-file*)  m=0; c=n^3; a=c+1234567890; Do[If[PrimeQ[a],m++; Print[m," ",c]], {n,1,4*10^5}]
  • PARI
    s=[]; for(n=1, 1000, c=n^3; if(isprime(c+1234567890), s=concat(s, c))); s \\ Colin Barker, Apr 25 2014

A241538 Squares s such that s + 1234567890 is prime.

Original entry on oeis.org

1, 169, 1681, 6889, 8281, 11881, 24649, 27889, 41209, 57121, 58081, 67081, 80089, 101761, 124609, 175561, 185761, 201601, 212521, 332929, 380689, 413449, 461041, 508369, 534361, 609961, 625681, 654481, 683929, 693889, 822649, 829921, 833569, 1014049, 1018081
Offset: 1

Views

Author

K. D. Bajpai, Apr 25 2014

Keywords

Comments

1234567890 is the first pandigital number with digits in order.

Examples

			169 = 13^2 and appears in the sequence because 169 + 1234567890 = 1234568059, which is prime.
1681 = 41^2  and appears in the sequence because 1681 + 1234567890 = 1234569571, which is prime.
625 = 25^2 but is not included in the sequence since 625 + 1234567890 = 1234568515 = (5)*(246913703), which is not prime.
		

Crossrefs

Programs

  • Maple
    KD := proc() local a,s; s:=n^2;a:=s+1234567890; if isprime(a) then RETURN (s); fi; end: seq(KD(), n=1..2000);
  • Mathematica
    A241538 = {}; Do[s = n^2; If[PrimeQ[s + 1234567890], AppendTo[A241538, s]], {n, 2000}]; A241538
    (* For the b-file *) c = 0; s = n^2; a = s + 1234567890; Do[If[PrimeQ[a], c++; Print[c, " ", s]], {n, 4*10^5}] (* Bajpai *)
    Select[Range[1000]^2, PrimeQ[# + 1234567890] &] (* Alonso del Arte, Apr 25 2014 *)

A323026 Zeroless pandigital numbers that are between two twin primes.

Original entry on oeis.org

123457968, 123459768, 123946578, 124397658, 124936578, 124953678, 125347698, 125437968, 125463798, 125674398, 126345978, 126495738, 126593478, 126597348, 126945738, 127394568, 127396458, 127453968, 127459638, 127659438, 129357648, 129635478, 129673548, 132564978, 132594768, 132769458
Offset: 1

Views

Author

Pierandrea Formusa, Jan 02 2019

Keywords

Comments

Intersection of A050289 and A014574.
The definition permits repeated digits. - N. J. A. Sloane, May 16 2023
a(n) mod 10 is either 2 or 8. First term with a(n) mod 10 = 2 is a(27) = 134756982. - Chai Wah Wu, Jan 27 2019
There are 2595 terms that are pandigital without repeating any digit. - Harvey P. Dale, Jan 25 2021

Crossrefs

Cf. A050289 (zeroless pandigital numbers), A014574 (average of twin primes).

Programs

  • PARI
    isok(n) = my(d=digits(n)); vecmin(d) && (#Set(d)==9) && isprime(n-1) && isprime(n+1);
    for (n=123456789, 133000000, if (isok(n), print1(n, ", "))) \\ Michel Marcus, Jan 04 2019
    
  • Python
    import itertools
    from sympy import isprime
    nmax=pow(10,10)
    r=""
    li=[]
    def is_pandigit_easy(n):
        l=[]
        s=str(n)
        if '0' in s: return(False)
        for ch in s:
            if ch not in l: l.append(ch)
        l=list(set(l))
        if len(l)==9:
            return(True)
        else:
            return(False)
    t=0
    tmax=50
    for i in range(123456789,nmax):
        if is_pandigit_easy(i):
            if isprime(i-1) and isprime(i+1):
                li.append(i)
                t+=1
                if t>tmax: break
    first_elem=26
    for k in li[:first_elem]:
          r=r+","+str(k)
    print(r[1:])
    
  • Python
    from itertools import permutations
    from sympy import isprime
    A323026_list = [n for n in (int(''.join(s)) for s in permutations('123456789')) if isprime(n-1) and isprime(n+1)] # Chai Wah Wu, Jan 27 2019
Previous Showing 31-40 of 47 results. Next