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

A357120 Irregular triangle T(n, k), n > 0, k = 1..A278043(n); the n-th row contains, in ascending order, the terms in the greedy tribonacci representation of n.

Original entry on oeis.org

1, 2, 1, 2, 4, 1, 4, 2, 4, 7, 1, 7, 2, 7, 1, 2, 7, 4, 7, 1, 4, 7, 13, 1, 13, 2, 13, 1, 2, 13, 4, 13, 1, 4, 13, 2, 4, 13, 7, 13, 1, 7, 13, 2, 7, 13, 1, 2, 7, 13, 24, 1, 24, 2, 24, 1, 2, 24, 4, 24, 1, 4, 24, 2, 4, 24, 7, 24, 1, 7, 24, 2, 7, 24, 1, 2, 7, 24, 4, 7, 24
Offset: 1

Views

Author

Rémy Sigrist, Sep 12 2022

Keywords

Comments

See A357121 for the sequence corresponding to lazy tribonacci representations.

Examples

			Triangle T(n, k) begins:
     1: [1]
     2: [2]
     3: [1, 2]
     4: [4]
     5: [1, 4]
     6: [2, 4]
     7: [7]
     8: [1, 7]
     9: [2, 7]
    10: [1, 2, 7]
    11: [4, 7]
    12: [1, 4, 7]
    13: [13]
    14: [1, 13]
    15: [2, 13]
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

T(n, 1) = A275392(n).
Sum_{k = 1..A278043(n)} T(n, k) = n.

A352089 Tribonacci-Niven numbers: numbers that are divisible by the number of terms in their minimal (or greedy) representation in terms of the tribonacci numbers (A278038).

Original entry on oeis.org

1, 2, 4, 6, 7, 8, 12, 13, 14, 18, 20, 21, 24, 26, 27, 28, 30, 33, 36, 39, 40, 44, 46, 48, 56, 60, 68, 69, 72, 75, 76, 80, 81, 82, 84, 87, 88, 90, 94, 96, 100, 108, 115, 116, 120, 126, 128, 129, 132, 135, 136, 138, 140, 149, 150, 156, 162, 168, 174, 176, 177, 180
Offset: 1

Views

Author

Amiram Eldar, Mar 04 2022

Keywords

Comments

Numbers k such that A278043(k) | k.
The positive tribonacci numbers (A000073) are all terms.
If k = A000073(A042964(m)) is an odd tribonacci number, then k+1 is a term.
Ray (2005) and Ray and Cooper (2006) called these numbers "3-Zeckendorf Niven numbers" and proved that their asymptotic density is 0. - Amiram Eldar, Sep 06 2024

Examples

			6 is a term since its minimal tribonacci representation, A278038(6) = 110, has A278043(6) = 2 1's and 6 is divisible by 2.
		

References

  • Andrew B. Ray, On the natural density of the k-Zeckendorf Niven numbers, Ph.D. dissertation, Central Missouri State University, 2005.

Crossrefs

Programs

  • Mathematica
    t[1] = 1; t[2] = 2; t[3] = 4; t[n_] := t[n] = t[n - 1] + t[n - 2] + t[n - 3]; q[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[t[k] <= m, k++]; k--; AppendTo[s, k]; m -= t[k]; k = 1]; Divisible[n, DigitCount[Total[2^(s - 1)], 2, 1]]]; Select[Range[180], q]

A352090 Numbers k such that k and k+1 are both tribonacci-Niven numbers (A352089).

Original entry on oeis.org

1, 6, 7, 12, 13, 20, 26, 27, 39, 68, 75, 80, 81, 87, 115, 128, 135, 149, 176, 184, 185, 195, 204, 215, 224, 230, 236, 243, 264, 278, 284, 291, 344, 364, 399, 447, 506, 507, 519, 548, 555, 560, 575, 595, 615, 635, 656, 664, 665, 684, 704, 725, 744, 777, 804, 824
Offset: 1

Views

Author

Amiram Eldar, Mar 04 2022

Keywords

Comments

