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 11-16 of 16 results.

A275438 Triangle read by rows: T(n,k) is the number of compositions of n with parts in {1,2} having asymmetry degree equal to k (n>=0; 0<=k<=floor(n/3)).

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 2, 2, 6, 5, 4, 4, 3, 14, 4, 8, 10, 16, 5, 30, 12, 8, 13, 20, 48, 8, 8, 60, 36, 40, 21, 40, 124, 32, 16, 13, 116, 88, 144, 16, 34, 76, 292, 112, 96, 21, 218, 204, 432, 80, 32, 55, 142, 648, 320, 400, 32, 34, 402, 444, 1160, 320, 224
Offset: 0

Views

Author

Emeric Deutsch, Aug 16 2016

Keywords

Comments

The asymmetry degree of a finite sequence of numbers is defined to be the number of pairs of symmetrically positioned distinct entries. Example: the asymmetry degree of (2,7,6,4,5,7,3) is 2, counting the pairs (2,3) and (6,5).
Number of entries in row n is 1 + floor(n/3).
Sum of entries in row n is A000045(n+1) (Fibonacci).
T(n,0) = A053602(n+1) (= number of palindromic compositions of n with parts in {1,2}).
Sum_{k>=0} k*T(n,k) = A275439(n).

Examples

			Row 4 is [3,2] because the compositions of 4 with parts in {1,2} are 22, 112, 121, 211, and 1111, having asymmetry degrees 0, 1, 0, 1, 0, respectively.
Triangle starts:
  1;
  1;
  2;
  1,2;
  3,2;
  2,6;
  5,4,4.
		

Crossrefs

