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 22 results. Next

A318725 a(n) is the smallest number k such that k! is pandigital in base n.

Original entry on oeis.org

2, 8, 5, 11, 17, 14, 15, 23, 23, 24, 36, 30, 35, 46, 50, 43, 50, 40, 59, 62, 54, 69, 75, 70, 65, 79, 83, 68, 97, 99, 86, 89, 93, 97, 118, 94, 106, 126, 128, 116, 145, 127, 134, 151, 143, 124, 141, 124, 141, 170, 194, 169, 190, 183, 181, 180, 195, 195, 210, 163
Offset: 2

Views

Author

Jon E. Schoenfield, Sep 02 2018

Keywords

Examples

			a(2) = 2! = 2_10 = 10_2;
a(3) = 8! = 40320_10 = 2001022100_3;
a(4) = 5! = 120_10 = 1320_4.
a(5) = 11! = 39916800_10 = 4020431420_5;
a(6) = 17! = 355687428096000_10 = 3300252314304000000_6.
		

Crossrefs

Cf. A049363 (smallest pandigital number in base n), A185122 (smallest pandigital prime in base n), A260182 (smallest square that is pandigital in base n), A260117 (smallest triangular number that is pandigital in base n).

Programs

  • PARI
    a(n) = {my(k=1); while (#Set(digits(k!, n)) != n, k++); k;} \\ Michel Marcus, Sep 02 2018
    
  • Python
    from itertools import count
    from sympy.ntheory import digits
    def A318725(n):
        c, flag = 1, False
        for k in count(1):
            m = k
            if flag:
                a, b = divmod(m,n)
                while not b:
                    m = a
                    a, b = divmod(m,n)
            c *= m
            if len(set(digits(c,n)[1:]))==n:
                return k
            if not (flag or c%n):
                flag = True # Chai Wah Wu, Mar 13 2024

A318779 Smallest n-th power that is pandigital in base n.

Original entry on oeis.org

4, 64, 625, 248832, 11390625, 170859375, 1406408618241, 3299763591802133, 3656158440062976, 550329031716248441, 766217865410400390625, 15791096563156692195651, 6193386212891813387462761, 243008175525757569678159896851, 3433683820292512484657849089281
Offset: 2

Views

Author

Jon E. Schoenfield, Sep 03 2018

Keywords

Comments

For the corresponding n-th roots a(n)^(1/n), see A318780.

Examples

			a(2)=4 because 1^2 = 1 = 1_2 (not pandigital in base 2, since it contains no 0 digit), but 2^2 = 4 = 100_2.
a(3)=64 because 1^3 = 1 = 1_3, 2^3 = 8 = 22_3, and 3^3 = 27 = 1000_3 are all nonpandigital in base 3, but 4^3 = 64 = 2101_3.
a(16) = 81^16 = 3433683820292512484657849089281 = 2b56d4af8f7932278c797ebd01_16.
		

Crossrefs

Cf. A049363 (smallest pandigital number in base n), A185122 (smallest pandigital prime in base n), A260182 (smallest square that is pandigital in base n), A260117 (smallest triangular number that is pandigital in base n), A318725 (smallest k such that k! is pandigital in base n), A318780 (smallest k such that k^n is pandigital in base n).

Programs

  • Python
    from itertools import count
    from sympy import integer_nthroot
    from sympy.ntheory import digits
    def A318779(n): return next(k for k in (k**n for k in count(integer_nthroot((n**n-n)//(n-1)**2+n**(n-2)*(n-1)-1,n)[0])) if len(set(digits(k,n)[1:]))==n) # Chai Wah Wu, Mar 13 2024

Formula

a(n) = A318780(n)^n.

A318780 a(n) is the smallest positive integer k such that k^n is pandigital in base n.

Original entry on oeis.org

2, 4, 5, 12, 15, 15, 33, 53, 36, 41, 55, 51, 59, 91, 81, 60, 131, 167, 173, 312, 213, 394, 309, 222, 356, 868, 351, 704, 526, 1190, 1314, 847, 1435, 1148, 1755, 1499, 1797, 1455, 2311, 1863, 1838, 2120, 2859, 3219, 3463, 2833, 1723, 3009, 3497, 5886, 3746
Offset: 2

Views

Author

Jon E. Schoenfield, Sep 03 2018

Keywords

Comments

For the corresponding values of k^n, see A318779.

Examples

			a(2)=2 because 1^2 = 1 = 1_2 (not pandigital in base 2, since it contains no 0 digit), but 2^2 = 4 = 100_2.
a(3)=4 because 1^3 = 1 = 1_3, 2^3 = 8 = 22_3, and 3^3 = 27 = 1000_3 are all nonpandigital in base 3, but 4^3 = 64 = 2101_3.
a(16)=81: 81^16 = 3433683820292512484657849089281 = 2b56d4af8f7932278c797ebd01_16.
		

Crossrefs

Cf. A049363 (smallest pandigital number in base n), A185122 (smallest pandigital prime in base n), A260182 (smallest square that is pandigital in base n), A260117 (smallest triangular number that is pandigital in base n), A318725 (smallest k such that k! is pandigital in base n), A318779 (smallest n-th power that is pandigital in base n).

Programs

  • Python
    from itertools import count
    from sympy import integer_nthroot
    from sympy.ntheory import digits
    def A318780(n): return next(k for k in count(integer_nthroot((n**n-n)//(n-1)**2+n**(n-2)*(n-1)-1,n)[0]) if len(set(digits(k**n,n)[1:]))==n) # Chai Wah Wu, Mar 13 2024

Formula

a(n) = A318779(n)^(1/n).

A350510 Square array read by descending antidiagonals: A(n,k) is the least number m such that the base-n expansion of m contains the base-n expansions of 1..k as substrings.

Original entry on oeis.org

1, 2, 1, 6, 5, 1, 12, 11, 6, 1, 44, 38, 27, 7, 1, 44, 95, 75, 38, 8, 1, 92, 285, 331, 194, 51, 9, 1, 184, 933, 1115, 694, 310, 66, 10, 1, 1208, 2805, 4455, 3819, 1865, 466, 83, 11, 1, 1256, 7179, 17799, 16444, 8345, 3267, 668, 102, 12, 1
Offset: 2

Views

Author

Davis Smith, Jan 02 2022

Keywords

Examples

			Square array begins:
n/k|| 1 |  2 |   3 |    4 |     5 |      6 |       7 |        8 |
================================================================|
2  || 1 |  2 |   6 |   12 |    44 |     44 |      92 |      184 |
3  || 1 |  5 |  11 |   38 |    95 |    285 |     933 |     2805 |
4  || 1 |  6 |  27 |   75 |   331 |   1115 |    4455 |    17799 |
5  || 1 |  7 |  38 |  194 |   694 |   3819 |   16444 |    82169 |
6  || 1 |  8 |  51 |  310 |  1865 |   8345 |   55001 |   289577 |
7  || 1 |  9 |  66 |  466 |  3267 |  22875 |  123717 |   947260 |
8  || 1 | 10 |  83 |  668 |  5349 |  42798 |  342391 |  2177399 |
9  || 1 | 11 | 102 |  922 |  8303 |  74733 |  672604 |  6053444 |
10 || 1 | 12 | 123 | 1234 | 12345 | 123456 | 1234567 | 12345678 |
11 || 1 | 13 | 146 | 1610 | 17715 | 194871 | 2143588 | 23579476 |
		

Crossrefs

The first n - 1 terms of rows: 2: A047778, 3: A048435, 4: A048436, 5: A048437, 6: A048438, 7: A048439, 8: A048440, 9: A048441, 10: A007908, 11: A048442, 12: A048443, 13: A048444, 14: A048445, 15: A048446, 16: A048447.

Programs

  • Mathematica
    T[n_,k_]:=(m=0;While[!ContainsAll[Subsequences@IntegerDigits[++m,n],IntegerDigits[Range@k,n]]];m);Flatten@Table[T[1+i,j+1-i],{j,9},{i,j}] (* Giorgos Kalogeropoulos, Jan 09 2022 *)
  • PARI
    A350510_rows(n,k,N=0)= my(L=List(concat(apply(z->fromdigits([1..z],n),[1..n-1]),if(n>2,fromdigits(concat([1,0],[2..n-1]),n),[]))),T1(x)=digits(x,n),T2(x)=fromdigits(x,n),A(x)=my(S=T1(x));setbinop((y,z)->T2(S[y..z]),[1..#S]),N=if(N,N,L[#L]),A1=A(N));while(#Lsetsearch(A1,z),[1..#L+1])),A1=A(N++));listput(L,N));Vec(L)

Formula

For k < n, A(n,k) = A(n,k - 1)*n + k = Sum_{i=1..k} i*(n^(k - i)).
A(n,n) = A049363(n).
A(n,2) = A057544(n).
For n > 3, A(n,3) = A102305(n).
A(n,n - 1) = A023811(n).

A123668 Smallest pandigital palindrome in base n, with a(1) = 1.

Original entry on oeis.org

1, 5, 100, 4833, 434176, 64896625, 14555276100, 4566338422401, 1907710008707584, 1023456789876543201, 685593403921020830500, 560806213771094855054689, 550049712286417194431060352
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Join[{1, 5}, Table[1 + n^(2 n - 2) + (n - 1) n^(n - 1) + Sum[ i*(n^(2 n - 2 - i) + n^i), {i, 2, n - 2}], {n, 3, 50}]] (* G. C. Greubel, Oct 26 2017 *)
  • PARI
    for(n=1,50, print1(if(n==1,1, if(n==2,5, 1 + n^(2*n - 2) + (n - 1)* n^(n - 1) + sum(i=2,n-2, i*(n^(2*n - 2 - i) + n^i)))), ", ")) \\ G. C. Greubel, Oct 26 2017
    
  • Python
    def A123668(n): return n*((n**(n-1)-1)//(n-1))**2 + (n-1)*(n**(2*n-3)-1) if n>2 else 4*n-3 # Chai Wah Wu, Mar 18 2024

Formula

For n>2, a(n) = n*A068792(n) + (n-1)(n^(2n-3) - 1).
For n>2, a(n) = 1 + n^(2n-2) + (n-1)n^(n-1) + Sum_{i=2..(n-2)} i*(n^(2n-2-i)+n^i).

A145101 Integers in which no digit occurs more than once more often than any other digit and not all repeated digits are identical, for all bases up to ten.

Original entry on oeis.org

1, 2, 17, 19, 25, 38, 52, 56, 75, 76, 82, 90, 92, 98, 100, 102, 104, 105, 108, 116, 141, 142, 150, 153, 177, 178, 180, 184, 195, 198, 204, 210, 212, 225, 226, 232, 294, 308, 316, 332, 395, 396, 410, 412, 420, 434, 450, 460, 481, 542, 572, 611, 689, 752, 818
Offset: 1

Views

Author

Reikku Kulon, Oct 01 2008

Keywords

Comments

Subset of A145100. The first number not in both sequences is 83.

Examples

			97 is in A145100 but not in this sequence: in base 3 it is 10121 and 1 occurs two times more often than either 0 or 2.
98 is in this sequence: in bases [2, 10] it is 1100010, 10122, 1202, 343, 242, 200, 142, 118, 98.
		

Crossrefs

A145104 Digitally fair numbers: integers n such that in all bases b = 2..10 no digit occurs more often than ceiling(d/b) times, where d is the number of digits of n in base b.

Original entry on oeis.org

1, 2, 19, 198, 25410896, 31596420, 10601629982, 10753657942, 11264883970, 11543640378, 11553029646, 11665278790, 12034384190, 12038440382, 12366849814, 12519032774, 12781964290, 12971872086, 13156400486
Offset: 1

Views

Author

Reikku Kulon, Oct 01 2008

Keywords

Comments

Presumed infinite. Next term >= 3^20.

Crossrefs

Extensions

More terms from Hagen von Eitzen, Jun 20 2009

A217535 Least number having in its decimal representation each digit n times.

Original entry on oeis.org

1023456789, 10012233445566778899, 100011222333444555666777888999, 1000011122223333444455556666777788889999, 10000011112222233333444445555566666777778888899999, 100000011111222222333333444444555555666666777777888888999999
Offset: 1

Views

Author

M. F. Hasler, Oct 05 2012

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> parse(cat(1,0$n,1$(n-1),seq(i$n, i=2..9))):
    seq(a(n), n=1..10);  # Alois P. Heinz, Jun 25 2017
  • PARI
    A217535(n)=sum(d=1,9,10^(n-(d==1))\9*d*10^(n*(9-d)))+10^(10*n-1)

Formula

a(n) ~ 10^(10n-1). See PARI code for an exact formula.

A235708 Largest base in which n is pandigital.

Original entry on oeis.org

1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 2, 2, 2, 3, 2, 1, 3, 3, 3, 3, 2, 2, 3, 2, 2, 2, 3, 2, 2, 3, 3, 3, 3, 2, 2, 3, 2, 2, 2, 3, 2, 3, 3, 3, 2, 3, 2, 3, 3, 3, 3, 2, 2, 3, 2, 2, 2, 3, 2, 4, 2, 2, 4, 2, 2
Offset: 1

Views

Author

Joonas Pohjonen, May 02 2014

Keywords

Comments

The first occurrence of k in this sequence is given by A049363(k).

Crossrefs

Cf. A049363.

Programs

  • Haskell
    import Data.List (unfoldr, nub); import Data.Tuple (swap)
    a235708 n = f n where
       f 1 = 1
       f b = if isPandigital b n then b else f (b - 1) where
             isPandigital b = (== b) . length . nub . unfoldr
               (\x -> if x == 0 then Nothing else Just $ swap $ divMod x b)
    -- Reinhard Zumkeller, May 12 2014

A239437 Least number that is pandigital in some base >= n but not pandigital in bases 3 through n-1.

Original entry on oeis.org

11, 78, 698, 12280, 179685, 5518135, 1037845296, 1037845296, 46935813565, 2860727439460, 285947759601954, 1018897102759406, 672654273047783383
Offset: 3

Views

Author

Keywords

Comments

Gives an upper bound on the testing needed to check membership in A239348.

Crossrefs

Subsequence of A154314. Cf. A239348.

Programs

  • PARI
    See Greathouse link.
    
  • Python
    from itertools import permutations
    from gmpy2 import digits
    def A239437(n): # requires 3 <= n <= 62
        m = n
        while True:
            s = ''.join([digits(i,m) for i in range(m)])
            for d in permutations(s,m):
                if d[0] != '0':
                    c = mpz(''.join(d),m)
                    for b in range(3,n):
                        if len(set(digits(c,b))) == b:
                            break
                    else:
                        return int(c)
            m += 1 # Chai Wah Wu, May 31 2015

Formula

Trivially a(n) >= A049363(n) > n^(n-1).

Extensions

a(15) from Giovanni Resta, Mar 19 2014
Previous Showing 11-20 of 22 results. Next