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.

Previous Showing 31-40 of 45 results. Next

A343152 Reverse the order of all but the most significant bits in the maximal Fibonacci expansion of n.

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 7, 8, 11, 10, 9, 12, 16, 14, 19, 13, 18, 17, 15, 20, 21, 29, 27, 24, 32, 26, 23, 31, 22, 30, 28, 25, 33, 42, 37, 50, 35, 48, 45, 40, 53, 34, 47, 44, 39, 52, 43, 38, 51, 36, 49, 46, 41, 54, 55, 76, 71, 63, 84, 69, 61, 82, 58, 79, 74, 66, 87
Offset: 1

Views

Author

J. Parker Shectman, Apr 07 2021

Keywords

Comments

A self-inverse permutation of the natural numbers.
Analogous to A059893 with binary expansion replaced by maximal Fibonacci expansion.
Analogous to A343150 with minimal Fibonacci expansion replaced by maximal Fibonacci expansion.
For n=1, the expansion equals 1. For n>=2, the expansion equals A104326(n-1) with a 1 appended. The 1 corresponds to a digit (always equal to 1) for F(1)=1, in addition to the digit for F(2)=1. (This expansion is NOT a representation, see reference in link, pp. 106 and 137.)
Write the sequence as a (right-justified) "tetrangle" or "irregular triangle" tableau with F(t) (Fibonacci number) entries on each row, for t=1,2,3,.... Then, columns of the tableau equal rows of the array A083047 (see reference in link, p. 131):
1
2
3, 4
6, 5, 7
8, 11, 10, 9, 12
16, 14, 19, 13, 18, 17, 15, 20
...

Examples

			For an example of calculation by reversing Fibonacci binary digits, see reference in link, p. 144:
On the basis (1,1,2,3,5,8) n=13 is written as 110101, Reversing all but the most AND least significant digits gives 101011, which evaluates to 16, so a(13)=16.
On the basis (1,1,2,3,5,8) n=14 is written as 101101, Reversing all but the most AND least significant digits gives 101101, which evaluates to 14, so a(14)=14.
		

Crossrefs

Programs

  • Mathematica
    (*Produce indices of maximal Fibonacci expansion (recursively)*)
    MaxFibInd[n_] := Module[{t = Floor[Log[GoldenRatio, Sqrt[5]*n + 1]] - 1}, Piecewise[{{{1}, n == 1}, {Append[MaxFibInd[n - Fibonacci[t]], t], n > 1}},]];
    (*Define a(n)*)
    a[n_] := Module[{MFI = MaxFibInd[n]}, Apply[Plus, Fibonacci[Last[MFI] - MFI + 1]]];
    (*Generate DATA*)
    Array[a, 67]

A331193 Numbers whose binary and dual Zeckendorf representations are both palindromic.

Original entry on oeis.org

0, 1, 3, 33, 231, 255, 891, 3687, 21477, 1216041, 5360069, 418964451, 443750859, 1445812789, 23577810421, 25474675645, 154292473329, 1904542477755, 1925488579591, 9617724354513, 16654480398927, 169215938357145, 2563713753111945, 3408057776446851, 4019397080882727
Offset: 1

Views

Author

Amiram Eldar, Jan 11 2020

Keywords

Examples

			3 is a term since both its binary and dual Zeckendorf representations are 11 which is palindromic.
33 is a term since its binary representation, 100001, and its dual Zeckendorf representation, 1010101, are both palindromic.
		

Crossrefs

Intersection of A006995 and A331191.

