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

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

A036950 Smallest n-digit prime containing only the digits 7 and 9, or 0 if no such prime exists.

Original entry on oeis.org

7, 79, 797, 0, 77797, 777977, 7777997, 77779799, 777777799, 7777779799, 77777779979, 777777779777, 7777777779977, 77777777777977, 777777777779797, 7777777777797799, 77777777777777797, 777777777777797977
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

A112785 Members of twin prime pairs using only digits 7 and 9.

Original entry on oeis.org

79997, 79999, 777977, 777979, 7977797, 7977799, 77997779, 77997977, 77997979, 99777779, 799999799, 977797979, 977999777, 977999779, 979797779, 999799979, 7777997999, 7797799979, 7979997797, 7979997799, 7999777997, 7999777999, 7999797977, 7999797979
Offset: 1

Views

Author

Amarnath Murthy, Jan 02 2006

Keywords

Crossrefs

Subsequence of A020471.

Programs

  • Mathematica
    Select[Flatten[Table[FromDigits/@Tuples[{7,9},n],{n,2,11}]],PrimeQ[#] && Or@@PrimeQ[#+{2,-2}]&] (* Harvey P. Dale, Nov 06 2013 *)
  • PARI
    istwin(n)=ispseudoprime(n)&&ispseudoprime(if(n%3==1,n-2,n+2))
    do(D)=my(v=List(),t); for(d=5,D,for(i=0,2^d-1, t=sum(j=0,d-1, if(bittest(i,j),9,7)*10^j); if(istwin(t), listput(v,t)))); Vec(v)
    \\ Charles R Greathouse IV, Nov 06 2013

Extensions

Edited and extended by D. S. McNeil, Nov 27 2010
Corrected and extended by Harvey P. Dale, Nov 06 2013

A285011 Numbers with digits 7 and 9 only.

Original entry on oeis.org

7, 9, 77, 79, 97, 99, 777, 779, 797, 799, 977, 979, 997, 999, 7777, 7779, 7797, 7799, 7977, 7979, 7997, 7999, 9777, 9779, 9797, 9799, 9977, 9979, 9997, 9999, 77777, 77779, 77797, 77799, 77977, 77979, 77997, 77999, 79777, 79779, 79797, 79799, 79977, 79979
Offset: 1

Views

Author

Jaroslav Krizek, Apr 08 2017

Keywords

Crossrefs

Prime terms are in A020471.
Numbers with digits 7 and k only for k = 0 - 6 and 8 - 9: A204094 (k = 0), A276039 (k = 1), A284921 (k = 2), A143967 (k = 3), A284971 (k = 4), A284380 (k = 5), A256292 (k = 6), A256340 (k = 8), this sequence (k = 9).

Programs

  • Magma
    [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {7, 9}];
    
  • Mathematica
    Flatten@ Table[FromDigits /@ Tuples[{7, 9}, n], {n, 5}] (* Giovanni Resta, Apr 10 2017 *)
  • PARI
    a(n,{p=[7,9]})={my(v=binary(n+1));fromdigits(vector(#v-1,i,p[2]*v[i+1]+p[1]*!v[i+1]))} \\ R. J. Cano, Apr 09 2017
    
  • Python
    def a(n): return int(bin(n+1)[3:].replace('0', '7').replace('1', '9'))
    print([a(n) for n in range(1, 45)]) # Michael S. Branicky, Jul 09 2021
Previous Showing 11-14 of 14 results.