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 10 results.

A372309 The smallest number whose prime factor concatenation, when written in base n, contains all digits 0,1,...,(n-1).

Original entry on oeis.org

2, 6, 38, 174, 2866, 11670, 135570, 1335534, 15618090, 155077890, 5148702870, 31771759110, 774841780230, 11924858870610, 253941409789410, 3867805835651310
Offset: 2

Views

Author

Scott R. Shannon, Apr 26 2024

Keywords

Comments

Up to a(12) all terms have prime factors whose concatenation length in base n is n, the minimum possible value. Is this true for all a(n)?
a(13) <= 31771759110 = 2*3*5*7*13*61*190787 whose prime factors in base 13 are: 2, 3, 5, 7, 10, 49, 68abc. Sequence is a subsequence of A058760. - Chai Wah Wu, Apr 28 2024
From Chai Wah Wu, Apr 29 2024: (Start)
a(14) <= 1138370792790 = 2*3*5*7*11*877*561917 whose prime factors in base 14 are: 2, 3, 5, 7, b, 469, 108acd.
a(15) <= 23608327052310 = 2*3*5*7*11*13*233*3374069 whose prime factors in base 15 are: 2, 3, 5, 7, b, d, 108, 469ace. (End)
a(14) <= 774841780230, a(15) <= 11924858870610, a(16) <= 256023548755170, a(17) <= 4286558044897590. - Daniel Suteu, Apr 30 2024
For n <= 36, all terms have prime factors whose concatenation length in base n is n, the minimum possible value. - Dominic McCarty, Jan 07 2025

Examples

			The factorizations to a(12) are:
a(2) = 2 = 10_2, which contains all digits 0..1.
a(3) = 6 = 2 * 3 = 2_3 * 10_3, which contain all digits 0..2.
a(4) = 38 = 2 * 19 = 2_4 * 103_4, which contain all digits 0..3.
a(5) = 174 = 2 * 3 * 29 = 2_5 * 3_5 * 104_5, which contain all digits 0..4.
a(6) = 2866 = 2 * 1433 = 2_6 * 10345_6, which contain all digits 0..5.
a(7) = 11670 = 2 * 3 * 5 * 389 = 2_7 * 3_7 * 5_7 * 1064_7, which contain all digits 0..6.
a(8) = 135570 = 2 * 3 * 5 * 4519 = 2_8 * 3_8 * 5_8 * 10647_8, which contain all digits 0..7.
a(9) = 1335534 = 2 * 3 * 41 * 61 * 89 = 2_9 * 3_9 * 45_9 * 67_9 * 108_9, which contain all digits 0..8.
a(10) = 15618090 = 2 * 3 * 5 * 487 * 1069, which contain all digits 0..9. See A058909.
a(11) = 155077890 = 2 * 3 * 5 * 11 * 571 * 823 = 2_11 * 3_11 * 5_11 * 10_11 * 47a_11 * 689_11, which contain all digits 0..a.
a(12) = 5148702870 = 2 * 3 * 5 * 151 * 1136579 = 2_12 * 3_12 * 5_12 * 107_12 * 4698ab_12, which contain all digits 0..b.
		

Crossrefs

Programs

  • Python
    from math import factorial
    from itertools import count
    from sympy import factorint
    from sympy.ntheory import digits
    def a(n):
        for k in count(factorial(n)):
            s = set()
            for p in factorint(k): s.update(digits(p, n)[1:])
            if len(s) == n: return k
    print([a(n) for n in range(2, 10)]) # Michael S. Branicky, Apr 28 2024

Formula

a(n) >= n!. - Michael S. Branicky, Apr 28 2024
a(n) <= A185122(n). - Michael S. Branicky, Apr 28 2024

Extensions

a(13)-a(16) from Martin Ehrenstein, May 03 2024
a(17) from Dominic McCarty, Jan 07 2025

A185233 A185129(n) is the a(n)-th triangular number.

Original entry on oeis.org