Numbers k such that A278043(k) | k and A278043(k+1) | k+1.
The odd tribonacci numbers, A000073(A042964(m)), are all terms.

Examples

			6 is a term since 6 and 7 are both tribonacci-Niven numbers: the minimal tribonacci representation of 6, A278038(6) = 110, has 2 1's and 6 is divisible by 2, and the minimal tribonacci representation of 7, A278038(7) = 1000, has one 1 and 7 is divisible by 1.
		

Crossrefs

Programs

  • Mathematica
    t[1] = 1; t[2] = 2; t[3] = 4; t[n_] := t[n] = t[n - 1] + t[n - 2] + t[n - 3]; q[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[t[k] <= m, k++]; k--; AppendTo[s, k]; m -= t[k]; k = 1]; Divisible[n, DigitCount[Total[2^(s - 1)], 2, 1]]]; Select[Range[1000], q[#] && q[# + 1] &]

A352092 Starts of runs of 4 consecutive tribonacci-Niven numbers (A352089).

Original entry on oeis.org

1602, 218349, 296469, 1213749, 1291869, 1896630, 1952070, 2153709, 2399550, 3149109, 3753870, 3809310, 3983229, 4226208, 4256790, 4449288, 4711482, 5707897, 5727708, 6141750, 6589230, 6969429, 7205757, 7229208, 7276143, 7292943, 7454710, 7752588, 7937109, 8877069
Offset: 1

Views

Author

Amiram Eldar, Mar 04 2022

Keywords

Comments

Conjecture: There are no runs of 5 consecutive tribonacci-Niven numbers (checked up to 10^10).

Examples

			1602 is a term since 1602, 1603, 1604 and 1605 are all divisible by the number of terms in their minimal tribonacci representation:
     k    A278038(k)  A278043(k)  k/A278043(k)
  --------------------------------------------
  1602  110100011010           6           267
  1603  110100011011           7           229
  1604  110100100000           4           401
  1605  110100100001           5           321
		

Crossrefs

Subsequence of A352089, A352090 and A352091.

Programs

  • Mathematica
    t[1] = 1; t[2] = 2; t[3] = 4; t[n_] := t[n] = t[n - 1] + t[n - 2] + t[n - 3]; triboNivenQ[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[t[k] <= m, k++]; k--; AppendTo[s, k]; m -= t[k]; k = 1]; Divisible[n, DigitCount[Total[2^(s - 1)], 2, 1]]]; seq[count_, nConsec_] := Module[{tri = triboNivenQ /@ Range[nConsec], s = {}, c = 0, k = nConsec + 1}, While[c < count, If[And @@ tri, c++; AppendTo[s, k - nConsec]]; tri = Join[Rest[tri], {triboNivenQ[k]}]; k++]; s]; seq[6, 4]

A265744 a(n) is the number of Pell numbers (A000129) needed to sum to n using the greedy algorithm (A317204).

Original entry on oeis.org

0, 1, 1, 2, 2, 1, 2, 2, 3, 3, 2, 3, 1, 2, 2, 3, 3, 2, 3, 3, 4, 4, 3, 4, 2, 3, 3, 4, 4, 1, 2, 2, 3, 3, 2, 3, 3, 4, 4, 3, 4, 2, 3, 3, 4, 4, 3, 4, 4, 5, 5, 4, 5, 3, 4, 4, 5, 5, 2, 3, 3, 4, 4, 3, 4, 4, 5, 5, 4, 5, 1, 2, 2, 3, 3, 2, 3, 3, 4, 4, 3, 4, 2, 3, 3, 4, 4, 3, 4, 4, 5, 5, 4, 5, 3, 4, 4, 5, 5, 2, 3, 3, 4, 4, 3, 4, 4, 5, 5, 4, 5, 3
Offset: 0

Views

Author

Antti Karttunen, Dec 17 2015

Keywords

Comments

a(0) = 0, because no numbers are needed to form an empty sum, which is zero.
It would be nice to know for sure whether this sequence also gives the least number of Pell numbers that add to n, i.e., that there cannot be even better nongreedy solutions.

References

  • A. F. Horadam, Zeckendorf representations of positive and negative integers by Pell numbers, Applications of Fibonacci Numbers, Springer, Dordrecht, 1993, pp. 305-316.

Crossrefs

Similar sequences: A007895, A116543, A278043.

Programs

  • Mathematica
    pell[1] = 1; pell[2] = 2; pell[n_] := pell[n] = 2*pell[n - 1] + pell[n - 2]; a[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[pell[k] <= m, k++]; k--; AppendTo[s, k]; m -= pell[k]; k = 1]; Plus @@ IntegerDigits[Total[3^(s - 1)], 3]]; Array[a, 100, 0] (* Amiram Eldar, Mar 12 2022 *)

