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.

A260267 Primes having only {1, 2, 4} as digits.

Original entry on oeis.org

2, 11, 41, 211, 241, 421, 2111, 2141, 2221, 2411, 2441, 4111, 4211, 4241, 4421, 4441, 11411, 12211, 12241, 12421, 14221, 14411, 21121, 21211, 21221, 22111, 22441, 24121, 24421, 41141, 41221, 41411, 42221, 44111, 44221, 111121, 111211, 112111, 112121, 112241
Offset: 1

Views

Author

Vincenzo Librandi, Jul 23 2015

Keywords

Comments

A020450 and A020452 are subsequences.
All terms but the first one end with a digit "1". - M. F. Hasler, Jul 26 2015

Crossrefs

Cf. similar sequences listed in A260266.

Programs

  • Magma
    [p: p in PrimesUpTo(4*10^5) | Set(Intseq(p)) subset [1, 4, 2]];
    
  • Mathematica
    Select[Prime[Range[3 10^4]], Complement[IntegerDigits[#], {1, 4, 2}]=={} &]
  • PARI
    A260267(n=50,show=0)={for(d=1,1e9,my(t,u=vector(d,i,10^(d-i))~);forvec(v=vector(d,i,[0,if(iM. F. Hasler, Jul 25 2015

A260271 Primes having only {1, 4, 9} as digits.

Original entry on oeis.org

11, 19, 41, 149, 191, 199, 419, 449, 491, 499, 911, 919, 941, 991, 1499, 1949, 1999, 4111, 4441, 4919, 4999, 9199, 9419, 9491, 9941, 9949, 11119, 11149, 11411, 11491, 11941, 14149, 14411, 14419, 14449, 19141, 19441, 19919, 19949, 19991, 41141, 41149, 41411
Offset: 1

Views

Author

Vincenzo Librandi, Jul 23 2015

Keywords

Comments

A020452, A020457 and A020466 are subsequences.

Crossrefs

Cf. similar sequences listed in A260266.

Programs

  • Magma
    [p: p in PrimesUpTo(5*10^4) | Set(Intseq(p)) subset [1, 4, 9]];
  • Mathematica
    Select[Prime[Range[5 10^3]], Complement[IntegerDigits[#], {1, 4, 9}]=={} &]

A260266 Primes having only {0, 1, 4} as digits.

Original entry on oeis.org

11, 41, 101, 401, 4001, 4111, 4441, 10111, 10141, 11411, 14011, 14401, 14411, 40111, 41011, 41141, 41411, 44041, 44101, 44111, 100411, 101111, 101141, 101411, 110441, 114001, 114041, 140111, 140401, 140411, 141041, 141101, 400441, 401101, 401411, 404011
Offset: 1

Views

Author

Vincenzo Librandi, Jul 22 2015

Keywords

Comments

A020449 and A020452 are subsequences.
All terms end with a digit "1". - M. F. Hasler, Jul 26 2015

Crossrefs

Primes that contain only digits among {1,4,k}: this sequence (k=0), A260267 (k=2), A199341 (k=3), A260268 (k=5), A260269 (k=6), A079651 (k=7), A260270 (k=8), A260271 (k=9).

Programs

  • Magma
    [p: p in PrimesUpTo(5*10^5) | Set(Intseq(p)) subset [1, 4, 0]];
    
  • Mathematica
    Select[Prime[Range[4 10^4]], Complement[IntegerDigits[#], {1, 4, 0}]=={} &]
  • PARI
    A260266(n=50,show=0)={for(d=1,1e9,my(t,u=vector(d,i,10^(d-i))~);forvec(v=vector(d,i,[i==1||i==d,1+(iM. F. Hasler, Jul 25 2015

A199341 Primes having only {1, 3, 4} as digits.

Original entry on oeis.org

3, 11, 13, 31, 41, 43, 113, 131, 311, 313, 331, 431, 433, 443, 1433, 3313, 3331, 3343, 3413, 3433, 4111, 4133, 4441, 11113, 11131, 11311, 11411, 11443, 13313, 13331, 13411, 13441, 14143, 14341, 14411, 14431, 31333, 33113, 33311, 33331, 33343, 33413, 34141, 34313
Offset: 1

Views

Author

M. F. Hasler, Nov 05 2011

Keywords

Comments

A020451, A020452 and A020461 are subsequences. - Vincenzo Librandi, Jul 26 2015

Crossrefs

Cf. similar sequences listed in A199340.

Programs

  • Magma
    [p: p in PrimesUpTo(10^5) | Set(Intseq(p)) subset [3, 4, 1]]; // Vincenzo Librandi, Jul 26 2015
  • Maple
    Dmax:= 5: # to get all terms < 10^Dmax
    Cd:= {1,3,4}:
    C:= Cd:
    for d from 2 to Dmax do
      Cd:= map(t -> (10*t+1,10*t+3,10*t+4),Cd);
      C:= C union Cd;
    od:
    sort(convert(select(isprime,C),list)); # Robert Israel, Jul 26 2015
  • Mathematica
    Select[Prime[Range[4 10^3]], Complement[IntegerDigits[#], {3, 4, 1}]=={} &] (* Vincenzo Librandi, Jul 26 2015 *)
  • PARI
    a(n, list=0, L=[1, 3, 4], reqpal=0)={my(t); for(d=1, 1e9, u=vector(d, i, 10^(d-i))~; forvec(v=vector(d, i, [1+(i==1&!L[1]), #L]), isprime(t=vector(d, i, L[v[i]])*u)||next; reqpal & !isprime(A004086(t)) & next; list & print1(t", "); n--||return(t)))}
    

A032822 Numbers whose set of base-10 digits is {1,4}.

Original entry on oeis.org

1, 4, 11, 14, 41, 44, 111, 114, 141, 144, 411, 414, 441, 444, 1111, 1114, 1141, 1144, 1411, 1414, 1441, 1444, 4111, 4114, 4141, 4144, 4411, 4414, 4441, 4444, 11111, 11114, 11141, 11144, 11411, 11414, 11441, 11444, 14111, 14114
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A020452 (primes).

Programs

  • Magma
    [n: n in [1..15000] | Set(IntegerToSequence(n, 10)) subset {1, 4}]; // Vincenzo Librandi, May 28 2012
    
  • Mathematica
    Flatten[Table[FromDigits[#,10]&/@Tuples[{1,4},n],{n,5}]] (* Vincenzo Librandi, May 28 2012 *)
  • Maxima
    a[1]:1$ a[2]:4$ a[n]:= if oddp(n) then 10*a[floor(n/2)]+1 else 10*a[floor((n-1)/2)]+4$ makelist(a[n],n,1,40); /* Bruno Berselli, May 28 2012 */
    
  • Python
    def a(n): return int(bin(n+1)[3:].replace('1', '4').replace('0', '1'))
    print([a(n) for n in range(1, 45)]) # Michael S. Branicky, May 13 2021
    
  • Python
    def A032822(n): return 3*int(bin(n+1)[3:])+(10**((n+1).bit_length()-1)-1)//9 # Chai Wah Wu, Jun 28 2025

Formula

a(1)=1, a(2)=4; a(n) = 10*a(floor(n/2))+1 for n odd, otherwise a(n) = 10*a(floor((n-1)/2))+4. - Bruno Berselli, May 28 2012

A260268 Primes having only {1, 4, 5} as digits.

Original entry on oeis.org

5, 11, 41, 151, 541, 1151, 1451, 1511, 4111, 4441, 4451, 5441, 11411, 11551, 14411, 14551, 15451, 15511, 15541, 15551, 41141, 41411, 44111, 45541, 51151, 51511, 51551, 54151, 54541, 55411, 55441, 55511, 55541, 114451, 115151, 141511, 141551, 144451, 144511
Offset: 1

Views

Author

Vincenzo Librandi, Jul 23 2015

Keywords

Comments

A020452 and A020453 are subsequences.

Crossrefs

Cf. similar sequences listed in A260266.

Programs

  • Magma
    [p: p in PrimesUpTo(4*10^5) | Set(Intseq(p)) subset [1, 4, 5]];
  • Mathematica
    Select[Prime[Range[3 10^4]], Complement[IntegerDigits[#], {1, 4, 5}]=={} &]

A260269 Primes having only {1, 4, 6} as digits.

Original entry on oeis.org

11, 41, 61, 461, 641, 661, 4111, 4441, 6661, 11161, 11411, 14411, 14461, 16111, 16141, 16411, 16661, 41141, 41161, 41411, 41611, 41641, 44111, 44641, 46141, 46411, 46441, 61141, 61441, 64661, 66161, 111611, 111641, 114161, 114641, 114661, 116141, 116411
Offset: 1

Views

Author

Vincenzo Librandi, Jul 23 2015

Keywords

Comments

A020452 and A020454 are subsequences.

Crossrefs

Cf. similar sequences listed in A260266.

Programs

  • Magma
    [p: p in PrimesUpTo(4*10^5) | Set(Intseq(p)) subset [1, 4, 6]];
  • Mathematica
    Select[Prime[Range[3 10^4]], Complement[IntegerDigits[#], {1, 4, 6}]=={} &]

A260270 Primes having only {1, 4, 8} as digits.

Original entry on oeis.org

11, 41, 181, 811, 881, 1181, 1481, 1811, 4111, 4441, 4481, 8111, 11411, 14411, 18181, 18481, 41141, 41411, 44111, 48481, 81181, 84181, 84481, 84811, 88411, 88811, 118411, 141181, 141481, 141811, 144481, 148411, 181141, 184111, 184181, 184441, 411841, 418181
Offset: 1

Views

Author

Vincenzo Librandi, Jul 23 2015

Keywords

Comments

A020452 and A020456 are subsequences.

Crossrefs

Cf. similar sequences listed in A260266.

Programs

  • Magma
    [p: p in PrimesUpTo(5*10^5) | Set(Intseq(p)) subset [1, 4, 8]];
  • Mathematica
    Select[Prime[Range[4 10^4]], Complement[IntegerDigits[#], {1, 4, 8}]=={} &]
    Table[Select[10#+1&/@(FromDigits/@Tuples[{1,4,8},n]),PrimeQ],{n,5}]// Flatten (* Harvey P. Dale, Jun 08 2019 *)

A036304 Composite numbers whose prime factors contain no digits other than 1 and 4.

Original entry on oeis.org

121, 451, 1331, 1681, 4961, 14641, 18491, 45221, 48851, 54571, 68921, 125521, 158521, 161051, 168551, 182081, 203401, 452551, 455521, 467851, 485221, 497431, 537361, 590851, 600281, 758131, 1380731, 1686781, 1697851, 1743731, 1771561
Offset: 1

Views

Author

Patrick De Geest, Dec 15 1998

Keywords

Comments

All terms are a product of at least two terms of A020452. - David A. Corneth, Oct 09 2020

Examples

			The composite 4961 = 11^2 * 41 is in the sequence as the digits of its prime factors are either 1 or 4. - _David A. Corneth_, Oct 17 2020
		

Crossrefs

Formula

Sum_{n>=1} 1/a(n) = Product_{p in A020452} (p/(p - 1)) - Sum_{p in A020452} 1/p - 1 = 0.0122909749... . - Amiram Eldar, May 18 2022

A036931 Smallest n-digit prime containing only digits 1 and 4, or 0 if no such prime exists.

Original entry on oeis.org

0, 11, 0, 4111, 11411, 0, 1114111, 11111141, 0, 1111111411, 11111141411, 0, 1111111111441, 11111111111411, 0, 1111111111114441, 11111111111414411, 0, 1111111111111111111, 11111111111111414441, 0, 1111111111111111144141
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Comments

For any positive integer k, a(3k) = 0 as any 3k-digit number containing only digits 1 or 4 or both has a digit-sum divisible by 3 and thus the number is divisible by 3. - Rick L. Shepherd, Feb 08 2004

Crossrefs

Cf. A004022 (repunit primes), A004023.

Programs

  • Mathematica
    Flatten[Table[Select[FromDigits/@Tuples[{1, 4}, n], PrimeQ, 1], {n, 25}]/.{}->{0}] (* Jinyuan Wang, Mar 09 2020 *)

Formula

a(3k) = 0 and a(A004023(k)) = (10^A004023(k) - 1)/9 = A004022(k) for all positive integers k. - Rick L. Shepherd, Feb 08 2004

Extensions

More terms from Rick L. Shepherd, Feb 08 2004
Showing 1-10 of 10 results.