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

A309597 a(n) is the A325907(n)-th triangular number.

Original entry on oeis.org

6, 666, 5656566, 555665666566566, 5555555666655656666556566566566, 555555555555555666666665555665666666666555566566666556566566566
Offset: 1

Views

Author

Seiichi Manyama, Sep 14 2019

Keywords

Comments

a(n) decimal expansion includes A141023(n-1) 5's and A052950(n) 6's in digits.
All terms are elements of A213516.

Examples

			a(1) =               6 =               6 +        0 +    0 * 10^1.
a(2) =             666 =             556 +       10 +    1 * 10^2.
a(3) =         5656566 =         5555556 +     1010 +   10 * 10^4.
a(4) = 555665666566566 = 555555555555556 + 11011010 + 1101 * 10^8.
------------------------------------------------------------------
a(2) =                                 6 6 6. (            3 6's)
                                       - -
a(3) =                           5 65 65  66. ( 3 5's and  4 6's)
                                 - -- --
a(4) =                  555 6656 6656   6566. ( 6 5's and  9 6's)
                        --- ---- ----
a(5) = 5555555 66665565 66665565    66566566. (15 5's and 16 6's)
       ------- -------- --------
		

Crossrefs

Programs

  • Ruby
    def A325907(n)
      a = [3]
      (2..n).each{|i|
        j = 10 ** (2 ** (i - 2))
        a << (j + 3) * (j - 1) / 3 - a[-1]
      }
      a
    end
    def A309597(n)
      A325907(n).map{|i| i * (i + 1) / 2}
    end
    p A309597(10)

Formula

a(n) = A000217(A325907(n)).
a(n) = A093142(2^n - 1) + A325493(n-1) + A325910(n-1) * 10^(2^(n-1)).

A327266 Product of A325907(n) and its 9's complement.

Original entry on oeis.org

18, 2268, 22316868, 2222332266866868, 22222222333322316666886866866868, 2222222222222222333333332222332266666666888866866666886866866868
Offset: 1

Views

Author

Seiichi Manyama, Sep 15 2019

Keywords

Examples

			a(1) =        3 *        6 =         18.
a(2) =       63 *       36 =        2268.
a(3) =     3363 *     6636 =      22316868.
a(4) = 66663363 * 33336636 =  2222332266866868.
-----------------------------------------------
a(1) =        18        =        18        - 2 *        0 +    0 * 10^1.
a(2) =       2268       =       2188       - 2 *       10 +    1 * 10^2.
a(3) =     22316868     =     22218888     - 2 *     1010 +   10 * 10^4.
a(4) = 2222332266866868 = 2222222188888888 - 2 * 11011010 + 1101 * 10^8.
		

Crossrefs

Programs

  • Ruby
    def A(n)
      a = [3, 6]
      b = ([[3]] + (1..n - 1).map{|i| [a[i % 2]] * (2 ** (i - 1))}).reverse.join.to_i
      b * (10 ** (2 ** (n - 1)) - 1 - b)
    end
    def A327266(n)
      (1..n).map{|i| A(i)}
    end
    p A327266(6)

Formula

a(n) = A084021(A325907(n)) = A325907(n) * (A002283(2^(n-1)) - A325907(n)).
a(n) = A327294(n) - 10^(2^(n-1)) = a(n) = (2 * 10^(2^n) - 3 * 10^(2^(n-1)) - 8)/9 - 2 * A325493(n-1) + A325910(n-1) * 10^(2^(n-1)).

A327294 a(n) = (A325907(n) + 1) * (10^(2^(n-1)) - A325907(n)).

Original entry on oeis.org

28, 2368, 22326868, 2222332366866868, 22222222333322326666886866866868, 2222222222222222333333332222332366666666888866866666886866866868
Offset: 1

Views

Author

Seiichi Manyama, Sep 16 2019

Keywords

Comments

a(n) is composed of digits {2,3,6,8}.

Examples

			a(1) =                2 * 10^1  +                8.
a(2) =               23 * 10^2  +               68.
a(3) =             2232 * 10^4  +             6868.
a(4) =         22223323 * 10^8  +         66866868.
a(5) = 2222222233332232 * 10^16 + 6666886866866868.
And
                      2 = 2 * (10^1  - 1)/9 +        0.
                     23 = 2 * (10^2  - 1)/9 +        1.
                   2232 = 2 * (10^4  - 1)/9 +       10.
               22223323 = 2 * (10^8  - 1)/9 +     1101.
       2222222233332232 = 2 * (10^16 - 1)/9 + 11110010.
And
                      8 = 8 * (10^1  - 1)/9 - 2 *                0.
                     68 = 8 * (10^2  - 1)/9 - 2 *               10.
                   6868 = 8 * (10^4  - 1)/9 - 2 *             1010.
               66866868 = 8 * (10^8  - 1)/9 - 2 *         11011010.
       6666886866866868 = 8 * (10^16 - 1)/9 - 2 * 1111001011011010.
		

Crossrefs

Programs

  • Ruby
    def A(n)
      a = [3, 6]
      b = ([[3]] + (1..n - 1).map{|i| [a[i % 2]] * (2 ** (i - 1))}).reverse.join.to_i
      (b + 1) * (10 ** (2 ** (n - 1)) - b)
    end
    def A327294(n)
      (1..n).map{|i| A(i)}
    end
    p A327294(6)

Formula

a(n) = 2 * (10^(2^n) + 3 * 10^(2^(n-1)) - 4)/9 - 2 * A325493(n-1) + A325910(n-1) * 10^(2^(n-1)).

A213517 Numbers n such that the triangular number n*(n+1)/2 has only 1 or 2 different digits in base 10.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 18, 24, 34, 36, 44, 58, 66, 77, 100, 101, 105, 109, 114, 132, 141, 363, 666, 714, 816, 1000, 1095, 1287, 1332, 1541, 3363, 6666, 10000, 10114, 13332, 66666, 100000, 133332, 666666, 1000000, 1333332, 6666666, 10000000
Offset: 1

Views

Author

T. D. Noe, Jun 21 2012

Keywords

Comments

The list of triangular numbers containing only one digit (A045914) is finite. This list is infinite because numbers like 133332, 666666, and 1000000 occur an infinite number of times.
A118668(a(n)) <= 2. - Reinhard Zumkeller, Jul 11 2015
A325907(n) is a term. - Seiichi Manyama, Sep 14 2019

Crossrefs

Programs

  • Haskell
    a213517 n = a213517_list !! (n-1)
    a213517_list = filter ((<= 2) . a118668) [0..]
    -- Reinhard Zumkeller, Jul 11 2015
    
  • Mathematica
    t = {}; Do[tri = n*(n+1)/2; If[Length[Union[IntegerDigits[tri]]] <= 2, AppendTo[t, n]], {n, 0, 10^5}]; t
  • PARI
    for(k=0, 1e8, if(#Set(digits(k*(k+1)/2))<=2, print1(k", "))) \\ Seiichi Manyama, Sep 15 2019

A213518 Numbers k such that the triangular number k*(k+1)/2 has 2 different digits in base 10.

Original entry on oeis.org

4, 5, 6, 7, 8, 9, 12, 13, 18, 24, 34, 44, 58, 66, 77, 100, 101, 105, 109, 114, 132, 141, 363, 666, 714, 816, 1000, 1095, 1287, 1332, 1541, 3363, 6666, 10000, 10114, 13332, 66666, 100000, 133332, 666666, 1000000, 1333332, 6666666, 10000000, 13333332, 33336636, 66666666, 100000000
Offset: 1

Views

Author

T. D. Noe, Jun 22 2012

Keywords

Comments

The list of triangular numbers containing only one digit (A045914) is finite. This list is infinite because numbers like 133332, 666666, and 1000000 occur an infinite number of times.
A118668(a(n)) = 2. - Reinhard Zumkeller, Jul 11 2015
For n > 2, A325907(n) is a term. - Seiichi Manyama, Sep 15 2019

Crossrefs

Cf. A062691 (the corresponding triangular numbers), A213516, A213517, A325907.
Cf. A118668.
Cf. A187127.

Programs

  • Haskell
    a213518 n = a213518_list !! (n-1)
    a213518_list = filter ((== 2) . a118668) [0..]
    -- Reinhard Zumkeller, Jul 11 2015
    
  • Mathematica
    t = {}; Do[tri = n*(n+1)/2; If[Length[Union[IntegerDigits[tri]]] == 2, AppendTo[t, n]], {n, 10^5}]; t
  • PARI
    for(k=0, 1e8, if(#Set(digits(k*(k+1)/2))==2, print1(k", "))) \\ Seiichi Manyama, Sep 15 2019

Extensions

a(45)-a(48) from Seiichi Manyama, Sep 15 2019

A325906 a(n) = ( (-1)^n * Sum_{k=0..n-2} (-1)^k*10^(2^k) + 10^(2^(n-1)) - ((-1)^n+3)/2 )/9.

Original entry on oeis.org

1, 12, 1121, 11112212, 1111111122221121, 11111111111111112222222211112212, 1111111111111111111111111111111122222222222222221111111122221121
Offset: 1

Views

Author

Seiichi Manyama, Sep 08 2019

Keywords

Examples

			n |       a(n)       |    A325910(n)
--+------------------+-----------------
1 |                1 |                1
2 |               12 |               10
3 |             1121 |             1101
4 |         11112212 |         11110010
5 | 1111111122221121 | 1111111100001101
		

Crossrefs

Programs

  • Mathematica
    a[n_] := ((-1)^n * Sum[(-1)^k * 10^(2^k), {k, 0, n - 2}] + 10^(2^(n - 1)) - ((-1)^n + 3)/2)/9; Array[a, 7] (* Amiram Eldar, May 07 2021 *)
  • PARI
    {a(n) = ((-1)^n*sum(k=0, n-2, (-1)^k*10^2^k)+10^2^(n-1)-((-1)^n+3)/2)/9}
Showing 1-6 of 6 results.