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

A175276 Base-4 pandigital primes: primes having at least one of each digit 0,1,2,3, when written in base 4.

Original entry on oeis.org

283, 313, 331, 397, 419, 433, 457, 541, 557, 569, 587, 647, 653, 659, 709, 809, 929, 1051, 1063, 1069, 1123, 1163, 1171, 1181, 1187, 1201, 1213, 1249, 1259, 1291, 1307, 1319, 1327, 1423, 1427, 1459, 1481, 1483, 1543, 1549, 1559, 1567, 1571, 1579, 1583
Offset: 1

Views

Author

M. F. Hasler, May 27 2010

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[300]],Min[DigitCount[#,4]]>0&] (* Harvey P. Dale, Apr 15 2012 *)
  • PARI
    base(n,b=4,s=0)={local(a=[n%b]);while(09,s,48)+a[i])),a)}
    forprime(p=1,1999,#Set(base(p,4))==4 & print1(p","))

A175277 Base-5 pandigital primes: primes having at least one of each digit 0,1,2,3,4, when written in base 5.

Original entry on oeis.org

3319, 3323, 3347, 3469, 3491, 3539, 3547, 3559, 3571, 3607, 3613, 3617, 3691, 3823, 3847, 3863, 4019, 4079, 4139, 4327, 4423, 4483, 4493, 4519, 4523, 4603, 4759, 4903, 4951, 5039, 5059, 5107, 5113, 5147, 5179, 5227, 5273, 5279, 5351, 5477, 5507, 5527
Offset: 1

Views

Author

M. F. Hasler, May 27 2010

Keywords

Comments

Terms in this sequence have at least 6 digits in base 5, i.e., are larger than 5^5, since sum(d_i 5^i) = sum(d_i) (mod 4), and 0+1+2+3+4 is divisible by 2. So the smallest ones should be of the form "10...." in base 5, where "...." is a permutation of "1234". By chance the identical permutation already yields a prime, i.e. a(1) = "101234" in base 5.

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[800]],Min[DigitCount[#,5]]>0&] (* Harvey P. Dale, Mar 10 2019 *)
  • PARI
    base(n,b=5,s=0)={local(a=[n%b]);while(09,s,48)+a[i])),a)}
    forprime(p=5^5,5^6,#Set(base(p,5))==5 & print1(p","))

A175278 Base-6 pandigital primes: primes having at least one of each digit 0,1,2,3,4,5 when written in base 6.

Original entry on oeis.org

48761, 50033, 50051, 50069, 50101, 50207, 50231, 50311, 50461, 51131, 51137, 51151, 51461, 51503, 51511, 51721, 52181, 52391, 52541, 52571, 52583, 53731, 53881, 54091, 54121, 55001, 57191, 58481, 58901, 60161, 62591, 62921, 63029
Offset: 1

Views

Author

M. F. Hasler, May 30 2010

Keywords

Comments

Terms in this sequence have at least 7 digits in base 6, i.e., are larger than 6^6, since sum(d_i 6^i) = sum(d_i) (mod 5), and 0+1+2+3+4+5 is divisible by 5. So the smallest ones should be of the form "101...." in base 6, where "...." is a permutation of "2345". Actually there is only one such prime, cf. examples.

Examples

			The smallest base-6 pandigital prime is written "1013425" in base 6.
The next smallest such prime is "1023345"[6]; note that here the "3" is repeated, since there is no such prime of the form "102wxyz" with w=0, 1 or 2. (Using the same reasoning as in the comment, it follows that the (7-digit base-6 pandigital) number has the same parity as the repeated digit, which therefore must be odd to get a prime.)
		

Crossrefs

Programs

  • Mathematica
    Select[Range[60000], Min @ DigitCount[#, 6] > 0 && PrimeQ[#] &] (* Amiram Eldar, Apr 13 2021 *)
  • PARI
    base(n,b=6)={ local(a=[n%b]);while(0
    				

Extensions

Edited by Charles R Greathouse IV, Aug 02 2010

A171744 a(n) is the smallest exponent such that prime(n)^k is pandigital in base 10.

Original entry on oeis.org

68, 39, 19, 18, 23, 22, 14, 17, 14, 12, 11, 13, 11, 13, 12, 13, 11, 14, 10, 15, 14, 13, 9, 11, 13, 9, 15, 14, 13, 12, 11, 15, 10, 7, 12, 9, 12, 10, 11, 8, 11, 8, 12, 11, 13, 13, 10, 12, 10, 8, 11, 12, 9, 7, 6, 7, 8, 12, 8, 8, 7, 7, 10, 9, 9, 6, 9, 10, 9, 10
Offset: 1

Views

Author

Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Dec 17 2009

Keywords

Comments

A pandigital number is an integer that in a given base has among its significant digits each digit used in the base at least once.

Examples

			2^68 = 295147905179352825856 (21 digits), 3^39 = 4052555153018976267 (19)
5^19 = 19073486328125 (14), 7^18 = 1628413597910449 (16), 11^23 = 895430243255237372246531 (24)
13^22 = 3211838877954855105157369 (25), 17^14 = 168377826559400929 (18)
19^17 = 5480386857784802185939 (22), 23^14 = 11592836324538749809 (20)
29^12 = 353814783205469041 (18), 31^11 = 25408476896404831 (17)
37^13 = 243569224216081305397 (21), 41^11 = 550329031716248441 (18)
43^13 = 1718264124282290785243 (22), 47^12 = 116191483108948578241 (21)
53^13 = 26036721925606486195973 (23), 59^11 = 30155888444737842659 (20)
61^14 = 9876832533361318095112441 (25), 67^10 = 1822837804551761449 (19)
71^15 = 5873205959385493353867330551 (28), 73^14 = 122045014039746588673695409 (23)
79^13 = 4668229371502258117133839 (25), 83^9 = 186940255267540403 (18)
89^11 = 2775173073766990340489 (22), 97^13 = 67302709016557486028618977 (26)
101^9 = 1093685272684360901 (19), 103^15 = 1557967416600764580522382952407 (31)
107^14 = 25785341502012466393542552649 (29), 109^13 = 306580461214335498944273629 (27)
113^12 = 4334523100191686738306881 (25), 127^11 = 138624799340320978519423 (24)
		

References

  • E.I. Ignatjew, Mathematische Spielereien, Urania Verlag Leipzig-Jena-Berlin, 2. Auflage 1982.
  • Helmut Kracke, Mathe-musische Knobelisken, Duemmler Bonn, 2. Auflage 1983.

Crossrefs

Programs

  • Mathematica
    sepan[n_]:=Module[{p=Prime[n],k=1},While[Min[DigitCount[p^k]]==0,k++];k]; Array[sepan,100] (* Harvey P. Dale, Aug 03 2019 *)
  • PARI
    a(n) = {my(k=1, p=prime(n)); while(#Set(digits(p^k))<10, k++); k; } \\ Jinyuan Wang, Aug 14 2020

Extensions

Edited by Charles R Greathouse IV, Aug 02 2010
Corrected and extended by Harvey P. Dale, Aug 03 2019

A274328 a(n) is the sum of a sequence of multiples of the n-th prime such that it contains each of the digits from 0 to 9 exactly once and with the least sum possible, or 0 if there is no satisfying sequence.

Original entry on oeis.org

270, 135, 38475, 252, 1881, 702, 918, 684, 1656, 2349, 1953, 7326, 2952, 2322, 2961, 3339, 3717, 3843, 3015, 3195, 3285, 5688, 8217, 5607, 4365, 95445, 6489, 4815, 3924, 37629, 35433, 10611, 9864, 5004, 41571, 4077, 39564, 2934, 34569, 42039
Offset: 1

Views

Author

Claudio Meller, Jun 21 2016

Keywords

Comments

From Ryan Hitchman, Sep 15 2017: (Start)
a(172) = 1023847569, prime(172) = 1021 is the first entry with one multiple.
a(1884) = 145953, prime(1884) = 16217 is last with more than one multiple.
a(10545) = 0, prime(10545) = 111119 is the first zero. (End)

Examples

			For n = 7, a(7) = 918 because prime(7) = 17, sequence 34, 85, 102, 697, sum 918.
		

Crossrefs

Cf. A180489 for n>1884. Superset of A050288. - Ryan Hitchman, Sep 15 2017

Programs

  • Mathematica
    (m = Select[#*Range[10000], Max[DigitCount[#]] == 1 &];
       Total[m*LinearProgramming[m, Thread[DigitCount /@ m],
          ConstantArray[{1, 0}, 10], 0, Integers]]) & /@ Prime[Range[40]] (* Ryan Hitchman, Sep 15 2017 *)

Extensions

Terms a(9) and beyond, zero case from Ryan Hitchman, Sep 15 2017

A253172 Numbers n = p * q, where n, p, and q together contain all 10 digits at least once.

Original entry on oeis.org

15628, 15678, 16038, 17082, 17820, 19084, 20457, 20748, 20754, 21658, 24507, 24587, 25704, 26910, 26970, 27096, 27504, 27690, 28156, 28651, 29076, 29370, 29670, 29706, 29730, 30956, 30972, 30976, 32890, 32970, 34056, 34902, 34986, 35046, 35074, 35096, 35496, 35690, 36092, 36490, 36508, 36950, 36970, 36972, 37092, 37096, 37290, 37590, 37690, 37908, 38870, 39026, 39720, 39760, 40587, 40596
Offset: 1

Views

Author

Randy L. Ekl, Dec 28 2014

Keywords

Comments

All pandigital numbers (cf. A171102) belong to this sequence; therefore A050288(1) = 10123457689 is the smallest prime term. - Reinhard Zumkeller, Dec 29 2014

Examples

			a(1) is 15628 = 4 * 3907, using all 10 digits.
a(8) is 20748 = 13 * 1596 (note duplicate 1, which is ok in this sequence).
a(3) is 16038 = 27 * 594, and also 16038 = 54 * 297; two different solutions for a(3).
		

Crossrefs

Cf. A195814, which restricts sequence terms along with their factors to exactly 10 digits, and thus has a finite number of terms.
Cf. A027750, subsequences: A050278, A171102, A050288.

Programs

  • Haskell
    import Data.List (nub, sort)
    a253172 n = a253172_list !! (n-1)
    a253172_list = filter f [2..] where
       f x = g divs $ reverse divs where
             g (d:ds) (q:qs) = d <= q &&
               (sort (nub $ xs ++ show d ++ show q) == decs || g ds qs)
             xs = show x
             divs = a027750_row x
       decs = "0123456789"
    -- Reinhard Zumkeller, Dec 29 2014
  • PARI
    isokpq(n) = {fordiv(n, d, digs = digits(n); if ( d <= sqrtint(n), digs = concat(digs, digits(d)); digs = concat(digs, digits(n/d)); if (#Set(digs) == 10, return(1));););}
    lista(nn) = {for(n=2, nn, if (isokpq(n), print1(n, ", ")););} \\ Michel Marcus, Dec 29 2014
    

A030083 Primes p such that all digits of p^2 appear in p.

Original entry on oeis.org

1049, 17923, 49261, 81619, 94583, 100469, 100549, 102953, 107251, 110923, 125789, 149827, 184903, 256169, 279863, 285101, 289573, 298327, 370421, 406951, 459521, 471923, 472963, 492671, 493621, 497521, 499423, 502261, 504821, 569423, 582139, 597823, 631927
Offset: 1

Views

Author

Keywords

Crossrefs

Contains A050288.
Cf. A030084.

Programs

  • Maple
    R:= NULL: count:= 0: p:= 2:
    while count < 100 do
     p:= nextprime(p);
     if convert(convert(p^2,base,10),set) subset convert(convert(p,base,10),set) then
        count:= count+1; R:= R,p
     fi
    od:
    R; # Robert Israel, Nov 01 2023
  • Mathematica
    Select[Prime[Range[52000]],SubsetQ[IntegerDigits[#],IntegerDigits[#^2]]&] (* Harvey P. Dale, Aug 12 2025 *)
  • Python
    from sympy import isprime
    def ok(n): return isprime(n) and set(str(n)) >= set(str(n**2))
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Nov 01 2023

Extensions

Offset corrected by Robert Israel, Nov 01 2023

A030084 Primes p such that all digits of p^3 appear in p.

Original entry on oeis.org

1035743, 1045573, 1215397, 1396247, 1642309, 2031487, 2149573, 2363149, 2385961, 2458019, 2569751, 2815973, 2857319, 2986301, 3109867, 3349517, 3482461, 3530467, 3865079, 4332871, 4387291, 4631489, 4893617, 5170283
Offset: 1

Views

Author

Keywords

Crossrefs

Includes A050288.
Cf. A030083.

Programs

  • Maple
    filter:= proc(p) isprime(p) and convert(convert(p^3,base,10),set) subset convert(convert(p,base,10),set) end proc:
    select(filter, [seq(i,i=3..3*10^6,2)]); # Robert Israel, Nov 01 2023

Extensions

Offset corrected by Robert Israel, Nov 01 2023

A108418 Primes with at least one of each odd digit and no even digits.

Original entry on oeis.org

13597, 13759, 15739, 15937, 15973, 17359, 17539, 19753, 31957, 37159, 37591, 37951, 39157, 51973, 53197, 53719, 53791, 53917, 57139, 57193, 71359, 71593, 73951, 75193, 75391, 75913, 75931, 79153, 79531, 91573, 91753, 95317, 95713, 95731
Offset: 1

Views

Author

Rick L. Shepherd, Jun 02 2005

Keywords

Comments

This is a subsequence of A030096.
No even digits are allowable. Otherwise the first missing terms would be 105379, 105397, 109357, 109537. - Zak Seidov, Nov 24 2013

Crossrefs

Cf. A030096 (Primes whose digits are all odd), A050288 (Pandigital primes), A108386 (Primes p such that p's set of distinct digits is {1, 3, 7, 9}).
Cf. A232447 (even digits are allowable). - Zak Seidov, Nov 24 2013

Programs

  • Mathematica
    Select[Table[Prime[n],{n,10000}],!ContainsAny[IntegerDigits[#],{0,2,4,6,8}]&&ContainsAll[IntegerDigits[#],{1,3,5,7,9}]&] (* James C. McMahon, Mar 05 2024 *)
  • Python
    from sympy import isprime
    from itertools import count, islice, product
    def agen():
        for d in count(5):
            for p in product("13579", repeat=d):
                if set(p) != set("13579"): continue
                t = int("".join(p))
                if isprime(t): yield t
    print(list(islice(agen(), 40))) # Michael S. Branicky, Jul 08 2022

Extensions

Added missing last term with 5 different digits, Carmine Suriano, Jan 14 2011

A159474 Pandigital primes with least digit sum (46) starting with the largest and listed in descending order.

Original entry on oeis.org

98765421103, 98765410231, 98765401321, 98765321401, 98765320411, 98765301241, 98765241103, 98765240131, 98765240113, 98765234011, 98765204311, 98765201341, 98765140231, 98765134021, 98765124103, 98765124013, 98765121043, 98765120431, 98765120413, 98765120143
Offset: 1

Views

Author

Lekraj Beedassy, Apr 13 2009

Keywords

Comments

The last term is a(1251724) = 10123457689. - Jinyuan Wang, Aug 14 2020

Crossrefs

Programs

  • Mathematica
    Select[Reverse[Sort[FromDigits[Join[{9,8,7,6},#]]&/@Permutations[{5,4,3,2,1,0,1}]]], PrimeQ] (* The program generates the first 150 terms of the sequence *) (* Harvey P. Dale, May 05 2016 *)

Extensions

Corrected and extended by Ray Chandler, Apr 16 2009
Previous Showing 11-20 of 30 results. Next