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

A031955 Numbers with exactly two distinct base-10 digits.

Original entry on oeis.org

10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 100, 101, 110, 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, 131, 133, 141, 144, 151, 155, 161, 166
Offset: 1

Views

Author

Keywords

Comments

The three-digit terms are given by A210666(1,...,244). For numbers with exactly two distinct (but unspecified) digits in other bases, see A031948-A031954. For numbers made of two *given* digits, see A007088 (digits 0 & 1), A007931 (digits 1 & 2), A032810 (digits 2 & 3), A032834 (digits 3 & 4), A256290 (digits 4 & 5), A256291 (digits 5 & 6), A256292 (digits 6 & 7), A256340 (digits 7 & 8), A256341 (digits 8 & 9), and A032804-A032816 (in other bases). - M. F. Hasler, Apr 04 2015
A235154 is a subsequence. - Altug Alkan, Dec 03 2015
A235717 is a subsequence. - Robert Israel, Dec 03 2015

Crossrefs

Programs

  • Haskell
    a031955 n = a031955_list !! (n-1)
    a031955_list = filter ((== 2) . a043537) [0..]
    -- Reinhard Zumkeller, Feb 05 2012
    
  • Maple
    M:= 5: # to get all terms < 10^M
    sort([seq(seq(seq(seq(add(10^(m-j)*`if`(member(j,S2),d2,d1),j=1..m)  ,
      S2 = combinat:-powerset({$2..m}) minus {{}}),
      d2 = {$0..9} minus {d1}), d1 = 1..9), m=2..M)]); # Robert Israel, Dec 03 2015
  • Mathematica
    Select[Range@ 166, Length@ Union@ IntegerDigits@ # == 2 &] (* Michael De Vlieger, Dec 03 2015 *)
  • PARI
    is_A031955(n)=#Set(digits(n))==2 \\ M. F. Hasler, Apr 04 2015
    
  • Python
    def ok(n): return len(set(str(n))) == 2
    print(list(filter(ok, range(167)))) # Michael S. Branicky, Oct 12 2021

Formula

A043537(a(n)) = 2. - Reinhard Zumkeller, Dec 03 2009

Extensions

Name edited by Charles R Greathouse IV, Feb 13 2017

A235161 Primes which have one or more occurrences of exactly nine different digits.

Original entry on oeis.org

102345689, 102345697, 102345869, 102346789, 102346879, 102346897, 102346957, 102347689, 102348679, 102348769, 102349867, 102354689, 102354697, 102356489, 102356789, 102356987, 102358769, 102358967, 102364859, 102364879, 102365897, 102365947, 102368459
Offset: 1

Views

Author

Colin Barker, Jan 04 2014

Keywords

Comments

The first term having a repeated digit is 1002346589.

Crossrefs

Programs

  • PARI
    s=[]; forprime(n=100000000, 102400000, if(#vecsort(eval(Vec(Str(n))),,8)==9, s=concat(s, n))); s

A030291 Primes with at most two different digits.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 113, 131, 151, 181, 191, 199, 211, 223, 227, 229, 233, 277, 311, 313, 331, 337, 353, 373, 383, 433, 443, 449, 499, 557, 577, 599, 661, 677, 727, 733
Offset: 1

Views

Author

Keywords

Comments

The one-digit primes (2, 3, 5, 7) followed by the union of A004022 and A235154. - Jeppe Stig Nielsen, Feb 17 2021

Crossrefs

Programs

  • Mathematica
    Select[Range[1000], PrimeQ[#] && Length[Union[RealDigits[#][[1]]]] <= 2 &]
    Select[Prime[Range[200]],Count[DigitCount[#],0]>7&] (* Harvey P. Dale, Jul 14 2017 *)

Extensions

Offset corrected by Arkadiusz Wesolowski, Sep 13 2011

A235690 Semiprimes which have one or more occurrences of exactly two different digits.

Original entry on oeis.org

10, 14, 15, 21, 25, 26, 34, 35, 38, 39, 46, 49, 51, 57, 58, 62, 65, 69, 74, 82, 85, 86, 87, 91, 93, 94, 95, 115, 118, 119, 121, 122, 133, 141, 155, 161, 166, 177, 202, 221, 226, 262, 299, 303, 323, 334, 335, 339, 355, 377, 393, 411, 422, 445, 446, 447, 454
Offset: 1

Views

Author

Colin Barker, Jan 14 2014

Keywords

Comments

The first term having a repeated digit is 115.

Examples

			1000000000010101 is a term because it is made of the digits 0 and 1 and it is the product of the two primes 18463559 and 54160739.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[454], Length@Union@ IntegerDigits[#] == 2 && Total[Last /@ FactorInteger[#]] == 2 &] (* Giovanni Resta, Jan 14 2014 *)
  • PARI
    list(lim)=my(v=List(), t); forprime(p=2, sqrt(lim), t=p; forprime(q=p, lim\t, listput(v, t*q))); vecsort(Vec(v)) \\ From A001358
    b=list(10000); s=[]; for(n=1, #b, if(#vecsort(eval(Vec(Str(b[n]))),,8)==2, s=concat(s, b[n]))); s

A157711 Primes made up of 0's and four 1's only.

Original entry on oeis.org

10111, 1011001, 1100101, 10010101, 10100011, 101001001, 1000001011, 1000010101, 1010000011, 1100010001, 10000001101, 10001000011, 10001001001, 10001100001, 10100000011, 10100001001, 11000000101, 11001000001
Offset: 1

Views

Author

Lekraj Beedassy, Mar 04 2009

Keywords

Comments

Intersection of A062339 and A020449. Subsequence of A235154. - Felix Fröhlich, Nov 19 2014
Primes that are the sum of four distinct powers of ten (A038446). - Jeppe Stig Nielsen, May 18 2023

Crossrefs

Cf. A020449, A038446, A062339, A235154, A383675 (number of n-digit terms).

Programs

  • Maple
    for d from 4 to 18 do for c from 0 to 2^d-1 do bdgs := convert(c,base,2) ; if add(i,i=bdgs) = 3 then p := 10^d+add(op(i,bdgs)*10^(i-1),i=1..nops(bdgs)) ; if isprime(p) then printf("%d,",p) ; fi; fi; od: od: # R. J. Mathar, Mar 06 2009
  • Mathematica
    Flatten[Select[FromDigits/@Permutations[Join[{1,1,1,1},PadRight[{},7,0]]],PrimeQ]] // Union (* Harvey P. Dale, May 09 2019 *)
  • PARI
    for(n=0, 10, forprime(p=10^n, (10^(n+1)-1)/9, if(vecmax(digits(p))==1, if(sumdigits(p)==4, print1(p, ", "))))) \\ Felix Fröhlich, Nov 19 2014
    
  • PARI
    my(M=20);for(i=3, M, for(j=2,i-1, for(k=1, j-1, my(p=10^i+10^j+10^k+1); isprime(p)&&print1(p,", ")))) \\ Jeppe Stig Nielsen, May 18 2023

Extensions

Extended by numerous authors, Mar 06 2009

A235696 Semiprimes which have one or more occurrences of exactly eight different digits.

Original entry on oeis.org

10234569, 10234657, 10234685, 10234687, 10234769, 10234795, 10234859, 10234865, 10234879, 10234957, 10234967, 10235469, 10235479, 10235489, 10235497, 10235679, 10235689, 10235769, 10235789, 10235798, 10235846, 10235847, 10235879, 10235894, 10235947, 10235986
Offset: 1

Views

Author

Colin Barker, Jan 14 2014

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[10234000,10236000],PrimeOmega[#]==Count[DigitCount[#],0]==2&] (* Harvey P. Dale, Sep 01 2014 *)
  • PARI
    list(lim)=my(v=List(), t); forprime(p=2, sqrt(lim), t=p; forprime(q=p, lim\t, listput(v, t*q))); vecsort(Vec(v)) \\ From A001358
    b=list(1030000); s=[]; for(n=1, #b, if(#vecsort(eval(Vec(Str(b[n]))),,8)==8, s=concat(s, b[n]))); s

A034845 Primes of the form iii...ijjj...j, i != j.

Original entry on oeis.org

13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 113, 199, 211, 223, 227, 229, 233, 277, 311, 331, 337, 433, 443, 449, 499, 557, 577, 599, 661, 677, 733, 773, 811, 877, 881, 883, 887, 911, 977, 991, 997, 1117, 1777, 1999, 2111
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A235154.

Programs

  • Mathematica
    Select[Union[Flatten[Table[FromDigits[Join[PadRight[{},n,m],PadRight[{},k,q]]],{n,3},{m,9},{k,3},{q,{1,3,7,9}}]]],IntegerDigits[#][[1]]!=IntegerDigits[#][[-1]]&&PrimeQ[#]&] (* Harvey P. Dale, Apr 06 2022 *)

A235155 Primes which have one or more occurrences of exactly three different digits.

Original entry on oeis.org

103, 107, 109, 127, 137, 139, 149, 157, 163, 167, 173, 179, 193, 197, 239, 241, 251, 257, 263, 269, 271, 281, 283, 293, 307, 317, 347, 349, 359, 367, 379, 389, 397, 401, 409, 419, 421, 431, 439, 457, 461, 463, 467, 479, 487, 491, 503, 509, 521, 523, 541, 547
Offset: 1

Views

Author

Colin Barker, Jan 04 2014

Keywords

Comments

The first term having a repeated digit is 1009.

Crossrefs

Programs

  • MATLAB
    %See Conrey Link
  • Mathematica
    Select[Prime[Range[200]],Count[DigitCount[#],0]==7&] (* Harvey P. Dale, Jul 27 2020 *)
  • PARI
    s=[]; forprime(n=100, 1000, if(#vecsort(eval(Vec(Str(n))),,8)==3, s=concat(s, n))); s
    

A235157 Primes which have one or more occurrences of exactly five different digits.

Original entry on oeis.org

10243, 10247, 10253, 10259, 10267, 10273, 10289, 10357, 10369, 10427, 10429, 10453, 10457, 10459, 10463, 10487, 10529, 10567, 10589, 10597, 10627, 10639, 10657, 10687, 10723, 10729, 10739, 10753, 10789, 10837, 10847, 10853, 10859, 10867, 10937, 10957
Offset: 1

Views

Author

Colin Barker, Jan 04 2014

Keywords

Comments

The first term having a repeated digit is 100237.
There are 2,529 5-digit primes in the sequence. Harvey P. Dale, Feb 06 2015

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[1255,1355]],Max[DigitCount[#]]==1&] (* The program is only accurate for 5-digit primes, of which there are 2529 satisfying the definition *) (* Harvey P. Dale, Feb 06 2015 *)
  • PARI
    s=[]; forprime(n=10000, 13000, if(#vecsort(eval(Vec(Str(n))),,8)==5, s=concat(s, n))); s

A335843 a(n) is the number of n-digit positive integers with exactly two distinct base 10 digits.

Original entry on oeis.org

0, 81, 243, 567, 1215, 2511, 5103, 10287, 20655, 41391, 82863, 165807, 331695, 663471, 1327023, 2654127, 5308335, 10616751, 21233583, 42467247, 84934575, 169869231, 339738543, 679477167, 1358954415, 2717908911, 5435817903, 10871635887, 21743271855, 43486543791
Offset: 1

Views

Author

Stefano Spezia, Jul 18 2020

Keywords

Comments

a(n) is the number of n-digit numbers in A031955.

Examples

			a(1) = 0 since the positive integers must have at least two digits;
a(2) = 81 since #[99] - #[9] - #(11*[9]) = 99 - 9 - 9 = 81;
a(3) = 243 since #[999] - #[99] - #(111*[9]) - #{xyz in N | x,y,z are three different digits with x != 0} = 999 - 99 - 9 - 9*9*8 = 243;
...
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3,-2},{0,81},31]
  • PARI
    concat([0],Vec(81*x^2/(1-3*x+2*x^2)+O(x^31)))

Formula

O.g.f.: 81*x^2/(1 - 3*x + 2*x^2).
E.g.f.: 81*(exp(x) - 1)^2/2.
a(n) = 3*a(n-1) - 2*a(n-2) for n > 2.
a(n) = 81*(2^(n-1) - 1).
a(n) = 81*A000225(n-1).

Extensions

a(0) removed by Stefano Spezia, Sep 23 2020
Showing 1-10 of 24 results. Next