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

A348366 a(n) = 2*a(n - A130312(n)) + (A072649(n) - A072649(n - A130312(n))) mod 2 for n > 1 with a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 3, 2, 7, 6, 5, 15, 4, 14, 13, 11, 31, 12, 10, 30, 9, 29, 27, 23, 63, 8, 28, 26, 22, 62, 25, 21, 61, 19, 59, 55, 47, 127, 24, 20, 60, 18, 58, 54, 46, 126, 17, 57, 53, 45, 125, 51, 43, 123, 39, 119, 111, 95, 255, 16, 56, 52, 44, 124, 50, 42, 122, 38, 118
Offset: 0

Views

Author

Mikhail Kurkov, Oct 15 2021

Keywords

Crossrefs

Programs

  • PARI
    an(n) = my(m=0); until(fibonacci(m)>n, m++); m-2; \\ A072649
    af(n) = my(m=0); until(fibonacci(m)>n, m++); fibonacci(m-2); \\ A130312
    a(n) = if (n <= 1, n, 2*a(n - af(n)) + (an(n) - an(n - af(n))) % 2); \\ Michel Marcus, Nov 26 2022

Extensions

Name changed by Mikhail Kurkov, Nov 08 2024

A355429 Square array T(n, k), n >= 0, k > 0, read by antidiagonals, where T(0, k) = A001906(k) for k > 0 and where T(n, k) = n - A130312(n) + A000045(2k + A072649(n)) for n > 0, k > 0.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 6, 9, 13, 21, 7, 14, 22, 34, 55, 10, 15, 35, 56, 89, 144, 11, 23, 36, 90, 145, 233, 377, 12, 24, 57, 91, 234, 378, 610, 987, 16, 25, 58, 146, 235, 611, 988, 1597, 2584, 17, 37, 59, 147, 379, 612, 1598, 2585, 4181, 6765, 18, 38, 92, 148, 380, 989
Offset: 1

Views

Author

Mikhail Kurkov, Jul 20 2022 [verification needed]

Keywords

Comments

Each positive integer occurs exactly once, so this sequence is a permutation of the natural numbers.

Examples

			Square array begins:
   1,  3,  8,  21,  55,  144,  377,   987, ...
   2,  5, 13,  34,  89,  233,  610,  1597, ...
   4,  9, 22,  56, 145,  378,  988,  2585, ...
   6, 14, 35,  90, 234,  611, 1598,  4182, ...
   7, 15, 36,  91, 235,  612, 1599,  4183, ...
  10, 23, 57, 146, 379,  989, 2586,  6767, ...
  11, 24, 58, 147, 380,  990, 2587,  6768, ...
  12, 25, 59, 148, 381,  991, 2588,  6769, ...
  16, 37, 92, 236, 613, 1600, 4184, 10949, ...
		

Crossrefs

Programs

  • PARI
    b1(n)=local(m); if(n<1, 0, m=0; until(fibonacci(m)>n, m++); m-2) \\ A072649
    T(n, k)=if(n==0, fibonacci(2*k), n - fibonacci(b1(n)) + fibonacci(2*k + b1(n)))

Formula

T(0, k) = A001906(k) for k > 0.
T(n, k) = n - A130312(n) + A000045(2k + A072649(n)) for n > 0, k > 0.

A357589 a(n) = n - A130312(n).

Original entry on oeis.org

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

Views

Author

Mikhail Kurkov, Oct 05 2022

Keywords

Crossrefs

Programs

  • PARI
    b1(n)=local(m); if(n<1, 0, m=0; until(fibonacci(m)>n, m++); m-2) \\ A072649
    a(n)=n - fibonacci(b1(n))
    
  • Python
    from itertools import islice
    def A357589_gen(): # generator of terms
        a, b, i = 1, 1, 1
        while True:
            yield from (j-a for j in range(i,i+a))
            i += a
            a, b = b, a+b
    A357589_list = list(islice(A357589_gen(),30)) # Chai Wah Wu, Oct 13 2022

Formula

Conjecture: a(n) = 2*n - 1 - A183544(n).

A200649 Number of 1's in the Stolarsky representation of n.

Original entry on oeis.org

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

Views

Author

Casey Mongoven, Nov 19 2011

Keywords

Comments

For the Stolarsky representation of n, see the C. Mongoven link.
Conjecture: a(n) is the length of row n-1 of A385886. To obtain it, first take maximal anti-run lengths of binary indices of each nonnegative integer (giving A384877), then remove all duplicate rows (giving A385886), and finally take the length of each remaining row. For sum instead of length we appear to have A200648. For runs minus 1 instead of anti-runs see A200650. - Gus Wiseman, Jul 21 2025

