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.

A332112 a(n) = (10^(2n+1)-1)/9 + 10^n.

Original entry on oeis.org

2, 121, 11211, 1112111, 111121111, 11111211111, 1111112111111, 111111121111111, 11111111211111111, 1111111112111111111, 111111111121111111111, 11111111111211111111111, 1111111111112111111111111, 111111111111121111111111111, 11111111111111211111111111111, 1111111111111112111111111111111
Offset: 0

Views

Author

M. F. Hasler, Feb 09 2020

Keywords

Comments

a(0) = 2 is the only prime in this sequence, since all other terms factor as a(n) = R(n+1)*(10^n+1), where R(n) = (10^n-1)/9.

Crossrefs

Cf. A002275 (repunits R_n = (10^n-1)/9), A011557 (10^n).
Cf. A138148 (cyclops numbers with binary digits), A002113 (palindromes).
Cf. A332132 .. A332192 (variants with different repeated digit 3, ..., 9).
Cf. A332113 .. A332119 (variants with different middle digit 3, ..., 9).
Cf. A331860 & A331861 (indices of primes in non-palindromic variants).

Programs

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

Formula

a(n) = A138148(n) + 2*10^n = A002275(2n+1) + 10^n.
G.f.: (2 - 101*x)/((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.

A332164 a(n) = 6*(10^(2*n+1)-1)/9 - 2*10^n.

Original entry on oeis.org

4, 646, 66466, 6664666, 666646666, 66666466666, 6666664666666, 666666646666666, 66666666466666666, 6666666664666666666, 666666666646666666666, 66666666666466666666666, 6666666666664666666666666, 666666666666646666666666666, 66666666666666466666666666666, 6666666666666664666666666666666
Offset: 0

Views

Author

M. F. Hasler, Feb 09 2020

Keywords

Crossrefs

Cf. A002275 (repunits R_n = (10^n-1)/9), A002280 (6*R_n), A011557 (10^n).
Cf. A138148 (cyclops numbers with binary digits), A002113 (palindromes).
Cf. A332114 .. A332194 (variants with different repeated digit 1, ..., 9).
Cf. A332160 .. A332169 (variants with different middle digit 0, ..., 9).

Programs

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

Formula

a(n) = 6*A138148(n) + 4*10^n = A002280(2n+1) - 2*10^n = 2*A332132(n).
G.f.: (4 + 202*x - 800*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.
Showing 1-2 of 2 results.