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

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.

A345292 a(n) is the least k >= 0 such that A345290(k) = -n.

Original entry on oeis.org

0, 1, 7, 4, 5, 31, 18, 19, 16, 17, 23, 20, 21, 127, 74, 75, 72, 73, 79, 66, 67, 64, 65, 71, 68, 69, 95, 82, 83, 80, 81, 87, 84, 85, 511, 298, 299, 296, 297, 303, 290, 291, 288, 289, 295, 292, 293, 319, 266, 267, 264, 265, 271, 258, 259, 256, 257, 263, 260, 261
Offset: 0

Views

Author

Rémy Sigrist, Jun 13 2021

Keywords

Comments

The binary plot of the sequence has interesting features (see Illustration in Links section).

Examples

			We have:
  n         | 0   1  2  3   4   5   6   7  8  9  10  11  12  13  14  15  16  17
  ----------+------------------------------------------------------------------
  A345290(n)| 0  -1  2  1  -3  -4  -1  -2  5  4   7   6   2   1   4   3  -8  -9
- so a(0) = 0,
     a(1) = 1,
     a(3) = 4,
     a(4) = 5,
     a(2) = 7,
     a(8) = 16,
     a(9) = 17.
		

Crossrefs

Programs

  • PARI
    See Links section.
Showing 1-2 of 2 results.