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 40 results. Next

A345201 Bit-reverse the odd part of the Zeckendorf representation of n: a(n) = A022290(A057889(A003714(n))).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 19, 18, 17, 20, 21, 22, 23, 24, 30, 26, 27, 31, 29, 25, 28, 32, 33, 34, 35, 36, 37, 48, 39, 43, 49, 42, 40, 44, 50, 53, 47, 38, 41, 45, 51, 52, 46, 54, 55, 56, 57, 58, 77, 60, 69, 78, 63, 64, 70, 79, 85
Offset: 0

Views

Author

Rémy Sigrist, Jun 10 2021

Keywords

Comments

This sequence is a self-inverse permutation of the nonnegative integers.
This sequence is similar to A343150 and to A344682.

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(n) < A000045(k) for any n < A000045(k).

A344682 a(0) = 0, and for any n > 0, a(n) = A022290(A059893(A003754(n+1))).

Original entry on oeis.org

0, 1, 2, 3, 5, 4, 6, 7, 10, 9, 8, 11, 15, 13, 18, 12, 17, 16, 14, 19, 20, 28, 26, 23, 31, 25, 22, 30, 21, 29, 27, 24, 32, 41, 36, 49, 34, 47, 44, 39, 52, 33, 46, 43, 38, 51, 42, 37, 50, 35, 48, 45, 40, 53, 54, 75, 70, 62, 83, 68, 60, 81, 57, 78, 73, 65, 86, 67
Offset: 0

Views

Author

Rémy Sigrist, Jun 08 2021

Keywords

Comments

This sequence is a self-inverse permutation of the nonnegative integers.
The construction of this sequence is similar to that of A343150; we start with a representation of a number n as a sum of distinct positive Fibonacci numbers, through some binary encoding, and we reverse some of the bits in a bijective way to obtain a(n).

Crossrefs

Programs

A277195 Permutation of nonnegative integers: a(n) = A022290(A277010(n)).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 13, 9, 7, 21, 34, 10, 14, 55, 22, 89, 12, 144, 15, 35, 11, 233, 56, 23, 377, 17, 610, 90, 987, 36, 1597, 16, 57, 145, 2584, 4181, 234, 24, 25, 6765, 91, 19, 10946, 17711, 378, 18, 38, 28657, 611, 46368, 37, 988, 146, 75025, 26, 235, 1598, 58, 121393, 196418, 59, 317811, 20, 2585, 514229, 832040, 27, 379, 1346269, 93, 92
Offset: 1

Views

Author

Antti Karttunen, Oct 07 2016

Keywords

Comments

Note the indexing: domain starts from 1, but the range includes also 0.

Crossrefs

Programs

  • Python
    from math import isqrt
    from sympy import fibonacci, mobius, primepi, factorint
    def A277195(n):
        def f(x): return n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        return sum(fibonacci(primepi(p)+i) for i, p in enumerate(factorint(bisection(f), multiple=True),1)) # Chai Wah Wu, Aug 31 2024
  • Scheme
    (define (A277195 n) (A022290 (A277010 n)))
    

Formula

A345101 Irregular triangle T(n, k) read by rows, n >= 0, k = 1..A000119(n); the n-th row contains the numbers m such that A022290(m) = n, in increasing order.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 11, 12, 16, 13, 17, 14, 18, 15, 19, 20, 21, 22, 24, 32, 23, 25, 33, 26, 34, 27, 28, 35, 36, 29, 37, 30, 38, 40, 31, 39, 41, 42, 43, 44, 48, 64, 45, 49, 65, 46, 50, 66, 47, 51, 52, 67, 68, 53, 69, 54, 56, 70, 72, 55, 57, 71, 73
Offset: 0

Views

Author

Rémy Sigrist, Jun 08 2021

Keywords

Comments

When interpreted as a flat sequence, yields a permutation of the nonnegative integers.

