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.

A183187 Numbers k such that 10^(2k+1)-10^k-1 is prime.

Original entry on oeis.org

26, 378, 1246, 1798, 2917, 23034, 47509, 52140, 67404
Offset: 1

Views

Author

Ray Chandler, Dec 28 2010

Keywords

Comments

944264 is a term but its position is not known. - Jeppe Stig Nielsen, Jan 12 2024
a(10) > 300000. - Serge Batalov, Jan 17 2024

References

  • C. Caldwell and H. Dubner, "Journal of Recreational Mathematics", Volume 28, No. 1, 1996-97, pp. 1-9.

Crossrefs

Programs

  • Mathematica
    Do[If[PrimeQ[10^(2n + 1) - 10^n - 1], Print[n]], {n, 3000}]
  • PARI
    for(n=1,1e3,if(ispseudoprime(10^(2*n+1)-10^n-1),print1(n", "))) \\ Charles R Greathouse IV, Jul 15 2011

Formula

a(n) = (A077794(n)-1)/2.

A181965 a(n) = 10^(2n+1) - 10^n - 1.

Original entry on oeis.org

8, 989, 99899, 9998999, 999989999, 99999899999, 9999998999999, 999999989999999, 99999999899999999, 9999999998999999999, 999999999989999999999, 99999999999899999999999, 9999999999998999999999999, 999999999999989999999999999, 99999999999999899999999999999, 9999999999999998999999999999999
Offset: 0

Views

Author

Ivan Panchenko, Apr 04 2012

Keywords

Comments

n 9's followed by an 8 followed by n 9's.
See A183187 = {26, 378, 1246, 1798, 2917, ...} for the indices of primes.

Crossrefs

Cf. (A077794-1)/2 = A183187 (indices of primes).
Cf. A002275 (repunits R_n = (10^n-1)/9), A002283 (9*R_n), A011557 (10^n).
Cf. A138148 (cyclops numbers with binary digits only), A002113 (palindromes).
Cf. A332190 .. A332197 (variants with different middle digit 0, ..., 7).

Programs

  • Maple
    A181965 := n -> 10^(2*n+1)-1-10^n; # M. F. Hasler, Feb 08 2020
  • Mathematica
    Array[10^(2 # + 1) - 1- 10^# &, 15, 0] (*  M. F. Hasler, Feb 08 2020 *)
    Table[With[{c=PadRight[{},n,9]},FromDigits[Join[c,{8},c]]],{n,0,20}] (* Harvey P. Dale, Jun 07 2021 *)
  • PARI
    apply( {A181965(n)=10^(n*2+1)-1-10^n}, [0..15]) \\ M. F. Hasler, Feb 08 2020
    
  • Python
    def A181965(n): return 10**(n*2+1)-1-10^n # M. F. Hasler, Feb 08 2020

Formula

From M. F. Hasler, Feb 08 2020: (Start)
a(n) = 9*A138148(n) + 8*10^n = A002283(2n+1) - A011557(10^n).
G.f.: (8 + 101*x - 1000*x^2)/((1 - x)(1 - 10*x)(1 - 100*x)).
a(n) = 111*a(n-1) - 1110*a(n-2) + 1000*a(n-3) for n > 2. (End)

Extensions

Edited and extended to a(0) = 8 by M. F. Hasler, Feb 10 2020
Showing 1-2 of 2 results.