Programs

  • Maple
    G:=(1+z+z^2)/(1-z^2-2*t*z^3-z^4): Gser:=simplify(series(G,z=0,25)): for n from 0 to 20 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 20 do seq(coeff(P[n],t,j),j=0..degree(P[n])) end do; # yields sequence in triangular form
  • Mathematica
    Join[{{1}}, Table[BinCounts[#, {0, 1 + Floor[n/3], 1}] &@ Map[Total, Map[BitXor[Take[# - 1, Ceiling[Length[#]/2]], Reverse@ Take[# - 1, -Ceiling[Length[#]/2]]] &, Flatten[Map[Permutations, DeleteCases[IntegerPartitions@ n, {a_, _} /; a > 2]], 1]]], {n, 17}]] // Flatten (* Michael De Vlieger, Aug 17 2016 *)

Formula

G.f.: G(t,z) = (1+z+z^2)/(1-z^2-2*t*z^3-z^4). In the more general situation of compositions into a[1]=1} z^(a[j]), we have G(t,z) = (1+F(z))/(1-F(z^2)-t*(F(z)^2-F(z^2))). In particular, for t=0 we obtain Theorem 1.2 of the Hoggatt et al. reference.

A275440 Triangle read by rows: T(n,k) is the number of compositions of n into odd parts, having asymmetry degree equal to k (n>=0; 0<=k<=floor(n/4)).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 3, 2, 2, 6, 5, 8, 3, 14, 4, 8, 22, 4, 5, 30, 20, 13, 52, 24, 8, 60, 68, 8, 21, 112, 92, 8, 13, 116, 192, 56, 34, 228, 284, 64, 21, 218, 484, 248, 16, 55, 446, 768, 312, 16, 34, 402, 1132, 872, 144, 89, 848, 1900, 1184, 160, 55, 730
Offset: 0

Views

Author

Emeric Deutsch, Aug 16 2016

Keywords

Comments

The asymmetry degree of a finite sequence of numbers is defined to be the number of pairs of symmetrically positioned distinct entries. Example: the asymmetry degree of (2,7,6,4,5,7,3) is 2, counting the pairs (2,3) and (6,5).
Number of entries in row n is 1 + floor(n/4).
Sum of entries in row n is A000045(n) (Fibonacci).
T(n,0) = A053602(n) (= number of palindromic compositions of n into odd parts).
Sum_{k>=0} k*T(n,k) = A275441(n).

Examples

			Row 5 is [3,2] because the compositions of 5 into odd parts are 5, 113, 131, 311, and 11111, having asymmetry degrees 0, 1, 0, 1, 0, respectively.
Triangle starts:
  1;
  1;
  1;
  2;
  1,2;
  3,2;
  2,6;
  5,8.
		

References

  • S. Heubach and T. Mansour, Combinatorics of Compositions and Words, CRC Press, 2010.

Crossrefs

Programs

  • Maple
    G := (1-z^4)*(1+z-z^2)/(1-2*z^2-2*t*z^4+z^6): Gser := simplify(series(G, z = 0, 30)): for n from 0 to 25 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 25 do seq(coeff(P[n], t, j), j = 0 .. degree(P[n])) end do; # yields sequence in triangular form
  • Mathematica
    Table[BinCounts[#, {0, 1 + Floor[n/4], 1}] &@ Map[Total, Map[Map[Boole[# >= 1] &, BitXor[Take[(# - 1)/2, Ceiling[Length[#]/2]], Reverse@ Take[(# - 1)/2, -Ceiling[Length[#]/2]]]] &, Flatten[Map[Permutations, DeleteCases[IntegerPartitions@ n, {_, a_, _} /; EvenQ@ a]], 1]]], {n, 0, 20}] // Flatten (* Michael De Vlieger, Aug 17 2016 *)

Formula

G.f.: G(t,z) = (1-z^4)*(1+z-z^2)/(1-2*z^2-2*t*z^4+z^6). In the more general situation of compositions into a[1]=1} z^(a[j]), we have G(t,z) = (1 + F(z))/(1 - F(z^2) - t*(F(z)^2 - F(z^2))). In particular, for t=0 we obtain Theorem 1.2 of the Hoggatt et al. reference.

A339572 If n even, a(n) = A000071(n/2+1); if n odd, a(n) = A001610((n-1)/2).

Original entry on oeis.org

0, 0, 1, 2, 2, 3, 4, 6, 7, 10, 12, 17, 20, 28, 33, 46, 54, 75, 88, 122, 143, 198, 232, 321, 376, 520, 609, 842, 986, 1363, 1596, 2206, 2583, 3570, 4180, 5777, 6764, 9348, 10945, 15126, 17710, 24475, 28656, 39602, 46367, 64078, 75024, 103681, 121392, 167760, 196417, 271442
Offset: 0

Views

Author

N. J. A. Sloane, Dec 09 2020

Keywords

Comments

Sequences A000071 and A001610 look like long-lost cousins, and this entry smoothly interleaves them. Differences between successive terms are Fibonacci numbers.

Crossrefs

The first differences are essentially A053602.

Programs

  • Mathematica
    Block[{b = {0, 2}, a = {}}, Do[If[EvenQ[i], AppendTo[b, Total@ b[[-2 ;; -1]] + 1 ]; AppendTo[a, Fibonacci[i/2 + 1] - 1], AppendTo[a, b[[(i - 1)/2]]]], {i, 2, 53}]; a] (* Michael De Vlieger, Dec 09 2020 *)
    Table[With[{k=Floor[n/2]},Fibonacci[k+2]+Fibonacci[k]Mod[n,2]-1],{n,0,60}] (* Harvey P. Dale, Jun 24 2025 *)

Formula

a(n) = Fibonacci(k+2) + Fibonacci(k)*(n mod 2) - 1, where k = floor(n/2). - Wesley Ivan Hurt, Dec 09 2020

A345347 Find the largest k with F(k) <= n, where F(k) is the k-th Fibonacci number. a(n) = F(k+2) + n.

Original entry on oeis.org

1, 4, 7, 11, 12, 18, 19, 20, 29, 30, 31, 32, 33, 47, 48, 49, 50, 51, 52, 53, 54, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 199, 200, 201, 202, 203, 204
Offset: 0

Views

Author

Peter Munn, Jun 14 2021

Keywords

Comments

The terms consist of 1 together with numbers that appear in row m of the Wythoff array (A035513) if m is in the sequence.
a(0) = 1, otherwise a(n) is the number whose Zeckendorf representation is "10" followed by the Zeckendorf representation of n.
If we define an extended Zeckendorf representation to be the Zeckendorf representation with "01" appended, then the numbers in the sequence are exactly those whose extended representation starts 101... . This extended representation is a valid Fibonacci base representation if we specify the rightmost digit to have weight F(0) = 0.
Equivalently, for positive integer m, find the largest k with F(k) <= m, where F(k) is the k-th Fibonacci number. m is in the sequence if and only if m >= F(k) + F(k-2).
Numbers given to rabbits on Rabbit 1's branch of the generation tree described in the A035513 examples.
Equivalently, take the positive integers in turn, placing runs of them alternatively into 2 sets, with run lengths from A053602/A051792 (self-interleaved Fibonacci sequence) as follows:
set A: 1 0 1 1 2 3 5 ...
set B: 1 1 2 3 5 8 ...
The sequence lists the numbers in set A.

Examples

			The initial Fibonacci numbers are F(0)..F(5) = 0, 1, 1, 2, 3, 5.
For n = 0, the largest k with F(k) <= 0 is k = 0, so F(k+2) = F(2) = 1, so a(0) = 1 + 0 = 1.
For n = 1, the largest k with F(k) <= 1 is k = 2, so F(k+2) = F(4) = 3, so a(1) = 3 + 1 = 4.
For n = 4, the largest k with F(k) <= 4 is k = 4, so F(k+2) = F(6) = 8, so a(4) = 8 + 4 = 12.
In the paragraph that follows we use the Wythoff array-based definition from the start of the comments.
Every positive integer appears once (only) in the Wythoff array. 0 is not positive, so does not appear in the array, so is not in the sequence. 1 is in the sequence by definition. 2 appears in Wythoff row 0, and 0 is not in the sequence, so 2 is not in the sequence. 4 appears in Wythoff row 1, and 1 is in the sequence, so 4 is in the sequence.
		

Crossrefs

Appears to be column 1 of A194030.

Programs

  • Mathematica
    kmax=12;Flatten[Table[Range[Fibonacci[k]+Fibonacci[k-2],Fibonacci[k+1]-1],{k,2,kmax}]] (* Paolo Xausa, Jan 02 2022 *)
    A108852[n_]:=1+Floor[Log[GoldenRatio,1+n*Sqrt[5]]];
    nterms=100;Table[n+Fibonacci[1+A108852[n]],{n,0,nterms-1}](* Paolo Xausa, Jan 02 2022 *)
  • PARI
    a(n) = my(k=0); while(fibonacci(k)<=n, k=k+1); n+fibonacci(k+1)

Formula

a(n) = A000045(A108852(n)+1) + n.
Union_{k >= 2} {m : F(k)+F(k-2) <= m < F(k+1)}, where F(k) = A000045(k).

A380696 a(n) = A007598(floor(n/2) - (-1)^n).

Original entry on oeis.org

1, 1, 0, 1, 1, 4, 1, 9, 4, 25, 9, 64, 25, 169, 64, 441, 169, 1156, 441, 3025, 1156, 7921, 3025, 20736, 7921, 54289, 20736, 142129, 54289, 372100, 142129, 974169, 372100, 2550409, 974169, 6677056, 2550409, 17480761, 6677056, 45765225, 17480761, 119814916
Offset: 0

Views

Author

Benjamin G. Brunsden, Jan 30 2025

Keywords

Comments

The Fibonacci spiral is produced by creating a quarter circle of radius 1, then adding successive quarter circles such that the radius of the new quarter circle is the sum of the radii of the previous two quarter circles, and that the circumference of the new quarter circle continues where the previous quarter circle ended. When the center of the first quarter circle is at 0,0 the circumference turns clockwise from -1,0, and terms after n=1 are given signs - + + - repeating, these are the x coordinates where the circumferences meet. The y coordinates are the golden rectangle numbers (A001654) with the same pattern of alternation (x,a,b,x), and the same pattern of signs shifted backward one.

Crossrefs

Programs

  • Mathematica
    A380696[n_] := Fibonacci[Floor[n/2] - (-1)^n]^2; Array[A380696, 50, 0] (* or *)
    LinearRecurrence[{0, 2, 0, 2, 0, -1}, {1, 1, 0, 1, 1, 4}, 50] (* Paolo Xausa, Mar 27 2025 *)
  • Python
    from sympy import fibonacci
    def A380696(n): return fibonacci(n+1>>1 if n&1 else (n>>1)-1)**2 # Chai Wah Wu, Mar 26 2025

Formula

a(n) = Fibonacci(floor(n/2)-(-1)^n)^2.
a(n) = A053602(n-2)^2 for n >= 2.
a(n) = A272912(n)^2 for n >= 3.
G.f. ( 1+x-x^3-x^4-2*x^2 ) / ( (1+x^2)*(x^2-x-1)*(x^2+x-1) ).
a(2*n) + a(2*n+1) = A069921(n-1) for n>=1.

A176741 Fibonacci-Chebyshev sequence depending on rabbit sequence A005614.

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 2, 5, 7, 2, 9, 11, 2, 13, 11, 24, 35, 11, 46, 35, 81, 116, 35, 151, 186, 35, 221, 186, 407, 593, 186, 779, 965, 186, 1151, 965, 2116, 3081, 965, 4046, 3081, 7127, 10208, 3081, 13289, 16370, 3081, 19451, 16370, 35821, 52191, 16370, 68561, 52191, 120752
Offset: 0

Views

Author

Wolfdieter Lang, Oct 15 2010

Keywords

Comments

See Viswanath sequences (A078416 and links) for random sequences of this type.

Crossrefs

Cf. A053602 (alternating signs).

Formula

a(n) = a(n-1) + (-1)^(h(n)+1)*a(n-2), with h(n):=A005614(n) (rabbit sequence or Fibonacci word), inputs a(0)=0, a(1)=1.
Previous Showing 11-16 of 16 results.