Examples

			Triangle begins:
     0    [0]
     1    [1]
     2    [2]
     3    [3, 4]
     4    [5]
     5    [6, 8]
     6    [7, 9]
     7    [10]
     8    [11, 12, 16]
     9    [13, 17]
    10    [14, 18]
    11    [15, 19, 20]
    12    [21]
		

Crossrefs

Cf. A000119 (row lengths), A003714, A003754, A022290.

Programs

  • PARI
    See Links section.

Formula

T(n, 1) = A003754(n+1).
T(n, A000119(n)) = A003714(n).

A361989 a(n) is the sum of the Fibonacci numbers missing from the dual Zeckendorf representation of n; a(0) = 0, and for n > 0, a(n) = A022290(A035327(A003754(n+1))).

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Apr 02 2023

Keywords

Comments

We consider that a Fibonacci number is missing from the dual Zeckendorf representation of a number if it does not appear in this representation and a larger Fibonacci number appears in it.
The dual Zeckendorf representation is also known as the lazy Fibonacci representation (see A356771 for further details).
This sequence can also be seen as an irregular table T(n, k), n > 0, k = 1..A000045(n), where T(n, k) = A000045(n) - k.
a(n-1) for n>=1 is the starting position of the first occurrence of one of the longest words w in the Fibonacci word A003849 such that no length-n factor of w is repeated. The length of such words is 2n. (See links) - Gandhar Joshi, Mar 19 2024

Examples

			For n = 42:
- using F(k) = A000045(k),
- the dual Zeckendorf representation of 42 is F(8) + F(7) + F(5) + F(3) + F(2),
- the numbers F(6) and F(4) are missing,
- so a(42) = F(6) + F(4) = 8 + 3 = 11.
.
As an irregular triangle the sequence begins:
     0;
     0;
     1,  0;
     2,  1,  0;
     4,  3,  2, 1, 0;
     7,  6,  5, 4, 3, 2, 1, 0;
    12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0;
    ...
		

Crossrefs

Programs

  • PARI
    for (n = 1, 9, for (k = 1, f = fibonacci(n), print1 (f-k", ")))

Formula

a(n) = A000045(A072649(n)) - A194029(n) for n > 0.
a(n) = A130312(n) - A194029(n) for n > 0.

A364801 The number of iterations that n requires to reach a fixed point under the map x -> A022290(x).

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Aug 08 2023

Keywords

Comments

a(n) is well-defined since A022290(n) = n for n <= 3 (the fixed points), and A022290(n) < n for n >= 4.

Examples

			For n = 4 the trajectory is 4 -> 3. The number of iterations is 1, thus a(4) = 1.
For n = 6 the trajectory is 6 -> 5 -> 4 -> 3. The number of iterations is 3, thus a(6) = 3.
		

Crossrefs

Cf. A022290.
Similar sequences: A003434, A364800.