5, 14, 27, 39, 65, 54, 104, 125, 242, 209, 374, 459, 350, 275, 714, 782, 350, 1155, 1224, 1022, 1425, 840, 594, 1715, 1700, 1869, 702, 1260, 1224, 1014, 2645, 2430, 3185, 1127, 4094, 3317, 1274, 5124, 6060, 3834, 3059, 6174, 5565, 7749, 8349, 7395, 7344
Offset: 1

Views

Author

Martin Renner, Jan 20 2012

Keywords

Comments

See A185128 for further information.

Examples

			A185122(2) = 105 which is the 14th triangular number, so a(2) = 14.
		

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966, p. 197, no. 8.

Crossrefs

Programs

  • PARI
    lista(nn) = {v = vector(nn, n, n*(n+1)/2); for (n=2, nn, for (k=1, n-1, if (ispolygonal(v[n]+v[k], 3) && ispolygonal(v[n]-v[k], 3), print1(k, ", "));););} \\ Michel Marcus, Jan 08 2015

Extensions

Edited (with a simpller definition) by N. J. A. Sloane, Dec 28 2024

A371194 a(n) = smallest penholodigital prime in base n.

Original entry on oeis.org

3, 5, 103, 823, 10061, 157427, 2439991, 49100173, 1123465789, 31148488997, 816695154683, 25401384476191, 859466293047623, 33373273595699879, 1234907033823334111, 51892599148660469993, 2322058300483667372689, 115713970660820468376569, 5533344265927977839343539
Offset: 2

Views

Author

Chai Wah Wu, Mar 14 2024

Keywords

Comments

a(n) is the smallest prime whose base-n representation is zeroless and contains all nonzero digits (i.e., 1,...,n-1) at least once.

Examples

			The corresponding base-n representations are:
n  a(n) in base n
------------------------
2  11
3  12
4  1213
5  11243
6  114325
7  1223654
8  11235467
9  112345687
10 1123465789
11 1223456789a
12 11234567a98b
13 112345678abc9
14 112345678cadb9
15 1223456789adcbe
16 1123456789abcedf
17 1123456789abdgfec
18 1123456789abcehfgd
19 1223456789abcdefghi
20 1123456789abcdefhigj
21 1123456789abcdefgihjk
22 1123456789abcdefgjhikl
23 1223456789abcdefghjimlk
24 1123456789abcdefghkmijln
25 1123456789abcdefghijklnom
26 1123456789abcdefghijkmnpol
27 1223456789abcdefghijklmqnop
28 1123456789abcdefghijklmnqorp
29 1123456789abcdefghijklmnrqspo
30 1123456789abcdefghijklmnosqprt
31 1223456789abcdefghijklmnoptusrq
32 1123456789abcdefghijklmnopqrvust
33 1123456789abcdefghijklmnopqsrtuvw
34 1123456789abcdefghijklmnopqrstuxwv
35 1223456789abcdefghijklmnopqrstuxwvy
36 1123456789abcdefghijklmnopqrstuwzyxv
		

Crossrefs

Programs

  • Python
    from math import gcd
    from sympy import nextprime
    from sympy.ntheory import digits
    def A371194(n):
        m, j = 1, 0
        if n > 3:
            for j in range(1,n):
                if gcd((n*(n-1)>>1)+j,n-1) == 1:
                     break
        if j == 0:
            for i in range(2,n):
                m = n*m+i
        elif j == 1:
            for i in range(1,n):
                m = n*m+i
        else:
            for i in range(2,1+j):
                m = n*m+i
            for i in range(j,n):
                m = n*m+i
        m -= 1
        while True:
            s = digits(m:=nextprime(m),n)[1:]
            if 0 not in s and len(set(s))==n-1:
                return m

Formula

a(n) >= A023811(n).

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).

A370612 The smallest number whose prime factor concatenation, when written in base n, does not contain 0 and contains all digits 1,...,(n-1) at least once.

Original entry on oeis.org

3, 5, 14, 133, 706, 2490, 24258, 217230, 2992890, 24674730, 647850030, 4208072190, 82417704810
Offset: 2

Views

Author

Chai Wah Wu, Apr 30 2024

Keywords

Comments

