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

A067993 Consider the sequence of ratios min(t(n-1)/t(n), t(n)/t(n-1)), n=2,3,4,..., where the t(n) are the terms of A067992. Let m be the smallest integer such that all fractions 1/n, 2/n, ..., (n-1)/n have appeared when we reach A067992(m); this sequence gives the values of m; set a(n)=0 if some fraction i/n never appears.

Original entry on oeis.org

1, 2, 4, 6, 18, 10, 20, 32, 38, 42, 44, 64, 104, 110, 118, 134, 144, 148, 264, 252, 266, 270, 272, 412, 418, 432, 438, 442, 444, 498, 530, 586, 712, 720, 722, 730, 744, 1014, 1020, 1024, 1026, 1042, 1154, 1158, 1160, 1172, 1174, 1178, 1516, 1482
Offset: 1

Views

Author

John W. Layman, Feb 06 2002

Keywords

Examples

			Since A067992 begins 1,2,3,1,4,3,..., each of 1/4, 2/4= 1/2 and 3/4 have occurred by the time A067992(6)=3 is reached. Thus a(4)=6.
		

Crossrefs

Cf. A067992.

A326023 Number of subsets of {1..n} containing all of their integer quotients.

Original entry on oeis.org

1, 2, 3, 5, 9, 17, 25, 49, 73, 145, 217, 433, 553, 1105, 1657, 2593, 3937, 7873, 10057, 20113, 26689, 42321, 63481, 126961, 154801, 309601, 464401, 737569, 992161, 1984321, 2450881, 4901761, 6292801, 10197313, 15295969, 26241697, 32947489, 65894977, 98842465, 161587873, 205842529
Offset: 0

Views

Author

Gus Wiseman, Jun 04 2019

Keywords

Comments

These are sets that are closed under taking the quotient of two (not necessarily distinct) divisible terms.

