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

A374361 Irregular table T(n, k), n >= 0, 0 <= k < A120880(n), read by rows; the n-th row contains the terms t of A005836 such that n - t also belongs to A005836.

Original entry on oeis.org

0, 0, 1, 1, 0, 3, 0, 1, 3, 4, 1, 4, 3, 3, 4, 4, 0, 9, 0, 1, 9, 10, 1, 10, 0, 3, 9, 12, 0, 1, 3, 4, 9, 10, 12, 13, 1, 4, 10, 13, 3, 12, 3, 4, 12, 13, 4, 13, 9, 9, 10, 10, 9, 12, 9, 10, 12, 13, 10, 13, 12, 12, 13, 13, 0, 27, 0, 1, 27, 28, 1, 28, 0, 3, 27, 30, 0, 1, 3, 4, 27, 28, 30, 31
Offset: 0

Views

Author

Rémy Sigrist, Jul 06 2024

Keywords

Comments

In other words, we partition n into pairs of terms of A005836 and list the corresponding terms to get the n-th row.

Examples

			Triangle T(n, k) begins:
  n   n-th row
  --  -----------
   0  0
   1  0, 1
   2  1
   3  0, 3
   4  0, 1, 3, 4
   5  1, 4
   6  3
   7  3, 4
   8  4
   9  0, 9
  10  0, 1, 9, 10
  11  1, 10
  12  0, 3, 9, 12
		

Crossrefs

See A374354 for a similar sequence.

Programs

  • PARI
    row(n) = { my (r = [0], t = 1, d); while (n, d = n % 3; n \= 3; if (d==1, r = concat(r, [v + t | v <- r]), d==2, r = [v + t | v <- r]); t *= 3;); return (r); }

Formula

T(n, 0) = 0 iff n belongs to A005836.
T(n, k) + T(n, A120880(k)-1-k) = n.
T(n, 0) = A374362(n).
T(n, A120880(k)-1) = A374363(n).

A374791 Irregular triangle T(n, k), n >= 0, k = 1..A120880(n), read by rows; the n-th lists the integers m such that A374560(m) = n.

Original entry on oeis.org

0, 1, 2, 4, 3, 5, 6, 7, 8, 9, 11, 13, 12, 17, 18, 24, 10, 14, 15, 16, 19, 20, 22, 26, 21, 23, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 39, 41, 43, 38, 42, 47, 48, 51, 52, 58, 62, 40, 49, 50, 60, 59, 61, 70, 71, 72, 73, 83, 85, 84, 97, 98, 112, 36, 44, 45, 46, 53, 54
Offset: 0

Views

Author

Rémy Sigrist, Jul 20 2024

Keywords

Comments

A374560 corresponds to a square array, but we consider it here as a flat sequence (when its values are read according along its antidiagonals).
As a flat sequence, this is a permutation of the nonnegative integers with inverse A374792.

Examples

			Triangle T(n, k) begins:
  n   n-th row
  --  ------------------------------
   0  0
   1  1, 2
   2  4
   3  3, 5
   4  6, 7, 8, 9
   5  11, 13
   6  12
   7  17, 18
   8  24
   9  10, 14
  10  15, 16, 19, 20
  11  22, 26
  12  21, 23, 25, 27
  13  28, 29, 30, 31, 32, 33, 34, 35
  14  37, 39, 41, 43
  15  38, 42
		

Crossrefs

Cf. A120880, A374560, A374792 (inverse).

Programs

  • PARI
    \\ See Links section.

A309677 G.f. A(x) satisfies: A(x) = A(x^3) / (1 - x)^2.

Original entry on oeis.org

1, 2, 3, 6, 9, 12, 18, 24, 30, 42, 54, 66, 87, 108, 129, 162, 195, 228, 279, 330, 381, 456, 531, 606, 711, 816, 921, 1068, 1215, 1362, 1563, 1764, 1965, 2232, 2499, 2766, 3120, 3474, 3828, 4290, 4752, 5214, 5805, 6396, 6987, 7740, 8493, 9246, 10194, 11142
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 12 2019

Keywords

Comments

