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

A272170 Second most significant bit of Fibonacci numbers > 1 written in base 2.

Original entry on oeis.org

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

Views

Author

Andres Cicuttin, Apr 21 2016

Keywords

Comments

It is conjectured that there are no more than two consecutive "0's" or ā€œ1’sā€ (tested up to n=10^5). The sequence looks quasiperiodic and its Fourier spectrum seems to have a fractal structure.

Examples

			(second MSB in parenthesis)
  n   A000045(n)      A004685(n)
  3      2       ->   1(0)
  4      3       ->   1(1)
  5      5       ->   1(0)1
  6      8       ->   1(0)00
  7      13      ->   1(1)01
  8      21      ->   1(0)101
  9      34      ->   1(0)0010
  10     55      ->   1(1)0111
...
		

Crossrefs

Programs

  • Mathematica
    nmax = 120; Table[IntegerDigits[Fibonacci[j], 2][[2]], {j, 3, nmax}]
  • PARI
    a(n) = binary(fibonacci(n))[2]; \\ Michel Marcus, Apr 25 2016
    
  • Python
    A272170_list, a, b = [], 1 ,1
    for n in range(3,10001):
        a, b = b, a+b
        A272170_list.append(int(bin(b)[3])) # Chai Wah Wu, Feb 07 2018

Formula

a(n) = floor(A000045(n)/(2^(ceiling(log_2(A000045(n) + 1)) - 2))) - 2.
a(n) = A079944(A000045(n)-2). - Michel Marcus, Apr 22 2016

A272532 Single bit representation of the sum of two sinusoids with periods 2 and 2*sqrt(2).

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1
Offset: 1

Views

Author

Andres Cicuttin, May 02 2016

Keywords

Comments

Since the ratio of the two periods is irrational, the sequence is strictly non-periodic.
From the factorized expression of the corresponding real function of x : 2*cos(2Pi((2 - sqrt(2))/8)x)*sin(2Pi((2 + sqrt(2))/8)x), it is possible to see that the largest distance between consecutive zeros is not greater than the shortest semi-period, 4/(2 + sqrt(2)), that is smaller than 2, and from this it follows that there are no more than two consecutive 0's or 1's.

Crossrefs

Conjectured quasiperiodicity in A271591 and A272170. A083035.

Programs

  • Mathematica
    nmax=120 ; Table[If[Sin[2*Pi*(1/2)*n]+Sin[2*Pi*(1/(2*Sqrt[2]))*n]<0,0,1],{n,1,nmax}]

Formula

a(n) = floor( (1 + sin(2*Pi*(1/2)*n) + sin(2*Pi*(1/(2*Sqrt[2]))*n)) mod 2).

A272614 Numbers whose binary digits, except for the first "1", are given by floor(((k-n)/n) mod 2) with 1<=k<=n.

Original entry on oeis.org

1, 2, 6, 8, 28, 40, 104, 144, 496, 672, 1632, 2240, 7872, 11648, 27520, 33536, 120576, 175616, 445952, 629760, 2014208, 2701312, 6453248, 8712192, 33353728, 48881664, 114548736, 144949248, 476561408, 684687360, 1787789312, 2501836800, 8510177280, 11647451136, 27590000640
Offset: 0

Views

Author

Andres Cicuttin, May 03 2016

Keywords

Comments

Numbers such that the sequence of its binary digits change periodically with linearly increasing period depending of its position: after the first '1', k-th most significant bit changes with period 2*(k-1). For instance, the second most significant bit changes with period 2, third bit changes with period 4, fourth bit with period 6, and so on. For example on the first 15 terms we have:
a(n) Binary digits
1 1
2 1 0
6 1 1 0
8 1 0 0 0
28 1 1 1 0 0
40 1 0 1 0 0 0
104 1 1 0 1 0 0 0
144 1 0 0 1 0 0 0 0
496 1 1 1 1 1 0 0 0 0
672 1 0 1 0 1 0 0 0 0 0
1632 1 1 0 0 1 1 0 0 0 0 0
2240 1 0 0 0 1 1 0 0 0 0 0 0
7872 1 1 1 1 0 1 1 0 0 0 0 0 0
11648 1 0 1 1 0 1 1 0 0 0 0 0 0 0
27520 1 1 0 1 0 1 1 1 0 0 0 0 0 0 0
/ | | | | | \ etc.
MSB / | | | | Period 12
/ | | | \
Period 2 / | | Period 10
/ | \
Period 4 | Period 8
/
Period 6
Regarding the periodicity of the binary digits, this sequence is similar to A059893 where the periodicity of its binary digits are powers of two.
By truncating the least significant bits in such a way to leave only k most significant bits of a(n) with n>k-1, it is obtained a periodic sequence with period p given by p=Least common multiple (LCM) of {2,4,6,..,2k}. In general any subsequence obtained by a selection of a subset of its most significant bits including the most significant bit is periodic.

Crossrefs

Programs

  • Mathematica
    nmax = 34;
    a[n_] := 2^n + Sum[ Floor@Mod[(n - k)/k, 2]* 2^(n - k), {k, 1, n}];
    Table[a[n] , {n, 0, nmax}]
  • PARI
    a(n) = 2^n + sum(k=1, n, (floor(((n-k)/k)) % 2) * 2^(n-k)); \\ Michel Marcus, May 20 2016

Formula

a(n) = 2^n + Sum_{k=1..n}[floor(((n-k)/k) mod 2) * 2^(n-k)].
Showing 1-3 of 3 results.