Examples

			The a(0) = 1 through a(5) = 17 subsets:
  {}  {}   {}     {}       {}         {}
      {1}  {1}    {1}      {1}        {1}
           {1,2}  {1,2}    {1,2}      {1,2}
                  {1,3}    {1,3}      {1,3}
                  {1,2,3}  {1,4}      {1,4}
                           {1,2,3}    {1,5}
                           {1,2,4}    {1,2,3}
                           {1,3,4}    {1,2,4}
                           {1,2,3,4}  {1,2,5}
                                      {1,3,4}
                                      {1,3,5}
                                      {1,4,5}
                                      {1,2,3,4}
                                      {1,2,3,5}
                                      {1,2,4,5}
                                      {1,3,4,5}
                                      {1,2,3,4,5}
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],SubsetQ[#,Select[Divide@@@Tuples[#,2],IntegerQ]]&]],{n,0,10}]

Formula

For n > 0, a(n) = A326078(n) + 1.

Extensions

Terms a(21) and beyond from Andrew Howroyd, Aug 30 2019

A057979 a(n) = 1 for even n and (n-1)/2 for odd n.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Nov 13 2000

Keywords

Comments

a(n) = b(n)/c(n) where b(n) = A001405(n+1) - A001405(n), c(n) = gcd(A001405(n+1), A001405(n)).
Also the minimal number of disjoint edge-paths into which the complete graph on n edges can be partitioned - Felix Goldberg (felixg(AT)tx.technion.ac.il), Jan 19 2001
For n >= 2, number of partitions of n-2 into parts that are distinct mod 2. - Giovanni Resta, Feb 06 2006
Sequence starting with a(3) obeys the rule "smallest positive value such that the ordered pair (a(n-1),a(n)) has not occurred previously", or the rule "smallest positive value such that the ratio a(n-1)/a(n) has not occurred previously". The same subsequence has its ordinal transform equal to itself, shifted left. (The ordinal transform has as its n-th term the number of values in a(1),...,a(n) that are equal to a(n).) - Franklin T. Adams-Watters, Dec 13 2006
Numerators of floor(n/2)/n, n > 0. - Wesley Ivan Hurt, Jun 14 2013
Number of nonisomorphic outer planar graphs of order n >= 3, maximum degree 3, and largest possible size. The size is (3n-2)/2 when n is even and (3n-3)/2 when n is odd. - Christian Barrientos and Sarah Minion, Feb 27 2018

Examples

			For n=12, C(12,6) - C(11,5) = 924 - 462 = 462, gcd(C(12,6), C(11,5)) = 462, and the quotient is 1.
For n=13, C(13,6) - C(12,6) = 792, gcd(C(13,6), C(12,6)) = 132, and the quotient is 6.
		

Crossrefs

Programs

  • Haskell
    import Data.List (transpose)
    a057979 n = 1 - rest * (1 - n') where (n', rest) = divMod n 2
    a057979_list = concat $ transpose [repeat 1, [0..]]
    -- Reinhard Zumkeller, Aug 11 2014
    
  • Magma
    [Floor(n/2)^(n mod 2): n in [0..100]]; // Vincenzo Librandi, Mar 17 2015
    
  • Maple
    A057979:=n->(n+1)/4+(3-n)*(-1)^n/4; seq(A057979(k), k=0..100); # Wesley Ivan Hurt, Oct 14 2013
  • Mathematica
    With[{no=45},Riffle[Table[1,{no}],Range[0,no-1]]] (* Harvey P. Dale, Feb 18 2011 *)
  • PARI
    a(n)=if(n%2,n-1,2)/2 \\ Charles R Greathouse IV, Sep 02 2015
    
  • Python
    def A057979(n): return n>>1 if n&1 else 1 # Chai Wah Wu, Jan 04 2024

Formula

a(n) = (n+1)/4+(3-n)*(-1)^n/4. - Paul Barry, Mar 21 2003, corrected by Hieronymus Fischer, Sep 25 2007
a(n) = (a(n-2) + a(n-3)) / a(n-1).
From Paul Barry, Oct 21 2004: (Start)
G.f.: (1-x^2+x^3)/((1+x)^2(1-x)^2);
a(n) = 2*a(n-2) - a(n-4);
a(n) = 0^n + Sum_{k=0..floor((n-2)/2)} C(n-k-2,k) * C(1,n-2k-2). (End)
a(n) = gcd(n-1, floor((n-1)/2)). - Paul Barry, May 02 2005
a(n) = binomial((2n-3)/4-(-1)^n/4, (1-(-1)^n)/2). - Paul Barry, Jun 29 2006
G.f.: (x^3-x^2+1)/(1-x^2)^2 = 1 + x^2*G(0) where G(k) = 1 + x*(k+1)/(1 - x/(x + (k+1)/G(k+1) )); (continued fraction, 3-step). - Sergei N. Gladkovskii, Nov 29 2012
a(n) = binomial(floor(n/2), n mod 2). - Wesley Ivan Hurt, Oct 14 2013
a(n) = 1 - n mod 2 * (1 - floor(n/2)). - Reinhard Zumkeller, Aug 11 2014
a(n) = floor(n/2)^(n mod 2). - Wesley Ivan Hurt, Mar 16 2015
E.g.f.: ((2 + x)*cosh(x) - sinh(x))/2. - Stefano Spezia, Mar 26 2022

A326077 Number of maximal primitive subsets of {1..n}.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 4, 4, 6, 7, 11, 11, 13, 13, 23, 24, 36, 36, 48, 48, 64, 66, 126, 126, 150, 151, 295, 363, 507, 507, 595, 595, 895, 903, 1787, 1788, 2076, 2076, 4132, 4148, 5396, 5396, 6644, 6644, 9740, 11172, 22300, 22300, 26140, 26141, 40733, 40773, 60333, 60333, 80781, 80783
Offset: 0

Views

Author

Gus Wiseman, Jun 05 2019

Keywords

Comments

a(n) is the number of maximal primitive subsets of {1, ..., n}. Here primitive means that no element of the subset divides any other and maximal means that no element can be added to the subset while maintaining the property of being pairwise indivisible. - Nathan McNew, Aug 10 2020

Examples

			The a(0) = 1 through a(9) = 7 sets:
  {}  {1}  {1}  {1}   {1}   {1}    {1}    {1}     {1}     {1}
           {2}  {23}  {23}  {235}  {235}  {2357}  {2357}  {2357}
                      {34}  {345}  {345}  {3457}  {3457}  {2579}
                                   {456}  {4567}  {3578}  {3457}
                                                  {4567}  {3578}
                                                  {5678}  {45679}
                                                          {56789}
		

Crossrefs

Programs

  • Mathematica
    stableQ[u_, Q_]:=!Apply[Or, Outer[#1=!=#2&&Q[#1, #2]&, u, u, 1], {0, 1}];
    fasmax[y_]:=Complement[y, Union@@(Most[Subsets[#]]&/@y)];
    Table[Length[fasmax[Select[Subsets[Range[n]],stableQ[#,Divisible]&]]],{n,0,10}]
  • PARI
    divset(n)={sumdiv(n, d, if(dif(k>#p, ismax(b), my(f=!bitand(p[k], b)); if(!f || bittest(d, k), self()(k+1, b)) + if(f, self()(k+1, b+(1<Andrew Howroyd, Aug 30 2019

Extensions

Terms a(19) to a(55) from Andrew Howroyd, Aug 30 2019
Name edited by Nathan McNew, Aug 10 2020

A326079 Number of subsets of {1..n} containing all of their integer quotients > 1.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 48, 96, 144, 288, 432, 864, 1104, 2208, 3312, 5184, 7872, 15744, 20112, 40224, 53376, 84640, 126960, 253920, 309600, 619200, 928800, 1475136, 1984320, 3968640, 4901760, 9803520, 12585600, 20394624, 30591936, 52483392, 65894976, 131789952, 197684928, 323175744, 411685056
Offset: 0

Views

Author

Gus Wiseman, Jun 05 2019

Keywords

Comments

These sets are closed under taking the quotient of two distinct divisible terms.

Examples

			The a(6) = 48 subsets:
  {}  {1}  {1,2}  {1,2,3}  {1,2,3,4}  {1,2,3,4,5}  {1,2,3,4,5,6}
      {2}  {1,3}  {1,2,4}  {1,2,3,5}  {1,2,3,4,6}
      {3}  {1,4}  {1,2,5}  {1,2,3,6}  {1,2,3,5,6}
      {4}  {1,5}  {1,3,4}  {1,2,4,5}  {2,3,4,5,6}
      {5}  {1,6}  {1,3,5}  {1,3,4,5}
      {6}  {2,3}  {1,4,5}  {1,4,5,6}
           {2,4}  {1,4,6}  {2,3,4,5}
           {2,5}  {1,5,6}  {2,3,4,6}
           {3,4}  {2,3,4}  {2,3,5,6}
           {3,5}  {2,3,5}
           {4,5}  {2,3,6}
           {4,6}  {2,4,5}
           {5,6}  {3,4,5}
                  {4,5,6}
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],SubsetQ[#,Divide@@@Select[Tuples[#,2],UnsameQ@@#&&Divisible@@#&]]&]],{n,0,10}]

Formula

For n > 0, a(n) = 2 * A326078(n) = 2 * (A326023(n) - 1).

Extensions

Terms a(21) and beyond from Andrew Howroyd, Aug 30 2019

A325869 Number of maximal subsets of {1..n} containing n such that every pair of distinct elements has a different quotient.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 6, 6, 6, 20, 32, 29, 57, 83, 113, 183, 373, 233, 549, 360
Offset: 1

Views

Author

Gus Wiseman, Jun 02 2019

Keywords

Examples

			The a(1) = 1 through a(7) = 6 subsets:
  {1}  {1,2}  {1,2,3}  {1,3,4}  {1,2,3,5}  {1,2,5,6}    {1,2,3,5,7}
                       {2,3,4}  {1,3,4,5}  {2,3,5,6}    {1,2,5,6,7}
                                {2,3,4,5}  {2,4,5,6}    {2,3,4,5,7}
                                           {1,3,4,5,6}  {2,3,5,6,7}
                                                        {2,4,5,6,7}
                                                        {1,3,4,5,6,7}
		

Crossrefs

Programs

  • Mathematica
    fasmax[y_]:=Complement[y,Union@@(Most[Subsets[#]]&)/@y];
    Table[Length[fasmax[Select[Subsets[Range[n]],MemberQ[#,n]&&UnsameQ@@Divide@@@Subsets[#,{2}]&]]],{n,10}]

A326078 Number of subsets of {2..n} containing all of their integer quotients > 1.

Original entry on oeis.org

1, 1, 2, 4, 8, 16, 24, 48, 72, 144, 216, 432, 552, 1104, 1656, 2592, 3936, 7872, 10056, 20112, 26688, 42320, 63480, 126960, 154800, 309600, 464400, 737568, 992160, 1984320, 2450880, 4901760, 6292800, 10197312, 15295968, 26241696, 32947488, 65894976, 98842464, 161587872, 205842528
Offset: 0

Views

Author

Gus Wiseman, Jun 05 2019

Keywords

Comments

These sets are closed under taking the quotient of two distinct divisible terms.

Examples

			The a(6) = 24 subsets:
  {}  {2}  {2,3}  {2,3,4}  {2,3,4,5}  {2,3,4,5,6}
      {3}  {2,4}  {2,3,5}  {2,3,4,6}
      {4}  {2,5}  {2,3,6}  {2,3,5,6}
      {5}  {3,4}  {2,4,5}
      {6}  {3,5}  {3,4,5}
           {4,5}  {4,5,6}
           {4,6}
           {5,6}
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[2,n]],SubsetQ[#,Divide@@@Select[Tuples[#,2],UnsameQ@@#&&Divisible@@#&]]&]],{n,0,10}]
  • PARI
    a(n)={
        my(lim=vector(n, k, sqrtint(k)));
        my(accept(b, k)=for(i=2, lim[k], if(k%i ==0 && bittest(b,i) != bittest(b,k/i), return(0))); 1);
        my(recurse(k, b)=
          my(m=1);
          for(j=max(2*k,n\2+1), min(2*k+1,n), if(accept(b,j), m*=2));
          k++;
          m*if(k > n\2, 1, (self()(k, b) + if(accept(b, k), self()(k, b + (1<Andrew Howroyd, Aug 30 2019

Formula

For n > 0, a(n) = A326023(n) - 1.
For n > 0, a(n) = A326079(n)/2.

Extensions

Terms a(21) and beyond from Andrew Howroyd, Aug 30 2019

A080427 a(1)=1 and, for n>1, a(n) is the smallest positive integer such that the absolute difference |a(n)-a(n-1)| has not occurred previously.

Original entry on oeis.org

1, 1, 2, 4, 1, 5, 10, 1, 7, 14, 1, 9, 19, 1, 12, 24, 1, 15, 30, 1, 17, 34, 1, 20, 40, 1, 22, 44, 1, 25, 50, 1, 27, 54, 1, 29, 59, 1, 32, 64, 1, 35, 70, 1, 37, 74, 1, 39, 79, 1, 42, 84, 1, 45, 90, 1, 47, 94, 1, 49, 99, 1, 52, 104, 1, 55, 110, 1, 57, 114, 1, 60, 120, 1, 62, 124, 1, 65, 130
Offset: 1

Views

Author

John W. Layman, Feb 19 2003

Keywords

Comments

It appears (1) that a(3n+2)=1 for n=1,2,3,... and (2) that the sequence {a(3n+3)-a(3n)}={3,2,2,3,3,2,3,2,3,2,2,3,3,2,2,3,3,2,...} consists only of 2's and 3's and that the sequence of the lengths of runs of consecutive 3's in {a(3n+3)-a(3n)} is given by {1,2,1,1,2,2,2,1,...}=A026465.

Crossrefs

Programs

  • PARI
    { my(s=0, v=1, d); for (n=1, 79, print1 (v, ", "); for (w=1, oo, if (!bittest(s, d=abs(v-w)), s+=2^d; v=w; break))) } \\ Rémy Sigrist, Apr 12 2020

Formula

It appears that abs(a(n+2)-a(n+1)) = A101544(n) for any n > 0. - Rémy Sigrist, Apr 12 2020

A290633 Lexicographically earliest sequence of positive integers such that, for any m and n > 0, gcd(a(n), a(n+1)) > 1 and a(n) != a(n+2), and if m < n then a(m) != a(n) or a(m+1) != a(n+1).

Original entry on oeis.org

2, 2, 4, 4, 2, 6, 3, 3, 6, 2, 8, 4, 6, 6, 4, 8, 2, 10, 4, 12, 2, 14, 4, 10, 2, 12, 3, 9, 6, 8, 8, 6, 9, 3, 12, 4, 14, 2, 16, 4, 18, 2, 20, 4, 16, 2, 18, 3, 15, 5, 5, 10, 6, 12, 8, 10, 5, 15, 3, 18, 4, 20, 2, 22, 4, 24, 2, 26, 4, 22, 2, 24, 3, 21, 6, 10, 8, 12
Offset: 1

Views

Author

Rémy Sigrist, Aug 08 2017

Keywords

Comments

a(n) > 1 for any n > 0.
If we drop the constraint "a(n) != a(n+2)", then we obtain the positive even numbers interspersed with 2's: 2, 2, 4, 2, 6, ...
Conjecturally, (a(n), a(n+1)) runs over all pairs of noncoprime positive integers; in this sense, this sequence is opposite to sequences like Stern's diatomic series (A002487).
This sequence has connections with A067992: here we avoid duplicate ordered pairs of consecutive terms, there unordered pairs, here we deal with noncoprime consecutive terms, there we (conjecturally) have coprime consecutive terms; also, the scatterplots of these sequences have similarities.
For any prime p, the sequence contains a multiple of p: by contradiction:
- let p be the least prime whose multiples are missing from the sequence (note that p > 2),
- there is only a finite number of pairs of noncoprime (p-1)-smooth numbers < p^2,
- so eventually we must have a term, say a(m), > p^2,
- if q is the least prime factor of a(m-1), then p*q would have been a better choice for a(m), hence the contradiction.
Also, if p is an odd prime, then the first multiple of p appearing in the sequence is a semiprime p*q with q < p.
If p < q are prime, then the first multiple of p appears before the first multiple of q.
For any prime p, the first occurrence of p in the sequence is immediately followed by a second occurrence of p.
For any prime p > 3:
- there is a semiprime p*q with q < p in the sequence,
- if q = 2, then this first p*q is followed by a 4,
- if q > 2, then this first p*q is followed by a 2,
- so there are infinitely many 2's or 4's in the sequence,
- if there are infinitely many 2's in the sequence, then the n-th occurrence of 2 is followed by 2*(n+e) with |e| <= 1, and every even
number appears in the sequence,
- the same conclusion applies if there are infinitely many 4's,
- hence every even number appear in the sequence.
For any n > 1, the first occurrence of n in the sequence must be either preceded or followed by the least prime factor of n (A020639).

Examples

			a(1) = 2 is suitable.
a(2) = 2 is suitable.
a(3) cannot be either 2 (=a(1)) or 3 (gcd(2,3)=1).
a(3) = 4 is suitable.
a(4) cannot be either 2 (=a(2)) or 3 (gcd(4,3)=1).
a(4) = 4 is suitable.
a(5) = 2 is suitable.
a(6) cannot be 2 (pair (2,2) already seen), 3 (gcd(2,3)=1), 4 (pair (2,4) already seen) or 5 (gcd(2,5)=1).
a(6) = 6 is suitable.
		

Crossrefs

Programs

  • PARI
    See Links section.

A326082 Number of maximal sets of pairwise indivisible divisors of n.

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 2, 4, 3, 3, 2, 5, 2, 3, 3, 5, 2, 5, 2, 5, 3, 3, 2, 8, 3, 3, 4, 5, 2, 7, 2, 6, 3, 3, 3, 9, 2, 3, 3, 8, 2, 7, 2, 5, 5, 3, 2, 12, 3, 5, 3, 5, 2, 8, 3, 8, 3, 3, 2, 15, 2, 3, 5, 7, 3, 7, 2, 5, 3, 7, 2, 15, 2, 3, 5, 5, 3, 7, 2, 12, 5, 3, 2, 15, 3
Offset: 1

Views

Author

Gus Wiseman, Jun 05 2019

Keywords

Comments

Depends only on prime signature.
The non-maximal case is A096827.

Examples

			The maximal sets of pairwise indivisible divisors of n = 1, 2, 4, 8, 12, 24, 30, 32, 36, 48, 60 are:
   1   1   1   1   1     1      1         1    1       1       1
       2   2   2   12    24     30        2    36      48      60
           4   4   2,3   2,3    5,6       4    2,3     2,3     2,15
               8   3,4   3,4    2,15      8    2,9     3,4     3,20
                   4,6   3,8    3,10      16   3,4     3,8     4,30
                         4,6    2,3,5     32   4,18    4,6     5,12
                         6,8    6,10,15        9,12    6,8     2,3,5
                         8,12                  12,18   3,16    3,4,5
                                               4,6,9   6,16    4,5,6
                                                       8,12    3,4,10
                                                       12,16   6,15,20
                                                       16,24   10,12,15
                                                               12,15,20
                                                               12,20,30
                                                               4,6,10,15
		

Crossrefs

Programs

  • Mathematica
    stableQ[u_,Q_]:=!Apply[Or,Outer[#1=!=#2&&Q[#1,#2]&,u,u,1],{0,1}];
    fasmax[y_]:=Complement[y,Union@@(Most[Subsets[#]]&/@y)];
    Table[Length[fasmax[Select[Rest[Subsets[Divisors[n]]],stableQ[#,Divisible]&]]],{n,100}]
Showing 1-10 of 10 results.