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

A092624 Numbers with exactly two prime digits.

Original entry on oeis.org

22, 23, 25, 27, 32, 33, 35, 37, 52, 53, 55, 57, 72, 73, 75, 77, 122, 123, 125, 127, 132, 133, 135, 137, 152, 153, 155, 157, 172, 173, 175, 177, 202, 203, 205, 207, 212, 213, 215, 217, 220, 221, 224, 226, 228, 229, 230, 231, 234, 236, 238, 239, 242, 243, 245
Offset: 1

Views

Author

Jani Melik, Apr 11 2004

Keywords

Comments

A193238(a(n))=2; subsequence of A118950. [Reinhard Zumkeller, Jul 19 2011]

Examples

			25 has two prime digits, 2 and 5;
207 has two prime digits, 2 and 7.
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a092624 n = a092624_list !! (n-1)
    a092624_list = elemIndices 2 a193238_list
    -- Reinhard Zumkeller, Jul 19 2011
  • Maple
    stev_sez:=proc(n) local i, tren, st, ans, anstren; ans:=[ ]: anstren:=[ ]: tren:=n: for i while (tren>0) do st:=round( 10*frac(tren/10) ): ans:=[ op(ans), st ]: tren:=trunc(tren/10): end do; for i from nops(ans) to 1 by -1 do anstren:=[ op(anstren), op(i,ans) ]; od; RETURN(anstren); end: ts_stpf:=proc(n) local i, stpf, ans; ans:=stev_sez(n): stpf:=0: for i from 1 to nops(ans) do if (isprime(op(i,ans))='true') then stpf:=stpf+1; # number of prime digits fi od; RETURN(stpf) end: ts_pr_nd:=proc(n) local i, stpf, ans, ans1, tren; ans:=[ ]: stpf:=0: tren:=1: for i from 1 to n do if ( ts_stpf(i) = 2) then ans:=[ op(ans), i ]: tren:=tren+1; fi od; RETURN(ans) end: ts_pr_nd(500);
  • Mathematica
    Select[Range[300],Count[IntegerDigits[#],?PrimeQ]==2&] (* _Harvey P. Dale, Apr 20 2025 *)

A092625 Numbers with exactly three prime digits.

Original entry on oeis.org

222, 223, 225, 227, 232, 233, 235, 237, 252, 253, 255, 257, 272, 273, 275, 277, 322, 323, 325, 327, 332, 333, 335, 337, 352, 353, 355, 357, 372, 373, 375, 377, 522, 523, 525, 527, 532, 533, 535, 537, 552, 553, 555, 557, 572, 573, 575, 577, 722, 723, 725
Offset: 1

Views

Author

Jani Melik, Apr 11 2004

Keywords

Comments

It is the same as A046034 from two digit numbers from 22 up to four digit numbers from 1222.
A193238(a(n))=3; subsequence of A118950. [Reinhard Zumkeller, Jul 19 2011]

Examples

			222 has three prime digits, three times 2;
1235 has three prime digits, 2, 3 and 5.
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a092625 n = a092625_list !! (n-1)
    a092625_list = elemIndices 3 a193238_list
    -- Reinhard Zumkeller, Jul 19 2011
  • Maple
    stev_sez:=proc(n) local i, tren, st, ans, anstren; ans:=[ ]: anstren:=[ ]: tren:=n: for i while (tren>0) do st:=round( 10*frac(tren/10) ): ans:=[ op(ans), st ]: tren:=trunc(tren/10): end do; for i from nops(ans) to 1 by -1 do anstren:=[ op(anstren), op(i,ans) ]; od; RETURN(anstren); end: ts_stpf:=proc(n) local i, stpf, ans; ans:=stev_sez(n): stpf:=0: for i from 1 to nops(ans) do if (isprime(op(i,ans))='true') then stpf:=stpf+1; # number of prime digits fi od; RETURN(stpf) end: ts_pr_nt:=proc(n) local i, stpf, ans, ans1, tren; ans:=[ ]: stpf:=0: tren:=1: for i from 1 to n do if ( ts_stpf(i) = 3) then ans:=[ op(ans), i ]: tren:=tren+1; fi od; RETURN(ans) end: ts_pr_nt(2000);
  • Mathematica
    Select[Range[800],Total[Boole[PrimeQ[IntegerDigits[#]]]]==3&] (* Harvey P. Dale, Dec 31 2023 *)

A276729 Number of nonprime digits in the decimal expansion of n.

Original entry on oeis.org

1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2
Offset: 0

Views

Author

M. F. Hasler, Sep 16 2016

Keywords

Crossrefs

Cf. A011557 (integers that give records).

Programs

  • Maple
    f:= proc(n) local t; option remember;
      t:= n mod 10;
    procname((n-t)/10) + `if`(member(t,[2,3,5,7]),0,1)
    end proc:
    f(0):= 0:
    1,seq(f(i),i=1..100); # Robert Israel, Feb 27 2019
  • PARI
    a(n)=#select(t->!isprime(t),digits(n))

Formula

a(n) = A055642(n) - A193238(n).
a(A046034(n)) = 0. - Gordon Atkinson, Sep 06 2019

A092619 Numbers with property that number of prime digits is prime.

Original entry on oeis.org

22, 23, 25, 27, 32, 33, 35, 37, 52, 53, 55, 57, 72, 73, 75, 77, 122, 123, 125, 127, 132, 133, 135, 137, 152, 153, 155, 157, 172, 173, 175, 177, 202, 203, 205, 207, 212, 213, 215, 217, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234
Offset: 1

Views

Author

Jani Melik, Apr 11 2004

Keywords

Comments

A subset of A085557 from the 4th term.
Upper relative density in the primes is 1; lower relative density in the primes is 0. - Charles R Greathouse IV, Nov 14 2010

Examples

			22 has two prime digits and their number 2 is prime, so 22 is a term.
222 has three prime digits and their number 3 is prime, so 222 is a term.
		

Crossrefs

Cf. A085557.

Programs

  • Maple
    stev_sez:=proc(n) local i, tren, st, ans,anstren; ans:=[ ]: anstren:=[ ]: tren:=n: for i while (tren>0) do st:=round( 10*frac(tren/10) ): ans:=[ op(ans), st ]: tren:=trunc(tren/10): end do; for i from nops(ans) to 1 by -1 do anstren:=[ op(anstren), op(i,ans) ]; od; RETURN(anstren); end: ts_stpf:=proc(n) local i, stpf, ans; ans:=stev_sez(n): stpf:=0: for i from 1 to nops(ans) do if (isprime(op(i,ans))='true') then stpf:=stpf+1; # number of prime digits fi od; RETURN(stpf) end: ts_pr:=proc(n) local i, stpf, ans, ans1; ans:=[ ]: stpf:=0: for i from 1 to n do if (isprime( ts_stpf(i) )='true') then ans:=[ op(ans), i ]: fi od; RETURN(ans) end: ts_pr(300);
    # second Maple program:
    q:= n-> isprime(nops(select(isprime, convert(n, base, 10)))):
    select(q, [$1..500])[];  # Alois P. Heinz, Feb 08 2023
  • Mathematica
    Select[Range[250],PrimeQ[Count[IntegerDigits[#],?PrimeQ]]&] (* _Harvey P. Dale, Nov 29 2011 *)
  • Python
    from itertools import count, islice
    from sympy import isprime
    def A092619_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:isprime(sum(1 for d in str(n) if d in {'2','3','5','7'})),count(max(startvalue,1)))
    A092619_list = list(islice(A092619_gen(),20)) # Chai Wah Wu, Feb 08 2023
Showing 1-4 of 4 results.