Formula

a(n) = A007953(A317204(n)). - Amiram Eldar, Mar 12 2022

A352104 a(n) is the number of 1's in the maximal tribonacci representation of n (A352103).

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 2, 3, 2, 2, 3, 2, 3, 3, 4, 2, 3, 2, 3, 3, 4, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 3, 4, 3, 4, 4, 5, 3, 4, 3, 4, 4, 5, 4, 4, 5, 4, 5, 5, 6, 3, 3, 4, 3, 4, 4, 5, 3, 4, 3, 4, 4, 5, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 4, 5, 4, 5, 5, 6, 4, 5, 4, 5
Offset: 0

Views

Author

Amiram Eldar, Mar 05 2022

Keywords

Crossrefs

Similar sequences: A000120, A007895, A112310, A278043.

Programs

  • Mathematica
    t[1] = 1; t[2] = 2; t[3] = 4; t[n_] := t[n] = t[n - 1] + t[n - 2] + t[n - 3]; trib[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[t[k] <= m, k++]; k--; AppendTo[s, k]; m -= t[k]; k = 1]; IntegerDigits[Total[2^(s - 1)], 2]]; a[n_] := Module[{v = trib[n]}, nv = Length[v]; i = 1; While[i <= nv - 3, If[v[[i ;; i + 3]] == {1, 0, 0, 0}, v[[i ;; i + 3]] = {0, 1, 1, 1}; If[i > 3, i -= 4]]; i++]; i = Position[v, _?(# > 0 &)]; If[i == {}, 0, Total[v[[i[[1, 1]] ;; -1]]]]]; Array[a, 100, 0]

Formula

a(n) = A007953(A352103(n)).
a(n) >= A278043(n).

A278045 Number of trailing 0's in tribonacci representation of n (cf. A278038).

Original entry on oeis.org

1, 0, 1, 0, 2, 0, 1, 3, 0, 1, 0, 2, 0, 4, 0, 1, 0, 2, 0, 1, 3, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 3, 0, 1, 0, 2, 0, 4, 0, 1, 0, 2, 0, 1, 6, 0, 1, 0, 2, 0, 1, 3, 0, 1, 0, 2, 0, 4, 0, 1, 0, 2, 0, 1, 3, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 3, 0, 1, 0, 2, 0, 7, 0, 1, 0, 2, 0, 1, 3, 0, 1, 0, 2, 0, 4, 0, 1, 0, 2, 0
Offset: 0

Views

Author

N. J. A. Sloane, Nov 18 2016

Keywords

Comments

The number mod 3 of trailing 0's in the tribonacci representation of n >= 1 (this sequence mod 3) is the tribonacci word itself (A080843). - N. J. A. Sloane, Oct 04 2018
The number of trailing 1's in the tribonacci representation of n >= 0 (cf. A278038) is also the tribonacci word itself (A080843).
From Amiram Eldar, Mar 04 2022: (Start)
The asymptotic density of the occurrences of k = 0, 1, 2, ... is (c-1)/c^(k+1), where c = 1.839286... (A058265) is the tribonacci constant.
The asymptotic mean of this sequence is 1/(c-1) = 1.191487... (End)

Crossrefs

Programs

  • Mathematica
    t[1] = 1; t[2] = 2; t[3] = 4; t[n_] := t[n] = t[n - 1] + t[n - 2] + t[n - 3]; a[0] = 1; a[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[t[k] <= m, k++]; k--; AppendTo[s, k]; m -= t[k]; k = 1]; Min[s] - 1]; Array[a, 100, 0] (* Amiram Eldar, Mar 04 2022 *)

A278042 Number of 0's in tribonacci representation of n (cf. A278038).

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 1, 3, 2, 2, 1, 2, 1, 4, 3, 3, 2, 3, 2, 2, 3, 2, 2, 1, 5, 4, 4, 3, 4, 3, 3, 4, 3, 3, 2, 3, 2, 4, 3, 3, 2, 3, 2, 2, 6, 5, 5, 4, 5, 4, 4, 5, 4, 4, 3, 4, 3, 5, 4, 4, 3, 4, 3, 3, 4, 3, 3, 2, 5, 4, 4, 3, 4, 3, 3, 4, 3, 3, 2, 3, 2, 7, 6, 6, 5, 6, 5, 5, 6, 5, 5, 4, 5, 4, 6, 5, 5, 4, 5, 4
Offset: 0

Views

Author

N. J. A. Sloane, Nov 18 2016

Keywords

Crossrefs

Programs

  • Mathematica
    t[1] = 1; t[2] = 2; t[3] = 4; t[n_] := t[n] = t[n - 1] + t[n - 2] + t[n - 3]; a[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[t[k] <= m, k++]; k--; AppendTo[s, k]; m -= t[k]; k = 1]; DigitCount[Total[2^(s - 1)], 2, 0]]; Array[a, 100, 0] (* Amiram Eldar, Mar 04 2022 *)

A278044 Length of tribonacci representation of n (cf. A278038).

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8
Offset: 0

Views

Author

N. J. A. Sloane, Nov 18 2016

Keywords

Comments

For n>=2, n appears A001590(n+2) times. - John Keith, May 23 2022

Crossrefs

Cf. A001590.
Similar to, but strictly different from, A201052.

Programs

  • Mathematica
    t[1] = 1; t[2] = 2; t[3] = 4; t[n_] := t[n] = t[n - 1] + t[n - 2] + t[n - 3]; a[0] = 1; a[n_] := Module[{k = 1}, While[t[k] <= n, k++]; k - 1]; Array[a, 100, 0] (* Amiram Eldar, Mar 04 2022 *)

Formula

a(n) = A278042(n) + A278043(n).

A352340 a(n) is the sum of digits of n in the maximal Pell representation of n (A352339).

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 4, 2, 3, 3, 4, 5, 3, 4, 4, 5, 3, 4, 5, 3, 4, 4, 5, 6, 4, 5, 5, 6, 4, 5, 6, 4, 5, 5, 6, 7, 5, 6, 6, 7, 8, 4, 5, 5, 6, 4, 5, 6, 4, 5, 5, 6, 7, 5, 6, 6, 7, 5, 6, 7, 5, 6, 6, 7, 8, 6, 7, 7, 8, 9, 5, 6, 6, 7, 5, 6, 7, 5, 6, 6, 7, 8, 6, 7, 7, 8, 6
Offset: 0

Views

Author

Amiram Eldar, Mar 12 2022

Keywords

Crossrefs

Programs

  • Mathematica
    pell[1] = 1; pell[2] = 2; pell[n_] := pell[n] = 2*pell[n - 1] + pell[n - 2]; pellp[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[pell[k] <= m, k++]; k--; AppendTo[s, k]; m -= pell[k]; k = 1]; IntegerDigits[Total[3^(s - 1)], 3]]; a[n_] := Module[{v = pellp[n]}, nv = Length[v]; i = 1; While[i <= nv - 2, If[v[[i]] > 0 && v[[i + 1]] == 0 && v[[i + 2]] < 2, v[[i ;; i + 2]] += {-1, 2, 1}; If[i > 2, i -= 3]]; i++]; i = Position[v, _?(# > 0 &)]; If[i == {}, 0, Total[v[[i[[1, 1]] ;; -1]]]]]; Array[a, 100, 0]

Formula

a(n) = A007953(A352339(n)).
a(n) >= A265744(n).
Showing 1-10 of 10 results.