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

A055559 Primes of the form 2999...999.

Original entry on oeis.org

2, 29, 2999, 2999999, 29999999, 29999999999999999999, 2999999999999999999999999999, 29999999999999999999999999999999999999999999, 29999999999999999999999999999999999999999999999999999999
Offset: 1

Views

Author

Labos Elemer, Jul 10 2000

Keywords

Comments

a(9)=29999999999999999999999999999999999999999999999999999999. - Vincenzo Librandi, Aug 07 2010
The next term (a(10)) has 208 digits, and a(11) has 1312 digits. - Harvey P. Dale, Jan 22 2023

Examples

			3*10^k - 1 is prime for k = 0, 1, 3, 6, 7, 19, ... (A056703). k gives the number of 9's in these numbers.
		

Crossrefs

Programs

  • Mathematica
    Select[Table[FromDigits[PadRight[{2}, n, 9]], {n, 60}], PrimeQ] (* Harvey P. Dale, Jan 22 2023 *)

Formula

a(n) = A198698(A056703(n)) = 3*10^A056703(n) - 1. - Amiram Eldar, Mar 16 2025

Extensions

Erroneous Formula entry removed by Jon E. Schoenfield, Jan 14 2018
Extended by Harvey P. Dale, Jan 22 2023

A129990 Primes p such that the smallest integer whose sum of decimal digits is p is prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 19, 23, 29, 31, 41, 43, 71, 79, 97, 173, 179, 257, 269, 311, 389, 691, 4957, 8423, 11801, 14621, 25621, 26951, 38993, 75743, 102031, 191671, 668869
Offset: 1

Views

Author

J. M. Bergot, Jun 14 2007

Keywords

Examples

			The smallest integer whose sum of digits is 17 is 89; 89 is prime, therefore 17 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[1000]],PrimeQ[FromDigits[Join[{Mod[ #,9]},Table[9,{i,1,Floor[ #/9]}]]]] &]
  • Python
    from itertools import islice
    from sympy import isprime, nextprime
    def A051885(n): return ((n%9)+1)*10**(n//9)-1 # from Chai Wah Wu
    def agen(startp=2):
        p = startp
        while True:
            if isprime(A051885(p)): yield p
            p = nextprime(p)
    print(list(islice(agen(), 23))) # Michael S. Branicky, Jul 27 2022
    
  • Sage
    sorted( filter(is_prime, sum(([9*t+k for t in oeis(seq).first_terms()] for seq,k in (('A002957',1), ('A056703',2), ('A056712',4), ('A056716',5), ('A056721',7), ('A056725',8))), [3])) ) # Max Alekseyev, Feb 05 2025

Formula

Primes p such that (p mod 9 + 1) * 10^[p/9] - 1 is prime. Therefore the sequence consists of the term 3 and the primes of the forms A002957(k)*9+1, A056703(k)*9+2, A056712(k)*9+4, A056716(k)*9+5, A056721(k)*9+7, A056725(k)*9+8. - Max Alekseyev, Nov 09 2009

Extensions

Edited, corrected and extended by Stefan Steinerberger, Jun 23 2007
Extended by D. S. McNeil, Mar 20 2009
a(29)-a(33) from Max Alekseyev, Nov 09 2009
Showing 1-2 of 2 results.