Examples

			The Stolarsky representation of 19 is 11101. This has 4 1's. So a(19) = 4.
		

Crossrefs

For length instead of number of 1's we have A200648.
For 0's instead of 1's we have A200650.
Stolarsky representation is listed by A385888, ranks A200714.
A000120 counts 1's in binary expansion.
A384877 lists anti-run lengths of binary indices, duplicates removed A385886.
A384890 counts maximal anti-runs of binary indices, ranked by A385816.

Programs

  • Mathematica
    stol[n_] := stol[n] = If[n == 1, {}, If[n != Round[Round[n/GoldenRatio]*GoldenRatio], Join[stol[Floor[n/GoldenRatio^2] + 1], {0}], Join[stol[Round[n/GoldenRatio]], {1}]]];
    a[n_] := Count[stol[n], 1]; Array[a, 100] (* Amiram Eldar, Jul 07 2023 *)
  • PARI
    stol(n) = {my(phi=quadgen(5)); if(n==1, [], if(n != round(round(n/phi)*phi), concat(stol(floor(n/phi^2) + 1), [0]), concat(stol(round(n/phi)), [1])));}
    a(n) = vecsum(stol(n)); \\ Amiram Eldar, Jul 07 2023

Formula

a(n) = a(n - A130312(n-1)) + (A072649(n-1) - A072649(n - A130312(n-1) - 1)) mod 2 for n > 2 with a(1) = 0, a(2) = 1. - Mikhail Kurkov, Oct 19 2021 [verification needed]
a(n) = A200648(n) - A200650(n). - Amiram Eldar, Jul 07 2023

Extensions

More terms from Amiram Eldar, Jul 07 2023

A353654 Numbers whose binary expansion has the same number of trailing 0 bits as other 0 bits.

Original entry on oeis.org

1, 3, 7, 10, 15, 22, 26, 31, 36, 46, 54, 58, 63, 76, 84, 94, 100, 110, 118, 122, 127, 136, 156, 172, 180, 190, 204, 212, 222, 228, 238, 246, 250, 255, 280, 296, 316, 328, 348, 364, 372, 382, 392, 412, 428, 436, 446, 460, 468, 478, 484, 494, 502, 506, 511, 528, 568
Offset: 1

Views

Author

Mikhail Kurkov, Jul 15 2022

Keywords

Comments

Numbers k such that A007814(k) = A086784(k).
To reproduce the sequence through itself, use the following rule: if binary 1xyz is a term then so are 11xyz and 10xyz0 (except for 1 alone where 100 is not a term).
The number of terms with bit length k is equal to Fibonacci(k-1) for k > 1.
Conjecture: 2*A247648(n-1) + 1 with rewrite 1 -> 1, 01 -> 0 applied to binary expansion is the same as a(n) without trailing 0 bits in binary.
Odd terms are positive Mersenne numbers (A000225), because there is no 0 in their binary expansion. - Bernard Schott, Oct 12 2022

Crossrefs

Cf. A356385 (first differences).
Subsequences with same number k of trailing 0 bits and other 0 bits: A000225 (k=0), 2*A190620 (k=1), 4*A357773 (k=2), 8*A360573 (k=3).

