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

A348853 Delete any least significant 0's from the Zeckendorf representation of n, leaving its "odd" part.

Original entry on oeis.org

1, 1, 1, 4, 1, 6, 4, 1, 9, 6, 4, 12, 1, 14, 9, 6, 17, 4, 19, 12, 1, 22, 14, 9, 25, 6, 27, 17, 4, 30, 19, 12, 33, 1, 35, 22, 14, 38, 9, 40, 25, 6, 43, 27, 17, 46, 4, 48, 30, 19, 51, 12, 53, 33, 1, 56, 35, 22, 59, 14, 61, 38, 9, 64, 40, 25, 67, 6, 69, 43, 27, 72
Offset: 1

Views

Author

Kevin Ryde, Nov 14 2021

Keywords

Comments

Terms are odd Zeckendorfs A003622 and the fixed points are where n is odd already so that a(n) = n iff n is in A003622.
A139764(n) is the least significant "10..00" part of n so Zeckendorf multiplication n = A101646(a(n), A139764(n)).
The equivalent delete least significant 0's in binary is A000265 so that conversion to Fibbinary (A003714) and back gives a(n) = A022290(A000265(A003714(n))).
a(n) = 1 iff n is a Fibonacci number >= 1 (A000045) since they are Zeckendorf 100..00.
a(n) = 4 iff n is a Lucas number >= 4 (A000032) since they are Zeckendorf 10100..00 which reduces to 101.
In the Wythoff array A035513, a(n) is the term in column 0 of the row containing n, and hence the formula below using row number A019586 to select which of the odds (column 0) is a(n).

Examples

			n    = 81 = Zeckendorf 101001000.
a(n) = 19 = Zeckendorf 101001.
		

Crossrefs

Cf. A189920 (Zeckendorf digits), A003622 (odds), A003849 (final digit), A005206, A319433 (shift down).
Cf. A000045 (Fibonacci), A000032 (Lucas).
Cf. A035513 (Wythoff array), A019586 (row number).
Cf. A003714 (Fibbinary), A022290 (its inverse).
In other bases: A000265 (binary), A004151 (decimal).

Programs

  • PARI
    my(phi=quadgen(5)); a(n) = my(q,r); while([q,r]=divrem(n+2,phi); r<1, n=q-1); n;

Formula

a(n) = n if A003849(n)=1, otherwise a(n) = a(A005206(n)) = a(A319433(n)).
a(n) = A003622(A019586(n) + 1).
Sum_{k=1..n} a(k) ~ n^2/(2*phi), where phi is the golden ratio (A001622). - Amiram Eldar, Feb 17 2024

A054204 Integers expressible as sums of distinct even-subscripted Fibonacci numbers.

Original entry on oeis.org

1, 3, 4, 8, 9, 11, 12, 21, 22, 24, 25, 29, 30, 32, 33, 55, 56, 58, 59, 63, 64, 66, 67, 76, 77, 79, 80, 84, 85, 87, 88, 144, 145, 147, 148, 152, 153, 155, 156, 165, 166, 168, 169, 173, 174, 176, 177, 199, 200, 202, 203, 207, 208, 210, 211, 220, 221, 223, 224, 228, 229
Offset: 1

Views

Author

Marjorie Bicknell-Johnson (marjohnson(AT)earthlink.net), Apr 30 2000

Keywords

Comments

Number of partitions of a(n) into sums of distinct Fibonacci numbers is (n+1)st term of Stern's Diatomic series A002487. This sequence has A046815 as a subsequence.

Examples

			a(9)=22 since 9=2^3+2^0 and 22=F(2(3+1)) + F(2(0+1)) = F(8) + F(2).
		

Crossrefs

Cf. A022290, A062877 (odd-indexed Fibonaccis).
Distinct additive closure of A001906.