All terms are squarefree. Many thanks to Michael Branicky for pointing out errors in the terms in the original submission.

Examples

			a(2) = 3 = 3 whose prime factor in base 2 is: 11.
a(3) = 5 = 5 whose prime factor in base 3 is: 12.
a(4) = 14 = 2*7 whose prime factors in base 4 are: 2, 13.
a(5) = 133 = 7*19 whose prime factors in base 5 are: 12, 34.
a(6) = 706 = 2*353 whose prime factors in base 6 are: 2, 1345.
a(7) = 2490 = 2*3*5*83 whose prime factors in base 7 are: 2, 3, 5, 146.
a(8) = 24258 = 2*3*13*311 whose prime factors in base 8 are: 2, 3, 15, 467.
a(9) = 217230 = 2*3*5*13*557 whose prime factors in base 9 are: 2, 3, 5, 14, 678.
a(10) = 2992890 = 2*3*5*67*1489.
a(11) = 24674730 = 2*3*5*19*73*593 whose prime factors in base 11 are: 2, 3, 5, 18, 67, 49a.
a(12) = 647850030 = 2*3*5*19*1136579 whose prime factors in base 12 are: 2, 3, 5, 17, 4698ab.
a(13) = 4208072190 = 2*3*5*7*61*89*3691 whose prime factors in base 13 are: 2, 3, 5, 7, 49, 6b, 18ac.
a(14) = 82417704810 = 2*3*5*7*23*937*18211 whose prime factors in base 14 are: 2, 3, 5, 7, 19, 4ad, 68cb.
		

Crossrefs

Programs

  • Python
    from math import factorial
    from itertools import count
    from sympy import primefactors
    from sympy.ntheory import digits
    def A370612(n): return next(k for k in count(max(factorial(n-1),2)) if 0 not in (s:=set.union(*(set(digits(p,n)[1:]) for p in primefactors(k)))) and len(s) == n-1)

Formula

(n-1)! <= a(n) <= A371194(n).

Extensions

a(13)-(14) from Dominic McCarty, Jan 07 2025

A371511 a(n) is the smallest prime such that its representation in base n contains each of the digits 0,1,...,n-2 at least once and does not contain the digit n-1.

Original entry on oeis.org

3, 73, 683, 8521, 123323, 2140069, 43720693, 1012356487, 26411157737, 749149003087, 23459877380431, 798411310382011, 29471615863458281, 1158045600182881261, 48851274656431280857, 2193475267557861578041, 104737172422274885174411, 5257403213296398892278377
Offset: 3

Views

Author

Chai Wah Wu, Apr 10 2024

Keywords

Comments

Conjecture: for n>3, a(n) has digit sum 2+(n-2)(n-1)/2 if n is of the form 4k+3 and has digit sum 1+(n-2)(n-1)/2 otherwise.

Examples

			The corresponding base-n representations are:
n   a(n) in base n
------------------------
3   10
4   1021
5   10213
6   103241
7   1022354
8   10123645
9   101236457
10  1012356487
11  10223456798
12  10123459a867
13  1012345678a9b
14  1012345678c9ab
15  1022345678a9cdb
16  10123456789acbed
		

Crossrefs

Programs

  • Python
    from math import gcd
    from sympy import nextprime
    from sympy.ntheory import digits
    def A371511(n):
        m, j = n, 0
        if n > 3:
            for j in range(1,n-1):
                if gcd((n*(n-1)>>1)+j,n-1) == 1:
                     break
        if j == 0:
            for i in range(2,n-1):
                m = n*m+i
        elif j == 1:
            for i in range(1,n-1):
                m = n*m+i
        else:
            for i in range(2,1+j):
                m = n*m+i
            for i in range(j,n-1):
                m = n*m+i
        m -= 1
        while True:
            s = digits(m:=nextprime(m), n)[1:]
            if n-1 not in s and len(set(s))==n-1:
                return m

Formula

For n>3, a(n) >= (n^(n-1)-n)/(n-1)^2 + n^(n-1). If n = 4k+3 for k>0, then a(n) >= (n^(n-1)-n)/(n-1)^2 + n^(n-1) + n^(n-3) .