Programs

  • Mathematica
    f[n_] := f[n] = Module[{d = IntegerDigits[n, 2], nd}, nd = Length[d]; Total[d * Fibonacci[Range[nd + 1, 2, -1]]]]; (* A022290 *)
    a[n_] := -2 + Length@ FixedPointList[f, n]; Array[a, 100, 0]
  • PARI
    f(n) = {my(b = binary(n), nb = #b); sum(i = 1, nb, b[i] * fibonacci(nb - i + 2)); } \\ A022290
    a(n) = if(n < 4, 0, a(f(n)) + 1);
    
  • Python
    def A364801(n):
        if n<4: return 0
        a, b, s = 1, 2, 0
        for i in bin(n)[-1:1:-1]:
            if int(i):
                s += a
            a, b = b, a+b
        return A364801(s)+1 # Chai Wah Wu, Aug 10 2023

Formula

a(n) = a(A022290(n)) + 1, for n >= 4.

A356759 Bit-reverse the odd part of the dual Zeckendorf representation of n: a(n) = A022290(A057889(A003754(n+1))).

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Aug 26 2022

Keywords

Comments

This sequence is a self-inverse permutation of the nonnegative integers, similar to A345201 and A356331.
The dual Zeckendorf (or lazy Fibonacci) representation expresses uniquely a number n as a sum of distinct positive Fibonacci numbers; these distinct Fibonacci numbers can be encoded in binary, and the corresponding binary encoding, A003754(n+1), cannot have two consecutive nonleading 0's.

Examples

			For n = 49:
- the dual Zeckendorf representation of 49 is "1111010",
- reversing its odd part ("111101"), we obtain "1011110",
- so a(49) = 39.
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(a(n)) = n.
a(n) < A000045(k) iff n < A000045(k).

A360434 a(n) is the greatest number k not yet in the sequence such that A022290(n) = A022290(k).

Original entry on oeis.org

0, 1, 2, 4, 3, 5, 8, 9, 6, 7, 10, 16, 12, 17, 18, 20, 11, 13, 14, 19, 15, 21, 32, 33, 24, 25, 34, 36, 35, 37, 40, 41, 22, 23, 26, 28, 27, 29, 38, 39, 30, 31, 42, 64, 48, 65, 66, 68, 44, 49, 50, 67, 52, 69, 72, 73, 70, 71, 74, 80, 76, 81, 82, 84, 43, 45, 46, 51
Offset: 0

Views

Author

Rémy Sigrist, Feb 07 2023

Keywords

Comments

This sequence is a self-inverse permutation of the nonnegative integers.

Examples

			There are three numbers k such that A022290(k) = 11: 15, 19, 20,
- so a(15) = 20,
     a(19) = 19,
     a(20) = 15.
		

Crossrefs

See A360415 for a similar sequence.

Programs

  • PARI
    See Links section.

Formula

a(A345101(n, k)) = A345101(n, A000119(n) + 1 - k).
a(A003754(n+1)) = A003714(n).
a(A003714(n)) = A003754(n+1).

A275992 Number of times n occurs in A022290.

Original entry on oeis.org

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

Views

Author

Max Barrentine, Aug 15 2016

Keywords

Comments

A000119 counts the ways n can be represented as a sum of distinct Fibonacci numbers. A022290 maps binary ordering onto these Fibonacci representations.
A274515 is an analogous sequence applied to A002487.

Crossrefs

Formula

a(n) = A000119(A022290(n)).

A364803 Smallest number that reaches a fixed point after n iterations of the map x -> A022290(x).

Original entry on oeis.org

0, 4, 5, 6, 7, 10, 14, 23, 46, 117, 442, 3006, 47983, 2839934, 918486751, 3769839124330
Offset: 0

Views

Author

Amiram Eldar, Aug 08 2023

Keywords

Comments

a(n) is the smallest number k such that A364801(k) = n.

Crossrefs

Similar sequences: A007755, A364802.

Programs

  • Mathematica
    f[n_] := f[n] = Module[{d = IntegerDigits[n, 2], nd}, nd = Length[d]; Total[d * Fibonacci[Range[nd + 1, 2, -1]]]]; (* A022290 *)
    iternum[n_] := -2 + Length@ FixedPointList[f, n]; (* A364801 *)
    seq[kmax_] := Module[{s = {}, imax = -1, i}, Do[i = iternum[k]; If[i > imax, imax = i; AppendTo[s, k]], {k, 0, kmax}]; s]
    seq[10^6]
  • PARI
    f(n) = {my(b = binary(n), nb = #b); sum(i = 1, nb, b[i] * fibonacci(nb - i + 2)); } \\ A022290
    iternum(n) = if(n < 4, 0, iternum(f(n)) + 1); \\ A364801
    lista(kmax) = {my(imax = -1, i1); for(k = 0, kmax, i = iternum(k); if(i > imax, imax = i; print1(k, ", ")));}

Extensions

a(15) from Martin Ehrenstein, Aug 25 2023
Showing 1-10 of 40 results. Next