Programs

  • Mathematica
    mirror[dig_, s_] := Join[dig, s, Reverse[dig]];
    select[v_, mid_] := Select[v, Length[#] == 0 || Last[#] != mid &];
    fib[dig_] := Plus @@ (dig * Fibonacci[Range[2, Length[dig] + 1]]);
    pals = Join[{{}}, Rest[Select[IntegerDigits /@ FromDigits /@ Tuples[{0, 1}, 22], SequenceCount[#, {0, 0}] == 0 &]]];
    dualZeckPals = Union @ Join[{0}, fib /@ Join[mirror[#, {}] & /@ (select[pals, 0]), mirror[#, {0}] & /@ (select[pals, 0]), mirror[#, {1}] & /@ pals]];
    binPalQ[n_] := PalindromeQ@IntegerDigits[n, 2]; Select[dualZeckPals, binPalQ]

Extensions

a(18)-a(22) from Chai Wah Wu, Jan 12 2020
a(23)-a(25) from Chai Wah Wu, Jan 13 2020

A331467 Numbers with no common terms in their Zeckendorf and dual Zeckendorf representations.

Original entry on oeis.org

0, 3, 5, 8, 13, 16, 21, 26, 34, 37, 42, 55, 60, 68, 71, 89, 92, 97, 110, 115, 144, 149, 157, 160, 178, 181, 186, 233, 236, 241, 254, 259, 288, 293, 301, 304, 377, 382, 390, 393, 411, 414, 419, 466, 469, 474, 487, 492, 610, 613, 618, 631, 636, 665, 670, 678, 681
Offset: 1

Views

Author

Amiram Eldar, Jan 17 2020

Keywords

Comments

Include all the Fibonacci numbers > 2.
The number of terms <= F(k), the k-th Fibonacci number, is A000931(k + 5), for k > 3.

Examples

			3 is a term since its Zeckendorf representation is 100 (i.e., F(4)), its dual Zeckendorf representation is 11 (i.e., F(2) + F(3)), and there is no position with the digit 1 common to both representations (i.e., the Fibonacci summands are different).
		

Crossrefs

Programs

  • Mathematica
    m = 10^4; zeck = Select[Range[0, m], BitAnd[#, 2 #] == 0 &]; dualZeck = Select[Range[0, m], SequenceCount[IntegerDigits[#, 2], {0, 0}] == 0 &]; s = DigitCount[BitAnd[zeck[[#]], dualZeck[[#]]] & /@ Range[Min[Length[zeck], Length[dualZeck]]], 2, 1]; -1 + Position[s, _?(# == 0 &)] // Flatten

Formula

A331466(a(n)) = 0.

A333620 Numbers that are divisible by the total number of 1's in the dual Zeckendorf representations of all their divisors (A333618).

Original entry on oeis.org

1, 2, 3, 4, 12, 28, 33, 68, 104, 126, 130, 143, 147, 220, 231, 248, 297, 336, 390, 391, 408, 416, 429, 442, 518, 575, 741, 752, 779, 812, 825, 1161, 1170, 1197, 1295, 1323, 1364, 1440, 1462, 1566, 1652, 1677, 1680, 1692, 1701, 1720, 1806, 1817, 1872, 1909, 2210
Offset: 1

Views

Author

Amiram Eldar, Mar 29 2020

Keywords

Examples

			4 is a term since its divisors are {1, 2, 4}, their dual Zeckendorf representations (A104326) are {1, 10, 101}, and their sum of sums of digits is 1 + (1 + 0) + (1 + 0 + 1) = 4 which is a divisor of 4.
		

Crossrefs

Programs

  • Mathematica
    fibTerms[n_] := Module[{k = Ceiling[Log[GoldenRatio, n*Sqrt[5]]], t = n, fr = {}}, While[k > 1, If[t >= Fibonacci[k], AppendTo[fr, 1]; t = t - Fibonacci[k], AppendTo[fr, 0]]; k--]; fr];
    dualZeckSum[n_] := Module[{v = fibTerms[n]}, nv = Length[v]; i = 1; While[i <= nv - 2, If[v[[i]] == 1 && v[[i + 1]] == 0 && v[[i + 2]] == 0, v[[i]] = 0; v[[i + 1]] = 1; v[[i + 2]] = 1; If[i > 2, i -= 3]]; i++]; i = Position[v, _?(# > 0 &)]; If[i == {}, 0, Total[v[[i[[1, 1]] ;; -1]]]]];
    dualZeckDivDigSum[n_] := DivisorSum[n, dualZeckSum[#] &];
    Select[Range[10^3], Divisible[#, dualZeckDivDigSum[#]] &]

A375430 The maximum exponent in the unique factorization of n in terms of distinct terms of A115975 using the dual Zeckendorf representation of the exponents in the prime factorization of n; a(1) = 0.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 3, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 3, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 3, 3, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 3, 1, 2, 2, 2, 1, 1, 1, 2, 1
Offset: 1

Views

Author

Amiram Eldar, Aug 15 2024

Keywords

Comments

First differs from A299090 at n = 128. Differs from A046951 and A159631 at n = 1, 36, 64, 72, ... .
When the exponents in the prime factorization of n are expanded as sums of distinct Fibonacci numbers using the dual Zeckendorf representation (A104326), we get a unique factorization of n in terms of distinct terms of A115975, i.e., n is represented as a product of prime powers (A246655) whose exponents are Fibonacci numbers. a(n) is the maximum exponent of these prime powers. Thus all the terms are Fibonacci numbers.

Examples

			For n = 8 = 2^3, the dual Zeckendorf representation of 3 is 11, i.e., 3 = Fibonacci(2) + Fibonacci(3) = 1 + 2. Therefore 8 = 2^(1+2) = 2^1 * 2^2, and a(8) = 2.
		

Crossrefs

Programs

  • Mathematica
    A130312[n_] := Module[{k = 0}, While[Fibonacci[k] <= n, k++]; Fibonacci[k-2]]; a[n_] := A130312[1 + Max[FactorInteger[n][[;;, 2]]]]; a[1] = 0; Array[a, 100]
  • PARI
    A130312(n) = {my(k = 0); while(fibonacci(k) <= n, k++); fibonacci(k-2);}
    a(n) = if(n == 1, 0, A130312(1 + vecmax(factor(n)[,2])));

Formula

a(n) = A130312(1 + A051903(n)).
a(n) = A000045(A375431(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1 + Sum_{k>=4} Fibonacci(k) * (1 - 1/zeta(Fibonacci(k)-1)) = 1.48543763231328442311... .

A095880 Numbers whose lazy Fibonacci representation has an even number of summands.

Original entry on oeis.org

0, 3, 4, 5, 7, 11, 14, 16, 17, 18, 21, 22, 23, 25, 26, 28, 32, 33, 34, 36, 40, 41, 45, 48, 50, 51, 52, 54, 58, 61, 63, 64, 65, 69, 71, 72, 73, 76, 77, 78, 80, 81, 83, 87, 90, 92, 93, 94, 97, 98, 99, 101, 102, 104, 108, 110, 111, 112, 114, 115, 117, 121, 122, 123, 125, 129, 130
Offset: 1

Views

Author

Clark Kimberling, Jun 10 2004

Keywords

Examples

			The first few Lazy Fibonacci representations (as in A095791) are 0 = 0, 1 = 1, 2 = 2, 3 = 2 + 1, 4 = 3 + 1, 5 = 3 + 2, 6 = 3 + 2 + 1, 7 = 5 + 2, 8 = 5 + 2 + 1, so that a(1), a(2), a(3), a(4) and a(5) are 0, 3, 4, 5, 7.
		

Crossrefs

Programs

  • Mathematica
    lazyFib = Select[Range[0, 1000], SequenceCount[IntegerDigits[#, 2], {0, 0}] == 0 &]; binWt[n_] := DigitCount[n, 2, 1]; -1 + Position[binWt /@ lazyFib, ?(EvenQ[#] &)] // Flatten (* _Amiram Eldar, Jan 18 2020 *)

Extensions

a(1) = 0 inserted by Amiram Eldar, Jan 18 2020

A333618 a(n) is the total number of terms (1-digits) in the dual Zeckendorf representation of all divisors of n.

Original entry on oeis.org

1, 2, 3, 4, 3, 7, 3, 7, 6, 7, 5, 12, 4, 8, 8, 11, 5, 14, 6, 12, 9, 10, 5, 20, 7, 9, 11, 14, 6, 20, 6, 17, 11, 10, 10, 23, 6, 12, 11, 21, 5, 22, 6, 17, 17, 11, 6, 30, 8, 17, 13, 17, 8, 23, 12, 22, 13, 13, 6, 33, 7, 12, 18, 23, 12, 26, 6, 17, 13, 23, 7, 37, 7, 14
Offset: 1

Views

Author

Amiram Eldar, Mar 29 2020

Keywords

Examples

			For n = 6, its divisors are 1, 2, 3 and 6. The dual Zeckendorf representations (A104326) of the divisors are 1, 10, 11 and 111. Their total number of 1's is 1 + 1 + 2 + 3 = 7, thus a(6) = 7.
		

Crossrefs

Programs

  • Mathematica
    fibTerms[n_] := Module[{k = Ceiling[Log[GoldenRatio, n*Sqrt[5]]], t = n, fr = {}}, While[k > 1, If[t >= Fibonacci[k], AppendTo[fr, 1]; t = t - Fibonacci[k], AppendTo[fr, 0]]; k--]; fr];
    dualZeckSum[n_] := Module[{v = fibTerms[n]}, nv = Length[v]; i = 1; While[i <= nv - 2, If[v[[i]] == 1 && v[[i + 1]] == 0 && v[[i + 2]] == 0, v[[i]] = 0; v[[i + 1]] = 1; v[[i + 2]] = 1; If[i > 2, i -= 3]]; i++]; i = Position[v, _?(# > 0 &)]; If[i == {}, 0, Total[v[[i[[1, 1]] ;; -1]]]]];
    a[n_] := DivisorSum[n, dualZeckSum[#] &]; Array[a, 100]

Formula

a(n) = Sum_{d|n} A112310(d).

A333705 Numbers k such that the total number of 1's in the dual Zeckendorf representation of the first k integers is a multiple of k.

Original entry on oeis.org

1, 2, 8, 21, 100, 204, 401, 3062, 5974, 11402, 22597, 22598, 43553, 85519, 166243, 1218380, 8854646, 248592083, 248592084, 485966511
Offset: 1

Views

Author

Amiram Eldar, Apr 02 2020

Keywords

Comments

The corresponding quotients are 1, 1, 2, 3, 5, 6, 7, 10, 11, ...
No more terms below 3*10^9.

Examples

			8 is a term since the numbers 1, 2, ... 8 in the dual Zeckendorf representation are 1, 10, 11, 101, 110, 111, 1010, 1011, and the sum of their numbers of digits of 1 is 1 + 1 + 2 + 2 + 2 + 3 + 2 + 3 = 16 which is divisible by 8.
		

Crossrefs

Programs

  • Mathematica
    fibTerms[n_] := Module[{k = Ceiling[Log[GoldenRatio, n*Sqrt[5]]], t = n, fr = {}}, While[k > 1, If[t >= Fibonacci[k], AppendTo[fr, 1]; t = t - Fibonacci[k], AppendTo[fr, 0]]; k--]; fr];
    dualZeckSum[n_] := Module[{v = fibTerms[n]}, nv = Length[v]; i = 1; While[i <= nv - 2, If[v[[i]] == 1 && v[[i + 1]] == 0 && v[[i + 2]] == 0, v[[i]] = 0; v[[i + 1]] = 1; v[[i + 2]] = 1; If[i > 2, i -= 3]]; i++]; i = Position[v, _?(# > 0 &)]; If[i == {}, 0, Total[v[[i[[1, 1]] ;; -1]]]]];
    seq = {}; sum = 0; Do[sum += dualZeckSum[n]; If[Divisible[sum, n], AppendTo[seq, n]], {n, 1, 10^6}]; seq

A203075 Write n as a sum of distinct terms from A203074; if there is more than one way, choose the smallest binary number.

Original entry on oeis.org

0, 1, 10, 11, 101, 110, 111, 1010, 1011, 1101, 1110, 1111, 10001, 10010, 10011, 10101, 10110, 10111, 11010, 11011, 11101, 11110, 11111, 100111, 101010, 101011, 101101, 101110, 101111, 110001, 110010, 110011, 110101, 110110, 110111, 111010, 111011
Offset: 0

Views

Author

Frank M Jackson and N. J. A. Sloane, Dec 28 2011

Keywords

Comments

a(n) is a binary vector for selecting terms from the complete sequence, A203074 that when summed gives n. It uses a miserly algorithm that chooses the smallest binary vector if there are multiple solutions. Somewhat similar to, although different from, A014417 and A104326.

Examples

			5 can be written as 5, i.e., 1000, or as 3+2, i.e., 110, and we choose the smaller.
18 can be written as 17+1, i.e., 100001, or as 11+5+2, i.e., 11010, and again we choose the smaller.
		

Crossrefs

Programs

  • Mathematica
    nextprime[n_Integer] := (k=n+1;While[!PrimeQ[k], k++];k);aprime[m_Integer] := (If[m==0, 1, nextprime[2^(m-1)]]);seqtable[l_] := (stable=Table[aprime[j], {j, 0, l}];stable);inttable[p_] := (itable=Reverse[IntegerDigits[p, 2]];itable);h=1;otable={0};ttable={};While[h<100, (inttable[h];seqtable[Length[itable]-1];test=itable.stable;If[!MemberQ[ttable, test], AppendTo[otable, h], Null];AppendTo[ttable, test];h++)];IntegerString[otable, 2]

Formula

a(n) x A203074 = n, where x is the inner product and the binary vector a(n) is in ascending powers of 2 with infinite trailing zeros.

A331466 The number of common terms in the Zeckendorf and dual Zeckendorf representations of n.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Jan 17 2020

Keywords

Comments

The indices of records are numbers of the form F(2*k - 1) - 1, for k > 0, where F(k) is the k-th Fibonacci number. The corresponding record values are k - 1 = 0, 1, 2, ...

Examples

			a(6) = 1 since the Zeckendorf representation of 6 is 1001 (i.e., F(2) + F(5)), its dual Zeckendorf representation is 111 (i.e., F(2) + F(3) + F(4)), and there is only one position with a common digit 1, corresponding to the one common summand F(2).
		

Crossrefs

Programs

  • Mathematica
    m = 1000; zeck = Select[Range[0, m], BitAnd[#, 2 #] == 0 &]; dualZeck = Select[Range[0, m], SequenceCount[IntegerDigits[#, 2], {0, 0}] == 0 &]; DigitCount[BitAnd[zeck[[#]], dualZeck[[#]]] & /@ Range[Min[Length[zeck], Length[dualZeck]]], 2, 1]

Formula

a(A000045(2*n - 1) - 1) = a(A000045(2*n) - 1) = n - 1.
a(A000045(n)) = a(A331467(n)) = 0 for n > 2.
Previous Showing 31-40 of 45 results. Next