A371512 a(n) is the smallest prime such that its representation in base n contains each of the digits 1,...,n-2 at least once and does not contain the digit 0 nor the digit n-1.

Original entry on oeis.org

13, 37, 163, 1861, 22481, 304949, 5455573, 112345687, 2831681057, 68057976031, 1953952652167, 61390449569437, 2224884906436873, 77181689614101181, 3052505832274232281, 129003238915759600789, 6090208982148446231753, 276667213296398892309917, 13944042713948404997174231
Offset: 3

Views

Author

Chai Wah Wu, Apr 10 2024

Keywords

Comments

Conjecture: for n>3, a(n) has digit sum 2+(n-2)(n-1)/2 if n is of the form 4k+3 and has digit sum 1+(n-2)(n-1)/2 otherwise.

Examples

			The corresponding base-n representations are:
n   a(n) in base n
------------------------
3   111
4   211
5   1123
6   12341
7   122354
8   1123465
9   11234567
10  112345687
11  1223456987
12  1123458a967
13  112345678ba9
14  11234567a8bc9
15  122345678acb9d
16  1123456789ceabd
		

Crossrefs

Programs

  • Python
    from math import gcd
    from sympy import nextprime
    from sympy.ntheory import digits
    def A371512(n):
        m, j = 1, 0
        if n > 3:
            for j in range(1,n-1):
                if gcd((n*(n-1)>>1)+j,n-1) == 1:
                     break
        if j == 0:
            for i in range(2,n-1):
                m = n*m+i
        elif j == 1:
            for i in range(1,n-1):
                m = n*m+i
        else:
            for i in range(2,1+j):
                m = n*m+i
            for i in range(j,n-1):
                m = n*m+i
        m -= 1
        while True:
            s = digits(m:=nextprime(m), n)[1:]
            if (not (0 in s or n-1 in s)) and len(set(s))==n-2:
                return m

Formula

For n>=3, a(n) >= (n^(n-1)-n)/(n-1)^2 + n^(n-2). If n = 4k+3 for k>0, then a(n) >= (n^(n-1)-n)/(n-1)^2 + n^(n-2) + n^(n-3) .

A332265 a(n) is the number of prime numbers created when concatenating all the arrangements of the decimal integers from 0 to 3*n+4.

Original entry on oeis.org

20, 3202, 2056675, 3500185228
Offset: 0

Views

Author

Scott R. Shannon, May 04 2020

Keywords

Comments

Only 4 and every third integer after 4 can create primes when concatenating the integer arrangements of 0,...,3*n+4 as the other integer values will create numbers with digit sums divisible by 3, and hence are divisible by 3. The digit 0 is allowed to be the first digit in the number but is then ignored when determining if the remaining digits form a prime.

Examples

			a(0) = 20 as there are twenty primes created when concatenating the integer arrangements of 0,1,2,3,4. They are 1423, 2143, 2341, 4231, 10243, 12043, 20143, 20341, 20431, 23041, 24103, 30241, 32401, 40123, 40213, 40231, 41023, 41203, 42013, 43201.
a(1) = 3202. The smallest prime created using integers 0..7 is 1234657 while the largest is 76540231.
a(2) = 2056675. The smallest prime created using integers 0..10 is 10123457689 while the largest is 987654310021.
		

Crossrefs

Programs

  • Mathematica
    Table[Count[FromDigits /@  Flatten /@ IntegerDigits /@ Permutations[Range[0, 3 n + 4]], ?PrimeQ], {n, 0, 2}] (* _Robert Price, Sep 16 2020 *)
    (* OR, if the above runs low on memory to store all the Permutations at once... *)
    Table[p0 = Range[0, 3n+4]; p = NextPermutation[p0]; c = 0;
     While[p != p0,
      If[PrimeQ[FromDigits[Flatten[IntegerDigits /@ p]]], c++];
    p = NextPermutation[p]]; c, {n, 0, 2}] (* Robert Price, Sep 16 2020 *)

Extensions

a(3) from Giovanni Resta, May 04 2020
Showing 1-10 of 10 results.