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

A173051 Partial sums of A050288.

Original entry on oeis.org

10123457689, 20246923478, 30370389375, 40493875054, 50617360823, 60740857680, 70864405549, 80987954228, 91111523175, 101235101824
Offset: 1

Views

Author

Jonathan Vos Post, Feb 08 2010

Keywords

Comments

Partial sums of (base 10) Pandigital primes. Note that almost all primes are pandigital. a(59) is (after the first value) the first prime in this sequence. What is the smallest pandigital prime partial sum of (base 10) pandigital primes? In other bases?

Examples

			The least prime after a(1) is a(59) = 10123457689 + 10123465789 + 10123465897 + 10123485679 + 10123485769 + 10123496857 + 10123547869 + 10123548679 + 10123568947 + 10123578649 + 10123586947 + 10123598467 + 10123654789 + 10123684759 + 10123685749 + 10123694857 + 10123746859 + 10123784569 + 10123846597 + 10123849657 + 10123854679 + 10123876549 + 10123945687 + 10123956487 + 10123965847 + 10123984657 + 10124356789 + 10124358697 + 10124365879 + 10124365987 + 10124369587 + 10124378569 + 10124385967 + 10124389567 + 10124395867 + 10124398657 + 10124536789 + 10124538769 + 10124563789 + 10124563879 + 10124563987 + 10124568793 + 10124576893 + 10124578693 + 10124579863 + 10124583967 + 10124586397 + 10124589637 + 10124593867 + 10124596873 + 10124597683 + 10124635879 + 10124635897 + 10124638759 + 10124659873 + 10124673859 + 10124678953 + 10124683759 + 10124685379 = 597325496783 is prime.
		

Crossrefs

Formula

a(n) = SUM[i=1..n] A050288(i) = SUM[i=1..n] {p is prime and p, base 10, has all 10 digits in its decimal representation, digits may appear multiple times}.

A050278 Pandigital numbers: numbers containing the digits 0-9. Version 1: each digit appears exactly once.

Original entry on oeis.org

1023456789, 1023456798, 1023456879, 1023456897, 1023456978, 1023456987, 1023457689, 1023457698, 1023457869, 1023457896, 1023457968, 1023457986, 1023458679, 1023458697, 1023458769, 1023458796, 1023458967, 1023458976, 1023459678, 1023459687, 1023459768
Offset: 1

Views

Author

Eric W. Weisstein, Dec 11 1999

Keywords

Comments

This is a finite sequence with 9*9! = 3265920 terms: a(9*9!) = 9876543210.
A171102 is the infinite version, where each digit must appear at least once.
More precisely, this is exactly the subset of the first 9*9! terms of A171102. - M. F. Hasler, Jan 05 2020
Subsequence of A134336 and of A178403; A178401(a(n)) = 1. - Reinhard Zumkeller, May 27 2010
Smallest prime factors: A178775(n) = A020639(a(n)). - Reinhard Zumkeller, Jun 11 2010
A178788(a(n)) = 1. - Reinhard Zumkeller, Jun 30 2010
All these numbers are composite because the sum of the digits, 45, is divisible by 9. - T. D. Noe, Nov 09 2011
This is the 10th row of the array T(k,n) = n-th number in which the number of distinct base-10 digits is k. A031969 is the 4th row. A220063 is the 5th row. A220076 is the 6th row. A218019 is the 7th row. A219743 is the 8th row. - Jonathan Vos Post, Dec 05 2012
From Hieronymus Fischer, Feb 13 2013: (Start)
The sum of all terms is 9!*49444444440 = 17942399998387200.
General formula for the sum of all terms of the finite sequence of the corresponding base-p pandigital numbers with p places: sum = ((p^2 - p - 1)*(p^p - 1) + p - 1)*(p-2)!/2.
General formula for the sum of all terms (interpreted as decimal permutational numbers with exactly d+1 different digits from the range 0..d < 10): sum = (d+1)!*((10d - 1)*10^d - d + 1)/18, d > 1.
(End)

Crossrefs