Programs

  • Mathematica
    fibEvenCount[n_] := Plus @@ (Reverse @ IntegerDigits[n, 2])[[2 ;; -1 ;; 2]]; evenIndexed = fibEvenCount /@ Select[Range[10000], BitAnd[#, 2 #] == 0 &]; Position[evenIndexed, ?(# == 0 &)] // Flatten (* _Amiram Eldar, Jan 20 2020*)
  • PARI
    my(m=Mod('x,'x^2-3*'x+1)); a(n) = subst(lift(subst(Pol(binary(n)), 'x,m)), 'x,3); \\ Kevin Ryde, Nov 25 2020

Formula

Subscripts in Zeckendorf representation of a(n) are 2(e+1) where e is exponent used to write n as sum of powers of 2.

A356327 Replace 2^k in binary expansion of n with A039834(1+k).

Original entry on oeis.org

0, 1, -1, 0, 2, 3, 1, 2, -3, -2, -4, -3, -1, 0, -2, -1, 5, 6, 4, 5, 7, 8, 6, 7, 2, 3, 1, 2, 4, 5, 3, 4, -8, -7, -9, -8, -6, -5, -7, -6, -11, -10, -12, -11, -9, -8, -10, -9, -3, -2, -4, -3, -1, 0, -2, -1, -6, -5, -7, -6, -4, -3, -5, -4, 13, 14, 12, 13, 15, 16
Offset: 0

Views

Author

Rémy Sigrist, Aug 03 2022

Keywords

Comments

This sequence has similarities with A022290, and is related to negaFibonacci representations.

Examples

			For n = 13:
- 13 = 2^3 + 2^2 + 2^0,
- so a(13) = A039834(4) + A039834(3) + A039834(1) = -3 + 2 + 1 = 0.
		

Crossrefs

Programs

  • Mathematica
    Table[Reverse[#].Fibonacci[-Range[Length[#]]] &@ IntegerDigits[n, 2], {n, 0, 69}] (* Rémy Sigrist, Aug 05 2022 *)
  • PARI
    a(n) = { my (v=0, k); while (n, n-=2^k=valuation(n, 2); v+=fibonacci(-1-k)); return (v) }
    
  • Python
    from sympy import fibonacci
    def A356327(n): return sum(fibonacci(-a)*int(b) for a, b in enumerate(bin(n)[:1:-1],start=1)) # Chai Wah Wu, Aug 31 2022

Formula

a(n) = Sum_{k>=0} A030308(n,k)*A039834(1+k).
a(A215024(n)) = n.
a(A215025(n)) = -n.
a(A003714(n)) = A309076(n).
Empirically:
- a(n) = 0 iff n = 0 or n belongs to A072197,
- a(n) = 1 iff n belongs to A020989,
- a(2*A215024(n)) = -A000201(n) for n > 0,
- a(3*A215024(n)) = -A060143(n),
- a(floor(A215024(n)/2)) = -A060143(n),
- a(4*A215024(n)) = A001950(n) for n > 0,
- a(floor(A215024(n)/4)) = A189663(n) for n > 0,
- a(2*A215025(n)) = A026351(n),
- a(3*A215025(n)) = A019446(n) for n > 0,
- a(floor(A215025(n)/2)) = A019446(n) for n > 0,
- a(4*A215025(n)) = -A004957(n),
- a(floor(A215025(n)/4)) = -A060144(n+1) for n >= 0.

A381607 For any nonnegative integer n with ternary expansion Sum_{k >= 0} t_k * 3^k, a(n) = Sum_{k >= 0} t_k * A000045(2*k + 2).

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Mar 01 2025

Keywords

Comments

Every nonnegative integer appears in the sequence, a finite number of times.

Examples

			42 = 3^3 + 3^2 + 2*3^1, so a(42) = A000045(8) + A000045(6) + 2*A000045(4) = 21 + 8 + 2*3 = 35.
		

Crossrefs

See A022290 for a similar sequence.

Programs

  • PARI
    a(n) = { my (t = Vecrev(digits(n, 3))); sum(k = 1, #t, t[k] * fibonacci(2*k)); }

Formula

a(A028898(A381579(n))) = n.

A334348 The terms in the Zeckendorf representation of T(n, k) correspond to the terms in common in the Zeckendorf representations of n and of k; square array T(n, k) read by antidiagonals, n, k >= 0.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Apr 24 2020

Keywords

Comments

This array has connections with the bitwise AND operator (A004198).

Examples

			Square array begins:
  n\k|  0  1  2  3  4  5  6  7  8  9  10  11  12  13
  ---+----------------------------------------------
    0|  0  0  0  0  0  0  0  0  0  0   0   0   0   0
    1|  0  1  0  0  1  0  1  0  0  1   0   0   1   0
    2|  0  0  2  0  0  0  0  2  0  0   2   0   0   0
    3|  0  0  0  3  3  0  0  0  0  0   0   3   3   0
    4|  0  1  0  3  4  0  1  0  0  1   0   3   4   0
    5|  0  0  0  0  0  5  5  5  0  0   0   0   0   0
    6|  0  1  0  0  1  5  6  5  0  1   0   0   1   0
    7|  0  0  2  0  0  5  5  7  0  0   2   0   0   0
    8|  0  0  0  0  0  0  0  0  8  8   8   8   8   0
    9|  0  1  0  0  1  0  1  0  8  9   8   8   9   0
   10|  0  0  2  0  0  0  0  2  8  8  10   8   8   0
   11|  0  0  0  3  3  0  0  0  8  8   8  11  11   0
   12|  0  1  0  3  4  0  1  0  8  9   8  11  12   0
   13|  0  0  0  0  0  0  0  0  0  0   0   0   0  13
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

T(n, k) = A022290(A003714(n) AND A003714(k)) (where AND denotes the bitwise AND operator, A004198).
T(n, 0) = 0.
T(n, n) = n.
T(n, k) = T(k, n).
T(m, T(n, k)) = T(T(m, n), k).

A349238 Reverse the digits in the Zeckendorf representation of n (A189920).

Original entry on oeis.org

0, 1, 1, 1, 4, 1, 6, 4, 1, 9, 6, 4, 12, 1, 14, 9, 6, 19, 4, 17, 12, 1, 22, 14, 9, 30, 6, 27, 19, 4, 25, 17, 12, 33, 1, 35, 22, 14, 48, 9, 43, 30, 6, 40, 27, 19, 53, 4, 38, 25, 17, 51, 12, 46, 33, 1, 56, 35, 22, 77, 14, 69, 48, 9, 64, 43, 30, 85, 6, 61, 40, 27
Offset: 0

Views

Author

Kevin Ryde, Nov 11 2021

Keywords

Comments

Fixed points a(n) = n are the Zeckendorf palindromes n = A094202.
Apart from a(0)=0, all terms end with a 1 digit so are "odd" A003622.
a(n) = 1 iff n is a Fibonacci number >= 1 (A000045) since they are Zeckendorf 100..00 which reverses to 00..001.
A given k first occurs as a(n) = k at its reversal n = a(k), and thereafter at this n with any number of least significant 0's appended.
The equivalent reversal in binary is A030101 so that a conversion to Fibbinary (A003714) and back gives a(n) = A022290(A030101(A003714(n))).
A reverse and reverse again loses any least significant 0 digits as in A348853 so that a(a(n)) = A348853(n).

Examples

			n    = 1445 = Zeckendorf 101000101001000
a(n) =  313 = Zeckendorf 000100101000101 reversal
		

Crossrefs

Cf. A189920 (Zeckendorf digits), A094202 (fixed points), A003622 (range), A348853 (delete trailing 0's).
Cf. A003714 (Fibbinary), A022290 (its inverse).
Cf. A343150 (reverse below MSB).
Other base reversals: A030101 (binary), A004086 (decimal).

Programs

  • PARI
    \\ See links.
    
  • Python
    def NumToFib(n): # n > 0
        f0, f1, k = 1, 1, 0
        while f0 <= n:
            f0, f1, k = f0+f1, f0, k+1
        s = ""
        while k > 0:
            f0, f1, k = f1, f0-f1, k-1
            if f0 <= n:
                s, n = s+"1", n-f0
            else:
                s = s+"0"
        return s
    def RevFibToNum(s):
        f0, f1 = 1, 1
        n, k = 0, 0
        while k < len(s):
            if s[k] == "1":
                n = n+f0
            f0, f1, k = f0+f1, f0, k+1
        return n
    n, a = 0, 0
    print(a, end = ", ")
    while n < 71:
        n += 1
        print(RevFibToNum(NumToFib(n)), end = ", ") # A.H.M. Smeets, Nov 14 2021

Formula

There is a linear representation of rank 6 for this sequence. - Jeffrey Shallit, May 13 2023

A350311 Replace 2^k in the binary expansion of n with A000930(k+2), Narayana's cows sequence.

Original entry on oeis.org

0, 1, 2, 3, 3, 4, 5, 6, 4, 5, 6, 7, 7, 8, 9, 10, 6, 7, 8, 9, 9, 10, 11, 12, 10, 11, 12, 13, 13, 14, 15, 16, 9, 10, 11, 12, 12, 13, 14, 15, 13, 14, 15, 16, 16, 17, 18, 19, 15, 16, 17, 18, 18, 19, 20, 21, 19, 20, 21, 22, 22, 23, 24, 25, 13, 14, 15, 16, 16, 17
Offset: 0

Views

Author

A.H.M. Smeets, Dec 24 2021

Keywords

Comments

A048715(n) = m, if and only if a(n) = m and for all k > n a(k) > m.

Crossrefs

Cf. A022290 (analog for Fibonacci numbers).

Programs

  • Maple
    b:= (n, i, j, k)->`if`(n=0, 0, k*irem(n, 2, 'q')+b(q, j, k, i+k)):
    a:= n-> b(n, 1$3):
    seq(a(n), n=0..100);  # Alois P. Heinz, Jan 26 2022
  • PARI
    my(p=Mod('x,'x^3-'x^2-1)); a(n) = vecsum(Vec(lift(subst(Pol(binary(n))*'x^2,'x,p)))); \\ Kevin Ryde, Dec 26 2021
  • Python
    def Interpretation(n):
        f0, f1, f2, r = 1, 1, 1, 0
        while n > 0:
            if n%2 == 1:
                r = r+f0
            n, f0, f1, f2 = n//2, f0+f2, f0, f1
        return r
    n = 0
    while n <= 69:
        print(Interpretation(n), end = ", ")
        n += 1
    

A197354 a(n) = Sum_{k>=0} A030308(n,k)*(2k+1).

Original entry on oeis.org

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

Views

Author

Philippe Deléham, Oct 14 2011

Keywords

Comments

For any k >= 0, A000700(k) equals the number of occurrences of k in the sequence. - Rémy Sigrist, Jan 19 2019

Crossrefs

Other sequences that are built by replacing 2^k in the binary representation with other numbers: A022290 (Fibonacci), A029931 (natural numbers), A059590 (factorials), A089625 (primes).

Programs

  • PARI
    a(n) = my (b=Vecrev(binary(n))); sum(i=1, #b, if (b[i], 2*i-1, 0)) \\ Rémy Sigrist, Jan 19 2019

Formula

a(2^n-1) = n^2.
a(n) mod 2 = A010060(n).
G.f.: (1/(1 - x))*Sum_{k>=0} (2*k + 1)*x^(2^k)/(1 + x^(2^k)). - Ilya Gutkovskiy, Jul 23 2017

A345290 a(n) is obtained by replacing 2^k in binary expansion of n with Fibonacci(-k-2).

Original entry on oeis.org

0, -1, 2, 1, -3, -4, -1, -2, 5, 4, 7, 6, 2, 1, 4, 3, -8, -9, -6, -7, -11, -12, -9, -10, -3, -4, -1, -2, -6, -7, -4, -5, 13, 12, 15, 14, 10, 9, 12, 11, 18, 17, 20, 19, 15, 14, 17, 16, 5, 4, 7, 6, 2, 1, 4, 3, 10, 9, 12, 11, 7, 6, 9, 8, -21, -22, -19, -20, -24
Offset: 0

Views

Author

Rémy Sigrist, Jun 13 2021

Keywords

Comments

This sequence is a variant of A022290; here we consider Fibonacci numbers with negative indices (A039834), there Fibonacci numbers with positive indices (A000045).
After the initial 0, the sequence alternates runs of positive terms and runs of negative terms, the k-th run having 2^(k-1) terms.

Examples

			For n = 3:
- 3 = 2^1 + 2^0,
- so a(3) = A039834(2+1) + A039834(2+0) = 2 - 1 = 1.
		

Crossrefs

Programs

  • PARI
    a(n) = { my (v=0, e); while (n, n-=2^e=valuation(n, 2); v+=fibonacci(-2-e)); v }

Formula

a(n) = A022290(A063695(n)) - A022290(A063694(n)).
a(n) = A022290(n) iff n belongs to A062880.
a(n) = -A022290(n) iff n belongs to A000695.
a(n) = 0 iff n = 0.
a(n) = 1 iff n belongs to A072197.
a(n) = 2 iff n belongs to A080675.
a(n) = -1 iff n belongs to A020989.
a(n) = -2 iff n belongs to A136412.

A356964 Replace 2^k in binary expansion of n with tribonacci(k+3) (where tribonacci corresponds to A000073).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14, 13, 14, 15, 16, 17, 18, 19, 20, 20, 21, 22, 23, 24, 25, 26, 27, 24, 25, 26, 27, 28, 29, 30, 31, 31, 32, 33, 34, 35, 36, 37, 38, 37, 38, 39, 40, 41, 42, 43, 44, 44, 45, 46, 47, 48, 49, 50, 51, 44, 45, 46, 47
Offset: 0

Views

Author

Rémy Sigrist, Sep 06 2022

Keywords

Comments

This sequence is to tribonacci numbers (A000073) what A022290 is to Fibonacci numbers (A000045).
For any k >= 0, k appears A117546(k) times in this sequence.

Examples

			For n = 9:
- 9 = 2^3 + 2^0,
- so a(9) = A000073(3+3) + A000073(0+3) = 7 + 1 = 8.
		

Crossrefs

Programs

  • PARI
    a(n) = { my (v=0, k); while (n, n-=2^k=valuation(n,2); v+=([0,1,0; 0,0,1; 1,1,1]^(3+k))[2,1]); return (v); }
    
  • Python
    def A356964(n):
        a, b, c, s = 1,2,4,0
        for i in bin(n)[-1:1:-1]:
            s += int(i)*a
            a, b, c = b, c, a+b+c
        return s # Chai Wah Wu, Sep 10 2022

Formula

a(A003726(n+1)) = n.
a(A003796(n+1)) = n.
Previous Showing 21-30 of 40 results. Next