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.

A332191 a(n) = 10^(2n+1) - 1 - 8*10^n.

Original entry on oeis.org

1, 919, 99199, 9991999, 999919999, 99999199999, 9999991999999, 999999919999999, 99999999199999999, 9999999991999999999, 999999999919999999999, 99999999999199999999999, 9999999999991999999999999, 999999999999919999999999999, 99999999999999199999999999999, 9999999999999991999999999999999
Offset: 0

Views

Author

M. F. Hasler, Feb 08 2020

Keywords

Comments

See A183184 = {1, 5, 13, 43, 169, 181, ...} for the indices of primes.

Crossrefs

Cf. (A077776-1)/2 = A183184: 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. A332121 .. A332181 (variants with different repeated digit 2, ..., 8).
Cf. A332190 .. A332197, A181965 (variants with different middle digit 0, ..., 8).

Programs

  • Maple
    A332191 := n -> 10^(n*2+1)-1-8*10^n;
  • Mathematica
    Array[ 10^(2 # + 1)-1-8*10^# &, 15, 0]
  • PARI
    apply( {A332191(n)=10^(n*2+1)-1-8*10^n}, [0..15])
    
  • Python
    def A332191(n): return 10**(n*2+1)-1-8*10^n

Formula

a(n) = 9*A138148(n) + 10^n.
G.f.: (1 + 808*x - 1700*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.

A077776 Numbers k such that (10^k - 1) - 8*10^floor(k/2) is a palindromic wing prime (a.k.a. near-repdigit palindromic prime).

Original entry on oeis.org

3, 11, 27, 87, 339, 363, 3159, 36155, 45305, 314727
Offset: 1

Views

Author

Patrick De Geest, Nov 16 2002

Keywords

Comments

Prime versus probable prime status and proofs are given in the author's table.

Examples

			27 is a term because (10^27 - 1) - 8*10^13 = 999999999999919999999999999.
		

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^n - 8*10^Floor[n/2] - 1], Print[n]], {n, 3, 1000, 2}] (* Robert G. Wilson v, Dec 16 2005 *)

Formula

a(n) = 2*A183184(n) + 1.

Extensions

One more term from PWP table added by Patrick De Geest, Nov 05 2014
Name corrected by Jon E. Schoenfield, Oct 31 2018

A332181 a(n) = 8*(10^(2n+1)-1)/9 - 7*10^n.

Original entry on oeis.org

1, 818, 88188, 8881888, 888818888, 88888188888, 8888881888888, 888888818888888, 88888888188888888, 8888888881888888888, 888888888818888888888, 88888888888188888888888, 8888888888881888888888888, 888888888888818888888888888, 88888888888888188888888888888, 8888888888888881888888888888888
Offset: 0

Views

Author

M. F. Hasler, Feb 08 2020

Keywords

Crossrefs

Cf. (A077776-1)/2 = A183184: indices of primes.
Cf. A002275 (repunits R_n = (10^n-1)/9), A002282 (8*R_n), A011557 (10^n).
Cf. A138148 (cyclops numbers with binary digits only).
Cf. A332121 .. A332191 (variants with different repeated digit 2, ..., 9).
Cf. A332180 .. A332189 (variants with different middle digit 0, ..., 9).

Programs

  • Maple
    A332181 := n -> 8*(10^(2*n+1)-1)/9-7*10^n;
  • Mathematica
    Array[8 (10^(2 # + 1)-1)/9 - 7*10^# &, 15, 0]
  • PARI
    apply( {A332181(n)=10^(n*2+1)\9*8-7*10^n}, [0..15])
    
  • Python
    def A332181(n): return 10**(n*2+1)//9*8-7*10**n

Formula

a(n) = 8*A138148(n) + 10^n = A002282(2n+1) - 7*10^n.
G.f.: (1 + 707*x - 1500*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.

A331815 Numbers k such that 10^(2*k) - 8*10^(k-1) - 1 is prime.

Original entry on oeis.org

3, 4, 132, 471, 1935, 4258, 9444
Offset: 1

Views

Author

Eder Vanzei, Jan 27 2020

Keywords

Comments

Also numbers k such that the concatenation (k 9's)1(k-1 9's) is prime.

Examples

			3 is a term because 999199 is prime.
4 is a term because 99991999 is prime.
		

Crossrefs

Cf. A000040.
Cf. A077776 = A183184*2+1: palindromic near-repdigit primes 9..919..9.

Programs

  • Mathematica
    Select[Range[500], PrimeQ[10^(2*#) - 8*10^(#-1) - 1] &] (* Amiram Eldar, Jan 28 2020 *)
  • PARI
    (is_A331815(n)=ispseudoprime(100^n-8*10^(n-1)-1)); for(n=1, 9999, is_A331815(n)&&print1(n", "))

Extensions

a(7) from Giovanni Resta, Jan 28 2020
Showing 1-4 of 4 results.