Programs

  • Mathematica
    Select[ FromDigits@# & /@ Permutations[ Range[0, 9]], # > 10^9 &, 20] (* Robert G. Wilson v, May 30 2010, Jan 17 2012 *)
  • PARI
    A050278(n)={ my(b=vector(9,k,1+(n+9!-1)%(k+1)!\k!), t=b[9]-1, d=vector(9,i,i+(i>t)-1)); for(i=1,8, t=10*t+d[b[9-i]]; d=vecextract(d,Str("^"b[9-i]))); t*10+d[1]} \\ M. F. Hasler, Jan 15 2012
    
  • PARI
    is_A050278(n)={ 9<#vecsort(Vecsmall(Str(n)),,8) & n<1e10 } /* assuming that n is a nonnegative integer */ /* M. F. Hasler, Jan 10 2012 */
    
  • PARI
    a(n)=my(d=numtoperm(10,n+9!-1));sum(i=1,#d,(d[i]-1)*10^(#d-i)) \\ David A. Corneth, Jun 01 2014
    
  • Python
    from itertools import permutations
    A050278_list = [int(''.join(d)) for d in permutations('0123456789',10) if d[0] != '0'] # Chai Wah Wu, May 25 2015

Formula

A050278 = 9*A171571. - M. F. Hasler, Jan 12 2012
A050278(n) = A171102(n) for n <= 9*9!.

Extensions

Edited by N. J. A. Sloane, Sep 25 2010 to clarify that this is a finite sequence

A171102 Pandigital numbers: numbers containing the digits 0-9. Version 2: each digit appears at least once.

Original entry on oeis.org

1023456789, 1023456798, 1023456879, 1023456897, 1023456978, 1023456987, 1023457689, 1023457698, 1023457869, 1023457896, 1023457968, 1023457986, 1023458679, 1023458697, 1023458769, 1023458796, 1023458967, 1023458976
Offset: 1

Views

Author

N. J. A. Sloane, Sep 25 2010

Keywords

Comments

This is the infinite version. See A050278 for the finite version.
The first 9*9!=3265920 terms of this sequence are permutations of the digits 0-9 with a(9*9!)=9876543210 (see Version 1, A050278). - Jeremy Gardiner, May 29 2010
Subsequence of A134336 and of A178403; A178401(a(n))>0. - Reinhard Zumkeller, May 27 2010
Smallest prime factors: A178775(n) = A020639(a(n)). - Reinhard Zumkeller, Jun 11 2010
A178788(a(n)) = 1, for n <= 9*9!, else A178788(a(n)) = 0. - Reinhard Zumkeller, Jun 30 2010 [corrected by Hieronymus Fischer, Feb 02 2013]
A230959(a(n)) = 0. - Reinhard Zumkeller, Nov 02 2013
The first term of the sequence absent in A050278 is a(3265921) = 10123456789. Also, the first prime is a(3306373) = 10123457689 = A050288(1). - Zak Seidov, Sep 23 2015
Almost all numbers are in this sequence, in the sense that it has asymptotic density equal to 1. Indeed, the fraction of n-digit numbers which don't have a given digit d is roughly 0.9^n (not exactly because the first digit is chosen among {1..9}) which tends to zero as n -> oo. - M. F. Hasler, Jan 05 2020

Crossrefs

Subsequence of A253172.

Programs

  • Mathematica
    Take[ Select[ FromDigits@# & /@ Permutations[ Range[0, 9], {10}], # > 10^9 &], 20] (* Robert G. Wilson v, May 30 2010 *)
  • PARI
    is_A171102(n)=9<#vecsort(Vecsmall(Str(n)),,8) /* assuming that n is a nonnegative integer. In PARI/GP V.2.4 - 2.9 this is faster than other possibilities involving Set(),Vec(),eval() or digits() */ \\ M. F. Hasler, Jan 10 2012, Sep 19 2017
    
  • PARI
    A171102=A050278 /*** valid for n <= 9*9! ***/ \\ M. F. Hasler, Jan 10 2012

Formula

a(n) = 1011111111 + A178478(n) for n = 1,...,8!. - M. F. Hasler, Jan 10 2012
A171102(n) = A050278(n) for n <= 9*9!.

A175271 Base-8 pandigital primes.

Original entry on oeis.org

17119607, 17120573, 17121077, 17127839, 17128931, 17132347, 17135413, 17136029, 17136869, 17148349, 17159479, 17164757, 17181683, 17184119, 17185463, 17185981, 17194171, 17196383, 17196733, 17200373, 17202347
Offset: 1

Views

Author

M. F. Hasler, May 27 2010

Keywords

Comments

Base-8 pandigital primes must have at least 9 octal digits, since sum(d_i 8^i) = sum(d_i) (mod 7), and 0+1+...+6+7 is divisible by 7. So the smallest ones should be of the form "10123...." in base 8, where "...." is a permutation of "4567". By chance, the identical permutation already yields a prime: a(1)="101234567" in base-8.

Crossrefs

Programs

  • PARI
    pdp( b=8/*base*/, c=199/* # of terms to produce */) = { my(t, a=[], bp=vector(b,i,b^(b-i))~, offset=b*(b^b-1)/(b-1)); for( i=1,b-1, offset+=b^b; for( j=0,b!-1, isprime(t=offset-numtoperm(b,j)*bp) | next; #(a=concat(a,t))
    				

Extensions

Edited by Charles R Greathouse IV, Aug 02 2010

A175280 Base-9 pandigital primes: primes having at least one of each digit 0,...,8 when written in base 9.

Original entry on oeis.org

393474749, 393474821, 393475373, 393481069, 393486901, 393488437, 393492797, 393494477, 393499429, 393499517, 393500741, 393528029, 393528517, 393538157, 393541693, 393544709, 393545861, 393546149, 393551189, 393551357, 393552629
Offset: 1

Views

Author

M. F. Hasler, May 30 2010

Keywords

Comments

Terms in this sequence have at least 10 digits in base 9, i.e., are larger than 9^9, since sum(d_i 9^i) = sum(d_i) (mod 8), and 0+1+2+3+4+5+6+7+8 is divisible by 4. So there must be at least one repeated digit, which may not be even, else the resulting number is even. The smallest terms are therefore of the form "10123...." in base 9, where "...." is a permutation of "45678", cf. examples.

Examples

			The first terms of this sequence, i.e., smallest base-9 pandigital primes, are "1012346785", "1012346875", "1012347658", "1012356487", "1012365487", "1012367584", "1012374568", "1012376845", "1012384657", ... (written in base 9).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[4*10^8], Min @ DigitCount[#, 9] > 0 && PrimeQ[#] &] (* Amiram Eldar, Apr 13 2021 *)
  • PARI
    pdp( b=9/*base*/, c=99/* # of terms to produce */) = { my(t, a=[], bp=vector(b,i,b^(b-i))~, offset=b*(b^b-1)/(b-1)); for( i=1,b-1, offset+=b^b; for( j=0,b!-1, isprime(t=offset-numtoperm(b,j)*bp) | next; #(a=concat(a,t))
    				

Extensions

Edited by Charles R Greathouse IV, Aug 02 2010

A175279 Base-7 pandigital primes: primes having at least one of each digit 0,...,6 when written in base 7.

Original entry on oeis.org

863231, 863279, 863867, 863897, 864203, 864251, 865379, 865871, 865877, 866011, 866399, 866653, 866693, 867641, 867719, 868033, 868069, 868081, 868103, 868121, 868123, 868327, 868423, 868453, 868669, 868787, 868793, 868801, 868943, 868999
Offset: 1

Views

Author

M. F. Hasler, May 30 2010

Keywords

Comments

Terms in this sequence have at least 8 digits in base 7, i.e., are larger than 7^7, since sum(d_i 7^i) = sum(d_i) (mod 6), and 0+1+2+3+4+5+6 is divisible by 3. So there must be at least one repeated digit, which may not be 0 nor 6 neither odd (else the resulting number is even). The smallest terms are therefore of the form "1022...." in base 7, where "...." is a permutation of "3456", cf. examples.

Examples

			The smallest base-7 pandigital primes are "10223465", "10223564", "10225364", "10225436", "10226354" and "10226453", written in base 7.
		

Crossrefs

Programs

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

Extensions

Edited by Charles R Greathouse IV, Aug 02 2010

A175272 Base-12 pandigital primes.

Original entry on oeis.org

8989787252711, 8989787311891, 8989787313343, 8989787458763, 8989787707627, 8989787709211, 8989787710927, 8989787764211, 8989787806099, 8989787810719, 8989787959879, 8989787974883, 8989787992747, 8989787999743, 8989788058351
Offset: 1

Views

Author

M. F. Hasler, Mar 19 2010

Keywords

Comments

These numbers need to have at least 13 digits in base 12 since any permutation of the digits 0,...,9,A,B will result in a number divisible by 11. For the same reason, it must be digit different from 0 which is repeated. Thus the smallest terms in this sequence are written "10123456....." in base 12, where ..... is a permutation of {7,8,9,A,B}.
Note: Due to the implementation of numtoperm(), the PARI script will not necessarily print the terms in the correct order. In some cases, more than the desired number of terms have to be calculated, and vecsort() to be used to get the correct sequence. - M. F. Hasler, May 27 2010

Examples

			8989787252711, 8989787311891, 8989787313343, 8989787458763, ... are written "101234568A79B", "10123456B8A97", "10123456B98A7", "1012345769A8B", ... in base 12 (where A=digit 10, B=digit 11).
		

Crossrefs

Programs

  • PARI
    pdp( b=12/* base */, c=20/* #terms to print */)={ my(t,bp=vector(b,i,b^(b-i))~, offset=b*(b^b-1)/(b-1) /* to fix order of permutations CBA..321 => 012...9AB */); for( i=1,b-1, /* add initial digit */ offset += b^b; for( j=0,b!-1, isprime(t=offset-numtoperm(b,j)*bp) & !print1(t", ") & !c-- & return))}

Extensions

Order of the terms corrected by M. F. Hasler, May 27 2010

A175273 Base-16 pandigital primes.

Original entry on oeis.org

18528729602926047181, 18528729602926100221, 18528729602926108411, 18528729602926112701, 18528729602926116331, 18528729602926234591, 18528729602926235071, 18528729602927029471, 18528729602927225551
Offset: 1

Views

Author

M. F. Hasler, May 27 2010

Keywords

Comments

Base-16 (a.k.a. hexadecimal, sexadecimal, senidenary or hexadecadic) pandigital primes must have at least 17 hexadecimal digits (i.e. they are larger than 16^16 = 2^64 > 10^19), since sum(d_i 16^i) = sum(d_i) (mod 15), and 0+1+...+14+15 is divisible by 15. So the smallest ones should be of the form "101234567...." in base 16, where "...." is a permutation of "89ABCDEF".
The same reasoning shows that numbers of this form ("1012...") are congruent to 1 modulo 15 and thus modulo 30 (since also = 1 [mod 2]). This explains that all terms < 2*16^16 end in the (decimal!) digit 1.
a(n) == 1 (mod 30) for a(n) < 2^65 = 3.69*10^19.

Crossrefs

Programs

  • PARI
    pdp( b=16/*base*/, c=99/* # of terms to produce */) = { my(t, a=[], bp=vector(b,i,b^(b-i))~, offset=b*(b^b-1)/(b-1)); for( i=1,b-1, offset+=b^b; for( j=0,b!-1, isprime(t=offset-numtoperm(b,j)*bp) | next; #(a=concat(a,t))
    				

Extensions

Edited by Charles R Greathouse IV, Aug 02 2010

A175274 Base-20 pandigital primes: primes having at least one of each digit 0,...,19, when written in base 20.

Original entry on oeis.org

105148064265927977839670339, 105148064265927977839838717, 105148064265927977839990337, 105148064265927977842711099, 105148064265927977843159537, 105148064265927977846038379
Offset: 1

Views

Author

M. F. Hasler, May 27 2010

Keywords

Comments

Base-20 pandigital primes must have at least 21 base-20 digits (i.e. they are larger than 20^20 > 10^26), since sum(d_i 20^i) = sum(d_i) (mod 19), and 0+1+...+18+19 is divisible by 19. So the smallest ones should be of the form "10123456789ABCD..." in base 20, where "..." is a permutation of "EFHGIJ" (with A..J representing digits 10..19).

Crossrefs

Programs

  • PARI
    pdp( b=20/*base*/, c=99/* # of terms to produce */) = { my(t, a=[], bp=vector(b,i,b^(b-i))~, offset=b*(b^b-1)/(b-1)); for( i=1,b-1, offset+=b^b; for( j=0,b!-1, isprime(t=offset-numtoperm(b,j)*bp) | next; #(a=concat(a,t))
    				

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

Original entry on oeis.org

11, 19, 29, 47, 59, 61, 73, 83, 89, 97, 101, 103, 107, 113, 127, 137, 139, 163, 167, 173, 179, 181, 191, 193, 197, 199, 223, 227, 251, 257, 263, 269, 277, 281, 293, 307, 311, 313, 317, 331, 347, 349, 353, 359, 379, 383, 389, 397, 409, 419, 421, 431, 433, 439
Offset: 1

Views

Author

M. F. Hasler, May 27 2010

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[500], Min @ DigitCount[#, 3] > 0 && PrimeQ[#] &] (* Amiram Eldar, Apr 13 2021 *)
  • PARI
    base(n,b=16,s=0)={local(a=[n%b]);while(09,s,48)+a[i])),a)}
    forprime(p=1,999,#Set(base(p,3))==3&print1(p","))
Showing 1-10 of 30 results. Next