Self-convolution of A062051.

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<0, 0,
          b(n, i-1)+(p-> `if`(p>n, 0, b(n-p, i)))(3^i)))
        end:
    a:= n-> add(b(j, ilog[3](j))*b(n-j, ilog[3](n-j)), j=0..n):
    seq(a(n), n=0..52);  # Alois P. Heinz, Aug 12 2019
  • Mathematica
    nmax = 52; A[] = 1; Do[A[x] = A[x^3]/(1 - x)^2 + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
    nmax = 52; CoefficientList[Series[Product[1/(1 - x^(3^k))^2, {k, 0, Floor[Log[3, nmax]] + 1}], {x, 0, nmax}], x]

Formula

G.f.: Product_{k>=0} 1/(1 - x^(3^k))^2.

A374363 a(n) is the greatest term t <= n of A005836 such that n - t also belongs to A005836.

Original entry on oeis.org

0, 1, 1, 3, 4, 4, 3, 4, 4, 9, 10, 10, 12, 13, 13, 12, 13, 13, 9, 10, 10, 12, 13, 13, 12, 13, 13, 27, 28, 28, 30, 31, 31, 30, 31, 31, 36, 37, 37, 39, 40, 40, 39, 40, 40, 36, 37, 37, 39, 40, 40, 39, 40, 40, 27, 28, 28, 30, 31, 31, 30, 31, 31, 36, 37, 37, 39, 40
Offset: 0

Views

Author

Rémy Sigrist, Jul 06 2024

Keywords

Comments

To compute a(n): in the ternary expansion of n, 2's by 1's.

Examples

			The first terms, in decimal and in ternary, are:
  n   a(n)  ter(n)  ter(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     1       1          1
   2     1       2          1
   3     3      10         10
   4     4      11         11
   5     4      12         11
   6     3      20         10
   7     4      21         11
   8     4      22         11
   9     9     100        100
  10    10     101        101
  11    10     102        101
  12    12     110        110
  13    13     111        111
  14    13     112        111
  15    12     120        110
		

Crossrefs

Programs

  • PARI
    a(n) = fromdigits(apply(d -> [0, 1, 1][1+d], digits(n, 3)), 3)

Formula

a(n) = T(n, A120880(k)-1).
a(n) = n - A374362(n).
a(n) <= n with equality iff n belongs to A005836.
a(n) = A005836(1+A289831(n)).

A374560 Square array A(n, k), n, k >= 0, read by antidiagonals; A(n, k) = A005836(n+1) + A005836(k+1).

Original entry on oeis.org

0, 1, 1, 3, 2, 3, 4, 4, 4, 4, 9, 5, 6, 5, 9, 10, 10, 7, 7, 10, 10, 12, 11, 12, 8, 12, 11, 12, 13, 13, 13, 13, 13, 13, 13, 13, 27, 14, 15, 14, 18, 14, 15, 14, 27, 28, 28, 16, 16, 19, 19, 16, 16, 28, 28, 30, 29, 30, 17, 21, 20, 21, 17, 30, 29, 30, 31, 31, 31, 31, 22, 22, 22, 22, 31, 31, 31, 31
Offset: 0

Views

Author

Rémy Sigrist, Jul 20 2024

Keywords

Comments

For any v >= 0, the value v appears A120880(v) times.

Examples

			Array A(n, k) begins:
  n\k |  0   1   2   3   4   5   6   7   8   9  10  11  12
  ----+---------------------------------------------------
    0 |  0   1   3   4   9  10  12  13  27  28  30  31  36
    1 |  1   2   4   5  10  11  13  14  28  29  31  32  37
    2 |  3   4   6   7  12  13  15  16  30  31  33  34  39
    3 |  4   5   7   8  13  14  16  17  31  32  34  35  40
    4 |  9  10  12  13  18  19  21  22  36  37  39  40  45
    5 | 10  11  13  14  19  20  22  23  37  38  40  41  46
    6 | 12  13  15  16  21  22  24  25  39  40  42  43  48
    7 | 13  14  16  17  22  23  25  26  40  41  43  44  49
    8 | 27  28  30  31  36  37  39  40  54  55  57  58  63
    9 | 28  29  31  32  37  38  40  41  55  56  58  59  64
   10 | 30  31  33  34  39  40  42  43  57  58  60  61  66
   11 | 31  32  34  35  40  41  43  44  58  59  61  62  67
   12 | 36  37  39  40  45  46  48  49  63  64  66  67  72
		

Crossrefs

Programs

  • PARI
    A(n, k) = fromdigits(binary(n), 3) + fromdigits(binary(k), 3)

Formula

A(n, k) = A(k, n).
A(2*n, 2*k) = 3*A(n, k).

A205565 Number of ways of writing n = u + v with u <= v, and u,v having in ternary representation no 3.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 4, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 4, 2, 1, 2, 1, 2, 4, 2, 4, 8, 4, 2, 4, 2, 1, 2, 1, 2, 4, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 4, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 4
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 28 2012

Keywords

Examples

			a(30) = #{0+30, 3+27} = 2;
a(31) = #{0+31, 1+30, 3+28, 4+27} = 4;
a(32) = #{1+31, 4+28} = 2;
a(33) = #{3+30} = 1;
a(34) = #{3+31, 4+30} = 2;
a(35) = #{4+31} = 1;
a(36) = #{0+36, 9+27} = 2;
a(37) = #{0+37, 1+36, 9+28, 10+27} = 4;
a(38) = #{1+37, 10+28} = 2;
a(39) = #{0+39, 3+36, 9+30, 12+27} = 4;
a(40) = #{0+40, 1+39, 3+37, 4+36, 9+31, 10+30, 12+28, 13+27} = 8.
		

Crossrefs

Programs

  • Haskell
    a205565 n = sum $ map (a039966 . (n -)) $
                      takeWhile (<= n `div` 2) a005836_list

A120879 G.f. satisfies: A(x) = A(x^3)*(1 + 3*x + 2*x^2).

Original entry on oeis.org

1, 3, 2, 3, 9, 6, 2, 6, 4, 3, 9, 6, 9, 27, 18, 6, 18, 12, 2, 6, 4, 6, 18, 12, 4, 12, 8, 3, 9, 6, 9, 27, 18, 6, 18, 12, 9, 27, 18, 27, 81, 54, 18, 54, 36, 6, 18, 12, 18, 54, 36, 12, 36, 24, 2, 6, 4, 6, 18, 12, 4, 12, 8, 6, 18, 12, 18, 54, 36, 12, 36, 24, 4, 12, 8, 12, 36, 24, 8, 24, 16, 3, 9
Offset: 0

Views

Author

Paul D. Hanna, Jul 11 2006

Keywords

Comments

a(n) = 3^A062756(n) * 2^A081603(n), where A062756(n) is the number of 1's and A081603(n) is the number of 2's, in the ternary expansion of n.
More generally, if g.f. of {a(n)} satisfies: A(x) = A(x^d)*(1+Sum_{k=1..d-1} c(k)*x^k), then a(n) = Product_{k=1..d-1} c(k)^digits(n,k,d), where digits(n,k,d) is the number of k's in the d-ary expansion of n and d is any integer > 1. This sequence is a simple example for d=3 with c(1)=3 and c(2)=2.

Crossrefs

Programs

  • PARI
    {a(n)=local(A=1+x+x*O(x^n));for(i=1,floor(log(n+1)/log(3))+1, A=subst(A,x,x^3+x*O(x^n))*(1+3*x+2*x^2));polcoeff(A,n,x)}
    
  • PARI
    /* Recurrence: */ {a(n)=if(n==0,1,a(n\3)*3^((n%3)%2)*2^((n%3)\2))}

Formula

G.f.: A(x) = Product_{n>=0} (1 + x^(3^n))*(1 + 2*x^(3^n)).
a(n) = a(floor(n/3)) * 3^((n mod 3) mod 2) * 2^floor((n mod 3)/2) with a(0)=1.

A374628 Expansion of Product_{k>=0} (1 + x^(3^k))^3.

Original entry on oeis.org

1, 3, 3, 4, 9, 9, 6, 9, 9, 7, 12, 12, 13, 27, 27, 18, 27, 27, 15, 18, 18, 15, 27, 27, 18, 27, 27, 16, 21, 21, 19, 36, 36, 24, 36, 36, 25, 39, 39, 40, 81, 81, 54, 81, 81, 45, 54, 54, 45, 81, 81, 54, 81, 81, 42, 45, 45, 33, 54, 54, 36, 54, 54, 33, 45, 45, 42, 81, 81, 54, 81, 81, 45, 54, 54, 45, 81, 81, 54, 81, 81
Offset: 0

Views

Author

Seiichi Manyama, Jul 14 2024

Keywords

Crossrefs

Programs

  • PARI
    my(N=90, x='x+O('x^N)); Vec(prod(k=0, logint(N, 3), 1+x^3^k)^3)

Formula

G.f. A(x) satisfies A(x) = (1 + x)^3 * A(x^3).
Showing 1-8 of 8 results.