Programs

  • Maple
    N:= 10: # for terms <= 2^N
    S:= {1};
    for d from 1 to N do
      for k from 0 to d/2-1 do
        B:= combinat:-choose([$k+1..d-2],k);
        S:= S union convert(map(proc(t) local s; 2^d - 2^k - add(2^(s),s=t) end proc,B),set);
    od od:
    sort(convert(S,list)); # Robert Israel, Sep 21 2023
  • Mathematica
    Join[{1}, Select[Range[2, 600], IntegerExponent[#, 2] == Floor[Log2[# - 1]] - DigitCount[# - 1, 2, 1] &]] (* Amiram Eldar, Jul 16 2022 *)
  • PARI
    isok(k) = if (k==1, 1, (logint(k-1, 2)-hammingweight(k-1) == valuation(k, 2))); \\ Michel Marcus, Jul 16 2022
    
  • Python
    from itertools import islice, count
    def A353654_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:(m:=(~n & n-1).bit_length()) == bin(n>>m)[2:].count('0'),count(max(startvalue,1)))
    A353654_list = list(islice(A353654_gen(),30)) # Chai Wah Wu, Oct 14 2022

Formula

a(n) = a(n-1) + A356385(n-1) for n > 1 with a(1) = 1.
Conjectured formulas: (Start)
a(n) = 2^g(n-1)*(h(n-1) + 2^A000523(h(n-1))*(2 - g(n-1))) for n > 2 with a(1) = 1, a(2) = 3 where f(n) = n - A130312(n), g(n) = [n > 2*f(n)] and where h(n) = a(f(n) + 1).
a(n) = 1 + 2^r(n-1) + Sum_{k=1..r(n-1)} (1 - g(s(n-1, k)))*2^(r(n-1) - k) for n > 1 with a(1) = 1 where r(n) = A072649(n) and where s(n, k) = f(s(n, k-1)) for n > 0, k > 1 with s(n, 1) = n.
a(n) = 2*(2 + Sum_{k=1..n-2} 2^(A213911(A280514(k)-1) + 1)) - 2^A200650(n) for n > 1 with a(1) = 1.
A025480(a(n)-1) = A348366(A343152(n-1)) for n > 1.
a(A000045(n)) = 2^(n-1) - 1 for n > 1. (End)

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.

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... .

A345067 Consider the "Quilt Tiling"; T(n, k) is the area of the tile containing the unit square whose upper right corner has coordinates (n, k); square array T(n, k) read by antidiagonals upwards, n, k > 0.

Original entry on oeis.org

1, 2, 2, 2, 4, 2, 6, 4, 4, 6, 6, 6, 4, 6, 6, 6, 6, 1, 1, 6, 6, 15, 6, 2, 9, 2, 6, 15, 15, 15, 2, 9, 9, 2, 15, 15, 15, 15, 15, 9, 9, 9, 15, 15, 15, 15, 15, 15, 2, 9, 9, 2, 15, 15, 15, 15, 15, 15, 2, 4, 9, 4, 2, 15, 15, 15, 40, 15, 15, 6, 4, 4, 4, 4, 6, 15, 15, 40
Offset: 1

Views

Author

Rémy Sigrist, Jun 06 2021

Keywords

Comments

The "Quilt Tiling" is described in Shectman's paper (see Links section).
All terms belong to A006498.

Examples

			Array T(n, k) begins:
  n\k|  1   2   3   4   5   6   7   8   9  10  11
  ---+---+-------+-----------+-------------------+
   1 |  1|  2   2|  6   6   6| 15  15  15  15  15|
     +-----------+           |                   |
   2 |  2|  4   4|  6   6   6| 15  15  15  15  15|
     |   |       +---+-------+                   |
   3 |  2|  4   4|  1|  2   2| 15  15  15  15  15|
     +---+---+---+---+-------+-------+-----------+
   4 |  6   6|  1|  9   9   9|  2   2|  6   6   6|
     |       +---+           +-------+           |
   5 |  6   6|  2|  9   9   9|  4   4|  6   6   6|
     |       |   |           |       +---+-------+
   6 |  6   6|  2|  9   9   9|  4   4|  1|  2   2|
     +-------+---+---+-------+-------+---+-------+
   7 | 15  15  15|  2|  4   4| 25  25  25  25  25|
     |           |   |       |                   |
   8 | 15  15  15|  2|  4   4| 25  25  25  25  25|
     |           +---+---+---+                   |
   9 | 15  15  15|  6   6|  1| 25  25  25  25  25|
     |           |       +---+                   |
  10 | 15  15  15|  6   6|  2| 25  25  25  25  25|
     |           |       |   |                   |
  11 | 15  15  15|  6   6|  2| 25  25  25  25  25|
     +-----------+-------+---+-------------------+
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

T(n, k) = T(k, n).
T(n, n) = A130312(n+1)^2.
T(n, 1) = A001654(A095791(n)+1).
T(n, k) is the square of a Fibonacci number for n = 1+A005206(k+1)..A000201(k).

A347188 a(n) = A346422(4*A003754(n-1) + 3) for n > 1 with a(1) = 1.

Original entry on oeis.org

1, 2, 6, 4, 24, 18, 12, 120, 8, 96, 72, 48, 720, 54, 36, 600, 24, 480, 360, 240, 5040, 16, 384, 288, 192, 4320, 216, 144, 3600, 96, 2880, 2160, 1440, 40320, 162, 108, 3000, 72, 2400, 1800, 1200, 35280, 48, 1920, 1440, 960, 30240, 1080, 720, 25200, 480, 20160
Offset: 1

Views

Author

Mikhail Kurkov, Aug 21 2021 [verification needed]

Keywords

Comments

To get the distinct terms of A346422 in the order of their appearance up to A346422(2^n - 1), just take the first A000045(n+1) terms of this sequence and remove the duplicates.

Crossrefs

Formula

a(n) = (1 + A200649(n))*a(n - A130312(n-1)) for n > 1 with a(1) = 1.
a(n) = A346422(4*A003754(n-1) + 3) for n > 1 with a(1) = 1.
Showing 1-9 of 9 results.