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-13 of 13 results.

A334170 Emirps containing only the digits 1 and 2.

Original entry on oeis.org

111211, 112111, 12122221, 12222121, 1111122121, 1212211111, 11121211121, 11212221121, 12111212111, 12112221211, 111122221121, 111122222111, 111122222221, 111211221221, 111212212211, 111212222111, 111222212111, 111222221111, 112111211221, 112122112211, 112122211121
Offset: 1

Views

Author

Daniel Starodubtsev, Apr 17 2020

Keywords

Crossrefs

Intersection of A007931 and A006567.
Subsequence of A020450.

Programs

  • Mathematica
    Union @ Flatten @ Table[FromDigits /@ Select[Tuples[{1, 2}, n] ,PrimeQ @ (m = FromDigits[#]) && # != (r = Reverse[#]) && PrimeQ @ FromDigits[r] &], {n, 12}] (* Amiram Eldar, Apr 18 2020 *)
    Table[Select[FromDigits/@Tuples[{1,2},n],!PalindromeQ[#]&&AllTrue[ {#,IntegerReverse[ #]},PrimeQ]&],{n,12}]//Flatten (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 08 2020 *)
  • PARI
    isok(p) = if (isprime(p), my(d=digits(p), rd=Vecrev(d)); (vecsort(d,,8) == [1,2]) && isprime(fromdigits(rd)) && (rd != d));
    lista(nn) = {for (n=1, nn, my(vf = vector(n, k, 1)); for (i=1, 2^n-1, my(vpos = select(x->(x==1), Vecrev(binary(i)), 1), nvf = vf); for (i=1, #vpos, nvf[vpos[i]] = 2;); my(x = eval(Str(1, fromdigits(Vecrev(nvf)), 1))); if (isok(x), print1(x, ", "));););} \\ Michel Marcus, Apr 18 2020

A276461 Prime numbers whose digits are k+1 1's and k 2's for some k >= 1.

Original entry on oeis.org

211, 12211, 21121, 21211, 22111, 1121221, 1212121, 2121121, 2211211, 2221111, 111221221, 112212211, 112221211, 121211221, 211122211, 211212121, 211222111, 221112121, 221212111, 11122121221, 11122221211, 11211221221, 11212211221, 11212221121, 11222112211
Offset: 1

Views

Author

Bob Selcoe, Sep 03 2016

Keywords

Comments

The sequence is conjectured to be infinite.

Crossrefs

Programs

  • Mathematica
    Table[Select[Map[FromDigits, Permutations[ConstantArray[1, n + 1] ~Join~ ConstantArray[2, n], {2 n + 1}]], PrimeQ], {n, 5}] // Flatten (* Michael De Vlieger, Sep 04 2016 *)
  • PARI
    listp(nn) = { forprime(p=2, nn, d = digits(p); if ((vecmin(d) == 1) && (vecmax(d) == 2) && (#select(x->x==1, d) == #select(x->x==2, d) +1), print1(p, ", ");););} \\ Michel Marcus, Sep 04 2016

A386004 Primes whose digit set intersects the odd digits in at most one element and intersects the even digits in at most two elements.

Original entry on oeis.org

2, 3, 5, 7, 11, 23, 29, 41, 43, 47, 61, 67, 83, 89, 101, 181, 211, 223, 227, 229, 233, 241, 263, 269, 277, 281, 283, 383, 401, 409, 421, 433, 443, 449, 461, 463, 467, 487, 499, 601, 607, 641, 643, 647, 661, 677, 683, 727, 787, 809, 811, 821, 823, 827, 829, 863
Offset: 1

Views

Author

Jean-Marc Rebert, Jul 14 2025

Keywords

Comments

From David A. Corneth, Jul 14 2025: (Start)
Terms can have at most three distinct digits.
Terms > 5 cannot have a digit 5. Proof: Terms > 5 are odd as they are prime. They cannot have a last digit 5. So if they have a digit 5 then they have at least two distinct odd digits contradicting the sequence definition of having at most one odd digit. (End)

Examples

			101 is a term because it is prime and its digit set is {0, 1} — containing at most one odd digit and no more than two distinct even digits.
1021 is a term because it is prime and its digit set is {0,1,2} — containing at most one odd digit and no more than two distinct even digits.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[150]],Length[Intersection[d=IntegerDigits[#],{1,3,5,7,9}]]<=1 && Length[Intersection[d,{0,2,4,6,8}]]<=2 &] (* Stefano Spezia, Jul 14 2025 *)
  • PARI
    is(n) = if(!isprime(n), return(0)); my(s=Set(digits(n)), odd=0); if(#s>3,return(0)); odd=sum(i=1, #s ,bitand(s[i], 1)); if(odd > 1, return(0)); if(#s-odd > 2, return(0)); 1 \\ David A. Corneth, Jul 14 2025
Previous Showing 11-13 of 13 results.