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

A353427 Numbers k such that the k-th composition in standard order has all run-lengths > 1.

Original entry on oeis.org

0, 3, 7, 10, 15, 31, 36, 42, 43, 58, 63, 87, 122, 127, 136, 147, 170, 171, 175, 228, 234, 235, 250, 255, 292, 295, 343, 351, 471, 484, 490, 491, 506, 511, 528, 547, 586, 591, 676, 682, 683, 687, 698, 703, 904, 915, 938, 939, 943, 983, 996, 1002, 1003, 1018
Offset: 1

Views

Author

Gus Wiseman, May 16 2022

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The terms and corresponding compositions begin:
     0: ()
     3: (1,1)
     7: (1,1,1)
    10: (2,2)
    15: (1,1,1,1)
    31: (1,1,1,1,1)
    36: (3,3)
    42: (2,2,2)
    43: (2,2,1,1)
    58: (1,1,2,2)
    63: (1,1,1,1,1,1)
    87: (2,2,1,1,1)
   122: (1,1,1,2,2)
   127: (1,1,1,1,1,1,1)
		

Crossrefs

The version for partitions is A001694, counted by A007690.
The version for parts instead of lengths is A022340, counted by A212804.
These compositions are counted by A114901.
A subset of A348612 (counted by A261983).
The case of all run-lengths = 2 is A351011.
The case of all run-lengths > 2 is counted by A353400.
A005811 counts runs in binary expansion.
A011782 counts compositions.
A066099 lists compositions in standard order, reverse A228351.
Statistics of standard compositions:
- Length is A000120, sum A070939.
- Runs are counted by A124767.
- Runs-resistance is A333628.
- Run-lengths are A333769.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],!MemberQ[Length/@Split[stc[#]],1]&]

A085405 Common residues of binomial(3n+2,n+1)/(3n+2) modulo 2.

Original entry on oeis.org

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

Views

Author

Paul D. Hanna, Jun 29 2003

Keywords

Comments

The positions of ones are given by A022340 and runs of zeros are given by A085407: both are related to the Fibonacci sequence.

Crossrefs

Programs

  • PARI
    A085405(n) = ((binomial((3*n)+2, n+1)/((3*n)+2))%2); \\ Antti Karttunen, Jan 12 2019
    
  • PARI
    A085405(n) = if(n%2,0,while(n>0, my(nextn=(n>>1)); if(1==(nextn%2)*(n%2), return(0)); n = nextn); (1)); \\ (Much faster than above program) - Antti Karttunen, Jan 12 2019

Formula

a(n) = C(3n+2, n+1)/(3n+2) (Mod 2) = A006013(n) (Mod 2), where A006013 is the self-convolution of A001764 (ternary trees).
a(n) = A323239(A005940(1+n)). - Antti Karttunen, Jan 12 2019

A356843 Numbers k such that the k-th composition in standard order covers an interval of positive integers (gapless) but contains no 1's.

Original entry on oeis.org

2, 4, 8, 10, 16, 18, 20, 32, 36, 42, 64, 68, 72, 74, 82, 84, 128, 136, 146, 148, 164, 170, 256, 264, 272, 274, 276, 290, 292, 296, 298, 324, 328, 330, 338, 340, 512, 528, 548, 580, 584, 586, 594, 596, 658, 660, 676, 682, 1024, 1040, 1056, 1092, 1096, 1098
Offset: 1

Views

Author

Gus Wiseman, Sep 01 2022

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The terms together with their corresponding standard compositions begin:
    2: (2)
    4: (3)
    8: (4)
   10: (2,2)
   16: (5)
   18: (3,2)
   20: (2,3)
   32: (6)
   36: (3,3)
   42: (2,2,2)
   64: (7)
   68: (4,3)
   72: (3,4)
   74: (3,2,2)
   82: (2,3,2)
   84: (2,2,3)
		

Crossrefs

See link for sequences related to standard compositions.
A subset of A022340.
These compositions are counted by A251729.
The unordered version (using Heinz numbers of partitions) is A356845.
A333217 ranks complete compositions.
A356230 ranks gapless factorization lengths, firsts A356603.
A356233 counts factorizations into gapless numbers.
A356841 ranks gapless compositions, counted by A107428.
A356842 ranks non-gapless compositions, counted by A356846.
A356844 ranks compositions with at least one 1.

Programs

  • Mathematica
    nogapQ[m_]:=Or[m=={},Union[m]==Range[Min[m],Max[m]]];
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[100],!MemberQ[stc[#],1]&&nogapQ[stc[#]]&]

Formula

Complement of A333217 in A356841.

A333630 Least STC-number of a composition whose sequence of run-lengths has STC-number n.

Original entry on oeis.org

0, 1, 3, 5, 7, 14, 11, 13, 15, 30, 43, 29, 23, 46, 27, 45, 31, 62, 122, 61, 87, 117, 59, 118, 47, 94, 107, 93, 55, 110, 91, 109, 63, 126, 250, 125, 343, 245, 123, 246, 175, 350, 235, 349, 119, 238, 347, 237, 95, 190, 378, 189, 215, 373, 187, 374, 111, 222, 363
Offset: 0

Views

Author

Gus Wiseman, Mar 31 2020

Keywords

Comments

All terms belong to A003754.
A composition of n is a finite sequence of positive integers summing to n. The composition with STC-number k (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The sequence together with the corresponding compositions begins:
   0: ()
   1: (1)
   3: (1,1)
   5: (2,1)
   7: (1,1,1)
  14: (1,1,2)
  11: (2,1,1)
  13: (1,2,1)
  15: (1,1,1,1)
  30: (1,1,1,2)
  43: (2,2,1,1)
  29: (1,1,2,1)
  23: (2,1,1,1)
  46: (2,1,1,2)
  27: (1,2,1,1)
  45: (2,1,2,1)
  31: (1,1,1,1,1)
  62: (1,1,1,1,2)
		

Crossrefs

Position of first appearance of n in A333627.
All of the following pertain to compositions in standard order (A066099):
- The length is A000120.
- Compositions without terms > 2 are A003754.
- Compositions without ones are ranked by A022340.
- The partial sums from the right are A048793.
- The sum is A070939.
- Adjacent equal pairs are counted by A124762.
- Equal runs are counted by A124767.
- Strict compositions are ranked by A233564.
- The partial sums from the left are A272020.
- Constant compositions are ranked by A272919.
- Normal compositions are ranked by A333217.
- Heinz number is A333219.
- Anti-runs are counted by A333381.
- Adjacent unequal pairs are counted by A333382.
- Runs-resistance is A333628.
- First appearances of run-resistances are A333629.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    seq=Table[Total[2^(Accumulate[Reverse[Length/@Split[stc[n]]]])]/2,{n,0,1000}];
    Table[Position[seq,i][[1,1]],{i,First[Split[Union[seq],#1+1==#2&]]}]-1

A277332 a(n) = A253565(A003714(n)).

Original entry on oeis.org

1, 2, 3, 5, 9, 7, 25, 15, 11, 49, 35, 21, 75, 13, 121, 77, 55, 245, 33, 147, 105, 17, 169, 143, 91, 847, 65, 605, 385, 39, 363, 231, 165, 735, 19, 289, 221, 187, 1859, 119, 1183, 1001, 85, 845, 715, 455, 4235, 51, 507, 429, 273, 2541, 195, 1815, 1155, 23, 361, 323, 247, 3757, 209, 3179, 2431, 133, 2023, 1547, 1309, 13013, 95
Offset: 0

Views

Author

Antti Karttunen, Oct 12 2016

Keywords

Comments

After the initial terms 1, 2 and 3, all other terms can be inductively generated by applying any finite composition-combination of A253560 and A253550 to 3, but with such a restriction that A253560 may not be applied twice in succession.
A permutation of A277334.
Note how A253565(A022340(n)) = A253565(2*A003714(n)) yields a permutation of A056911, odd squarefree numbers.

Examples

			55 = A253550(A253550(A253560(A253550(3)))), 55 is in this sequence.
		

Crossrefs

Cf. A277334 (same sequence sorted into ascending order).
Cf. also A056911, A277006, A277331.

Programs

Formula

a(n) = A253565(A003714(n)).

A333767 Length of shortest run of zeros after a one in the binary expansion of n. a(0) = 0.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Apr 06 2020

Keywords

Examples

			The binary expansion of 148 is (1,0,0,1,0,1,0,0), so a(148) = 1.
		

Crossrefs

Positions of first appearances (ignoring index 0) are A000079.
Positions of terms > 0 are A022340.
Minimum prime index is A055396.
The maximum part minus 1 is given by A087117.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Compositions without 1's are A022340.
- Sum is A070939.
- Product is A124758.
- Runs are counted by A124767.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Runs-resistance is A333628.
- Maximum is A333766.
- Minimum is A333768.
- Weakly decreasing compositions are A114994.
- Weakly increasing compositions are A225620.
- Strictly decreasing compositions are A333255.
- Strictly increasing compositions are A333256.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[If[n==0,0,Min@@stc[n]-1],{n,0,100}]

Formula

For n > 0, a(n) = A333768(n) - 1.

A338317 Number of integer partitions of n with no 1's and pairwise coprime distinct parts, where a singleton is always considered coprime.

Original entry on oeis.org

1, 0, 1, 1, 2, 2, 3, 4, 5, 6, 7, 11, 11, 16, 16, 19, 25, 32, 34, 44, 46, 53, 66, 80, 88, 101, 116, 132, 150, 180, 204, 229, 254, 287, 331, 366, 426, 473, 525, 584, 662, 742, 835, 922, 1013, 1128, 1262, 1408, 1555, 1711, 1894, 2080, 2297, 2555, 2806, 3064, 3376
Offset: 0

Views

Author

Gus Wiseman, Oct 24 2020

Keywords

Examples

			The a(2) = 1 through a(12) = 11 partitions (A = 10, B = 11, C = 12):
  2   3   4    5    6     7     8      9      A       B       C
          22   32   33    43    44     54     55      65      66
                    222   52    53     72     73      74      75
                          322   332    333    433     83      444
                                2222   522    532     92      543
                                       3222   3322    443     552
                                              22222   533     732
                                                      722     3333
                                                      3332    5322
                                                      5222    33222
                                                      32222   222222
		

Crossrefs

A007359 (A302568) gives the strict case.
A101268 (A335235) gives pairwise coprime or singleton compositions.
A200976 (A338318) gives the pairwise non-coprime instead of coprime version.
A304709 (A304711) gives partitions whose distinct parts are pairwise coprime, with strict case A305713 (A302797).
A304712 (A338331) allows 1's, with strict version A007360 (A302798).
A327516 (A302696) gives pairwise coprime partitions.
A328673 (A328867) gives partitions with no distinct relatively prime parts.
A338315 (A337987) does not consider singletons coprime.
A338317 (A338316) gives these partitions.
A337462 (A333227) gives pairwise coprime compositions.
A337485 (A337984) gives pairwise coprime integer partitions with no 1's.
A337665 (A333228) gives compositions with pairwise coprime distinct parts.
A337667 (A337666) gives pairwise non-coprime compositions.
A337697 (A022340 /\ A333227) = pairwise coprime compositions with no 1's.
A337983 (A337696) gives pairwise non-coprime strict compositions, with unordered version A318717 (A318719).

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],!MemberQ[#,1]&&(SameQ@@#||CoprimeQ@@Union[#])&]],{n,0,15}]

Formula

The Heinz numbers of these partitions are given by A338316. The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), giving a bijective correspondence between positive integers and integer partitions.

A085407 Runs of zeros in binomial(3k+2,k+1)/(3k+2) modulo 2 (A085405).

Original entry on oeis.org

1, 1, 3, 1, 5, 1, 1, 11, 1, 1, 3, 1, 21, 1, 1, 3, 1, 5, 1, 1, 43, 1, 1, 3, 1, 5, 1, 1, 11, 1, 1, 3, 1, 85, 1, 1, 3, 1, 5, 1, 1, 11, 1, 1, 3, 1, 21, 1, 1, 3, 1, 5, 1, 1, 171, 1, 1, 3, 1, 5, 1, 1, 11, 1, 1, 3, 1, 21, 1, 1, 3, 1, 5, 1, 1, 43, 1, 1, 3, 1, 5, 1, 1, 11, 1, 1, 3, 1, 341, 1, 1, 3, 1, 5, 1, 1, 11
Offset: 1

Views

Author

Paul D. Hanna, Jun 29 2003

Keywords

Comments

Construction: start with strings S(1)={1}, S(2)={1,3}, S(3)={1,5}; to obtain S(k) for k>3, concatenate all previous strings excluding S(k-1), then replace the last number L in this resulting string with {4L-(-1)^k}. This sequence is the limit of S(k) as k grows, generating strings with Fibonacci growth: {1,1,11}, {1,1,3,1,21}, {1,1,3,1,5,1,1,43}, {1,1,3,1,5,1,1,11,1,1,3,1,85}, ...

Examples

			To generate string S(4) at k=4: concatenate {S(1),S(2)} = {1, 1,3}, then replace the last number L=3 by 4*L-1=11 to obtain S(4)={1,1,11}.
At k=5: concatenate {S(1),S(2),S(3)} = {1, 1,3, 1,5}, then replace the last number L=5 by 4*L+1=21 to obtain S(5)={1,1,3,1,21}.
		

Crossrefs

Cf. A006013, A001045, A085405, A022340 (positions of ones).

Formula

For n>0, a(F(n))=A001045(n), where F(n) is the n-th Fibonacci number with F(1)=1, F(2)=2.

A356809 Fibonacci numbers which are not the sum of two squares.

Original entry on oeis.org

3, 21, 55, 987, 2584, 6765, 17711, 46368, 317811, 832040, 2178309, 5702887, 14930352, 102334155, 267914296, 701408733, 1836311903, 4807526976, 12586269025, 32951280099, 86267571272, 225851433717, 591286729879, 1548008755920, 10610209857723
Offset: 1

Views

Author

Ctibor O. Zizka, Aug 29 2022

Keywords

Examples

			F(4) = 3; 3 != x^2 + y^2 as no positive integers x, y >= 0 are the solution of this Diophantine equation.
		

Crossrefs

Intersection of A000045 and A022544.

Programs

  • Mathematica
    Select[Fibonacci[Range[65]], SquaresR[2, #] == 0 &] (* Amiram Eldar, Aug 29 2022 *)
  • PARI
    is(n)=if(n%4==3, return(1)); my(f=factor(n)); for(i=1, #f~, if(f[i, 1]%4==3 && f[i, 2]%2, return(1))); 0; \\ A022544
    lista(nn) = select(is, apply(fibonacci, [1..nn])); \\ Michel Marcus, Sep 04 2022
    
  • Python
    from itertools import islice
    from sympy import factorint
    def A356809_gen(): # generator of terms
        a, b = 1, 2
        while True:
            if any(p&3==3 and e&1 for p, e in factorint(a).items()):
                yield a
            a, b = b, a+b
    A356809_list = list(islice(A356809_gen(),30)) # Chai Wah Wu, Jan 10 2023

A372554 a(n) = A050602(n, 2n+1).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 05 2024

Keywords

Crossrefs

Cf. A022340 (positions of 0's), A050602.
Cf. A002450 (seems to give the positions of records).
Cf. also A329603.

Programs

Previous Showing 11-20 of 21 results. Next