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

A329761 Primes having only {1, 3, 9} as digits.

Original entry on oeis.org

3, 11, 13, 19, 31, 113, 131, 139, 191, 193, 199, 311, 313, 331, 911, 919, 991, 1193, 1319, 1399, 1913, 1931, 1933, 1993, 1999, 3119, 3191, 3313, 3319, 3331, 3391, 3911, 3919, 3931, 9133, 9199, 9311, 9319, 9391, 9931, 11113, 11119, 11131, 11311, 11393, 11399
Offset: 1

Views

Author

Alois P. Heinz, Nov 20 2019

Keywords

Comments

Original name was: Primes whose product of decimal digits is a power of 3.
Primes whose digit set is a subset of {1,3,9}.

Crossrefs

Subsequence of A030096.

Programs

  • Magma
    [p: p in PrimesUpTo(12000) | Set(Intseq(p)) subset [1,3,9]]; // Vincenzo Librandi, Jan 02 2019
  • Mathematica
    Select[Prime[Range[1500]],IntegerQ[Log[3,Times@@IntegerDigits[#]]]&] (* or *) Table[Select[FromDigits/@Tuples[{1,3,9},n],PrimeQ],{n,5}]// Flatten (* Harvey P. Dale, Dec 31 2019 *)

Formula

{ A000040 } intersect { A174813 }.
a(n) in { A000040 } and A007954(a(n)) in { A000244 }.

Extensions

Name changed by Sean A. Irvine, Jul 20 2025

A104638 Number of odd digits in n-th prime.

Original entry on oeis.org

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

Views

Author

Zak Seidov, Mar 18 2005

Keywords

Comments

The only zero is the first term. Sequence is unbounded. - Zak Seidov, Jan 12 2016
From Robert Israel, Jan 12 2016: (Start)
For any N, the asymptotic density of terms >= N is 1.
On the other hand, a(n) = 2 if prime(n) is in A159352, which is conjectured to be infinite.
Record values: a(2) = 1, a(5) = 2, a(30) = 3, a(187) = 4, a(1346) = 5, a(10545) = 6, a(86538) = 7, a(733410) = 8.
(End)

Crossrefs

Cf. A154764 (1 odd digit), A155071 (2 odd digits), A030096 (all digits odd).

Programs

  • Maple
    seq(nops(select(type, convert(ithprime(i),base,10),odd)),i=1..100); # Robert Israel, Jan 12 2016
    # alternative
    A104638 := proc(n)
        local a,dgs,d ;
        ithprime(n) ;
        dgs := convert(%,base,10) ;
        a := 0 ;
        for d in dgs do
            a := a+modp(d,2) ;
        end do:
        a ;
    end proc:
    seq(A104638(n),n=1..40) ; # R. J. Mathar, Jul 13 2025
  • Mathematica
    Table[Count[IntegerDigits[Prime[n]],?OddQ],{n,100}] (* _Harvey P. Dale, Jan 22 2012 *)
    Table[Total[Mod[IntegerDigits[Prime[n]], 2]], {n, 100}] (* Vincenzo Librandi, Jan 13 2016 *)
  • PARI
    a(n)=vecsum(digits(prime(n)%2)) \\ Zak Seidov, Jan 12 2016

Formula

a(n) = A196564(A000040(n)). - Michel Marcus, Oct 05 2013

A108382 Primes p such that p's set of distinct digits is {1,3,7}.

Original entry on oeis.org

137, 173, 317, 1373, 1733, 3137, 3371, 7331, 11173, 11317, 11731, 13171, 13177, 13337, 13711, 17137, 17317, 17333, 17377, 17713, 17737, 31177, 31337, 31771, 33317, 33713, 37117, 37171, 37313, 37717, 71317, 71333, 71713, 73133, 73331
Offset: 1

Views

Author

Rick L. Shepherd, Jun 01 2005

Keywords

Crossrefs

Cf. A108383 ({1, 3, 9}), A108384 ({1, 7, 9}), A108385 ({3, 7, 9}), A108386 ({1, 3, 7, 9}), A030096 (Primes whose digits are all odd).

Programs

  • Maple
    S1[1] := {1}: S3[1]:= {3}: S7[1]:= {7}:
    S13[1]:= {}: S17[1]:= {}: S37[1]:={}:
    S137[1]:= {}:
    for n from 2 to 5 do
      S1[n]:= map(t -> 10*t+1, S1[n-1]);
      S3[n]:= map(t -> 10*t+3, S3[n-1]);
      S7[n]:= map(t -> 10*t+7, S7[n-1]);
      S13[n]:= map(t -> 10*t+1, S13[n-1] union S3[n-1]) union
               map(t -> 10*t+3, S13[n-1] union S1[n-1]);
      S17[n]:= map(t -> 10*t+1, S17[n-1] union S7[n-1]) union
               map(t -> 10*t+7, S17[n-1] union S1[n-1]);
      S37[n]:= map(t -> 10*t+3, S37[n-1] union S7[n-1]) union
               map(t -> 10*t+7, S37[n-1] union S3[n-1]);
      S137[n]:= map(t -> 10*t+1, S137[n-1] union S37[n-1]) union
                map(t -> 10*t+3, S137[n-1] union S17[n-1]) union
                map(t -> 10*t+7, S137[n-1] union S13[n-1]);
    od:
    sort(convert(`union`(seq(select(isprime,S137[n]),n=3..5)),list)); # Robert Israel, Jan 16 2019
  • Mathematica
    Select[Prime[Range[7300]],Union[IntegerDigits[#]]=={1,3,7}&] (* Harvey P. Dale, Jun 11 2013 *)

A108383 Primes p such that p's set of distinct digits is {1,3,9}.

Original entry on oeis.org

139, 193, 1193, 1319, 1399, 1913, 1931, 1933, 1993, 3119, 3191, 3319, 3391, 3911, 3919, 3931, 9133, 9311, 9319, 9391, 9931, 11393, 11399, 11933, 11939, 13339, 13399, 13913, 13931, 13933, 13999, 19139, 19319, 19333, 19391, 19913, 19993, 31139
Offset: 1

Views

Author

Rick L. Shepherd, Jun 01 2005

Keywords

Crossrefs

Cf. A108382 ({1, 3, 7}), A108384 ({1, 7, 9}), A108385 ({3, 7, 9}), A108386 ({1, 3, 7, 9}), A030096 (Primes whose digits are all odd).

Programs

  • Mathematica
    Select[(Table[FromDigits/@Tuples[{1,3,9},n],{n,3,5}]//Flatten),PrimeQ[#] && Min[ DigitCount[#,10,{1,3,9}]]>0&] (* Harvey P. Dale, Apr 09 2017 *)

A108384 Primes p such that p's set of distinct digits is {1,7,9}.

Original entry on oeis.org

179, 197, 719, 971, 1979, 1997, 7919, 9719, 9791, 11197, 11719, 11779, 11971, 17191, 17791, 17911, 17971, 17977, 19717, 19777, 19979, 19997, 71119, 71191, 71719, 71917, 71971, 71999, 77191, 77719, 79111, 91711, 91771, 91997, 97117, 97171
Offset: 1

Views

Author

Rick L. Shepherd, Jun 01 2005

Keywords

Crossrefs

Cf. A108382 ({1, 3, 7}), A108383 ({1, 3, 9}), A108385 ({3, 7, 9}), A108386 ({1, 3, 7, 9}), A030096 (Primes whose digits are all odd).

Programs

  • Mathematica
    Flatten[Table[Select[FromDigits/@Select[Tuples[{1,7,9},n],Union[#]=={1,7,9}&],PrimeQ],{n,3,5}]] (* Harvey P. Dale, Feb 15 2016 *)
  • PARI
    lista(nn) = forprime(p=179, nn, if(vecsort(digits(p), , 8)==[1, 7, 9], print1(p, ", "))) \\ Iain Fox, Oct 25 2017

A108385 Primes p such that p's set of distinct digits is {3,7,9}.

Original entry on oeis.org

379, 397, 739, 937, 3739, 3779, 3793, 3797, 7393, 7793, 7933, 7937, 7993, 9337, 9377, 9397, 9733, 9739, 9973, 33739, 33797, 33937, 33997, 37339, 37379, 37397, 37799, 37993, 37997, 39373, 39397, 39733, 39779, 39799, 39937, 39979, 73379, 73939
Offset: 1

Views

Author

Rick L. Shepherd, Jun 01 2005

Keywords

Crossrefs

Cf. A108382 ({1, 3, 7}), A108383 ({1, 3, 9}), A108384 ({1, 7, 9}), A108386 ({1, 3, 7, 9}), A030096 (Primes whose digits are all odd).

Programs

  • Mathematica
    Table[Select[FromDigits/@Select[Tuples[{3,7,9},n],SubsetQ[#,{3,7,9}]&], PrimeQ],{n,3,5}]//Flatten (* Harvey P. Dale, Sep 15 2016 *)

A091296 Semiprimes with odd digits.

Original entry on oeis.org

9, 15, 33, 35, 39, 51, 55, 57, 77, 91, 93, 95, 111, 115, 119, 133, 155, 159, 177, 319, 335, 339, 355, 371, 377, 391, 393, 395, 511, 515, 517, 519, 533, 535, 537, 551, 553, 559, 573, 579, 591, 597, 713, 717, 731, 737, 753, 755, 771, 779, 791, 793, 799, 913, 917
Offset: 1

Views

Author

Zak Seidov, Feb 22 2004

Keywords

Comments

Semiprimes with odd digits are more numerous than those with even digits, cf. A108636.

Crossrefs

Intersection of A001358 and A014261.

Programs

  • Mathematica
    Select[Range[1000], Plus@@Last/@FactorInteger[ # ]==2&&Union[OddQ/@IntegerDigits[ # ]]=={True}&]
    PrimeFactorExponentsAdded[n_] := Plus @@ Flatten[ Table[ #[[2]], {1}] & /@ FactorInteger[n]]; Select[ Range[ 938], PrimeFactorExponentsAdded[ # ] == 2 && Union[ OddQ /@ IntegerDigits[ # ]] == {True} &] (* Robert G. Wilson v, Feb 25 2004 *)
    Select[Range[1000], PrimeOmega[#]==2 && And@@OddQ[IntegerDigits[#]]&] (* Harvey P. Dale, Jul 12 2011 *)

Extensions

Corrected and extended by Ray Chandler and Robert G. Wilson v, Feb 25 2004
Edited by N. J. A. Sloane, Apr 20 2007

A066640 Numbers such that all divisors have only odd digits.

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 31, 33, 35, 37, 39, 51, 53, 55, 57, 59, 71, 73, 77, 79, 91, 93, 95, 97, 99, 111, 113, 117, 119, 131, 133, 137, 139, 151, 153, 155, 157, 159, 171, 173, 177, 179, 191, 193, 197, 199
Offset: 1

Views

Author

Amarnath Murthy, Dec 28 2001

Keywords

Comments

Is this sequence infinite? - Charles R Greathouse IV, Sep 07 2012

Examples

			77 = 11 * 7 belongs to this sequence but 75 does not as 25 (with a 2) divides 75.
		

Crossrefs

Subsequence of A014261. A030096 is a subsequence.

Programs

  • Mathematica
    Select[Range[250], And@@OddQ/@Flatten[IntegerDigits/@Divisors[ # ]]&]
  • PARI
    f(n)=vecmin(Vec(Vecsmall(Str(n)))%2)
    is(n)=fordiv(n,d,if(!f(d),return(0)));1 \\ Charles R Greathouse IV, Sep 07 2012
    
  • Python
    from itertools import islice, count
    from sympy import divisors
    def A066640(): return filter(lambda n: all(set(str(m)) <= {'1','3','5','7','9'} for m in divisors(n,generator=True)), count(1,2))
    A066640_list = list(islice(A066640(),20)) # Chai Wah Wu, Nov 22 2021

Extensions

Corrected and extended by Harvey P. Dale, Jan 01 2002

A090155 Primes of the form identical digits preceded by a 7.

Original entry on oeis.org

7, 71, 73, 79, 733, 7333, 79999, 733333, 799999, 71111111, 799999999, 79999999999, 79999999999999999999999999, 79999999999999999999999999999999999999999999999999
Offset: 1

Views

Author

Robert G. Wilson v, Nov 22 2003

Keywords

Crossrefs

Subsequence of A030096 and of A030291. Apart from the first term, a subsequence of A235154.

Programs

  • Mathematica
    Select[ FromDigits /@ Flatten[ Table[ PadRight[{7}, i, # ] & /@ {1, 2, 3, 4, 5, 6, 7, 8, 9}, {i, 2, 50}], 1], PrimeQ[ # ] &]
    Select[FromDigits/@Flatten[Table[PadRight[{7},i,#]&/@{1,3,7,9},{i,50}],1],PrimeQ[#]&]//Union (* Harvey P. Dale, Nov 22 2024 *)

A093172 Primes of the form 10^n - 3.

Original entry on oeis.org

7, 97, 997, 99999999999999997
Offset: 1

Views

Author

Rick L. Shepherd, Mar 26 2004

Keywords

Comments

Primes of the form (9*10^n - 27)/9. - Vincenzo Librandi, Nov 16 2010
Also primes of the form 9*R_n - 2, where R_n is the repunit (A002275) of length n.
The next term has 140 digits.
a(n) = 10^A089675(n) - 3 = 10^(A056662(n) + 1) - 3. - Farideh Firoozbakht, Nov 27 2013

Crossrefs

Subsequence of A020471 and hence of A030096.

Programs

  • Mathematica
    Do[If[PrimeQ[10^n - 3], Print[10^n - 3]], {n, 100}] (* Farideh Firoozbakht, Nov 27 2013 *)
    Select[Table[FromDigits[PadLeft[{7},n,9]],{n,25}],PrimeQ] (* Harvey P. Dale, Dec 12 2020 *)
  • PARI
    for(n=1,9, if(isprime(p=10^n-3), print1(p", "))) \\ Charles R Greathouse IV, Dec 13 2024

Extensions

Name shortened and old name moved to comments by Alex Ratushnyak, Apr 26 2012
Previous Showing 21-30 of 45 results. Next