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.

User: Howard A. Landman

Howard A. Landman's wiki page.

Howard A. Landman has authored 25 sequences. Here are the ten most recent ones:

A295163 Max odd N reached by Collatz sequence "record setters".

Original entry on oeis.org

1, 5, 17, 53, 3077, 83501, 425645, 2270045, 2717873, 9038141, 35452673, 197759717, 523608245, 827370449, 5734125917, 46548912269, 117539270981, 207572633873, 286185056525, 439600764977, 804164538869, 1599998981789, 20114203639877, 102098975067917
Offset: 0

Author

Howard A. Landman, Nov 14 2017

Keywords

Comments

Sequence A025587 gives the starting numbers which "break the record", in the Collatz problem, for the ratio of the highest (even) number reached to the starting number. This sequence gives the corresponding highest odd number reached. That is, a(n) = highest odd number reached in Collatz problem starting from A025587(n) = (highest even number reached, minus 1) divided by 3. It is therefore monotonic increasing by definition, and also a(n)/A025587(n) is monotonic increasing by definition.

Crossrefs

Cf. A025587 for starting numbers and A061523 for (truncated, even) blowup factors.

Programs

  • Python
    # Print numbers with higher ratio of max Collatz descendant to self
    # than that of any previous number.
    # First column is OEIS sequence A025587 (the starting numbers).
    # Second column is this sequence (their max odd descendants).
    # Third column is OEIS sequence A061523 (before truncation).
    i = 1
    max_ratio = 1.0
    while(True):
        n = i
        max_n = n
        while n >= i: # Done as soon as we dip below starting point
            n = 3*n + 1
            max_n = max(n, max_n)
            while (n&1) == 0:
                n = n >> 1
        ratio = float(max_n) / i
        if ratio > max_ratio:
            max_ratio = ratio
            print(i, (max_n - 1)/3, max_ratio)
        i += 2
    # Howard A. Landman, Nov 15 2017

A271620 First row (row 0) of the Sprague-Grundy values of "3-pile Sharing Nim".

Original entry on oeis.org

0, 0, 1, 0, 0, 0, 1, 0, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 12, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 1, 0, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3, 0, 1, 0, 0, 0, 1, 0, 3, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 1, 0, 2
Offset: 0

Author

Howard A. Landman, Apr 10 2016

Keywords

Comments

a(n) is G(0,0,n) = G(0,n,n) for 3-pile Sharing Nim.
If n is odd, a(n)=0. If n={4,12,16,20,28} (mod 32), a(n) is also 0.
If n=2 (mod 4), a(n)=1.
Thus all the "interesting" values are for n={0,8,24} (mod 32).
Ho conjectures that the sequence may be bounded. The highest value in the first thousand entries is a(24)=12.
Despite the simplicity of the "uninteresting" values, the "interesting" ones are provably not periodic, which means the entire sequence is not periodic.

Examples

			a(0)=a(1)=0 because there are no moves from (0,0,0) or (0,0,1). a(2)=1 because there is a move from (0,0,2) to (0,1,1), which has no moves and hence is value 0.
		

Formula

a(n)=0 if and only if n=0 or n=2^{2i}(2j+1) for some i,j>=0. This by itself proves the aperiodicity, since even the locations of the 0's are not periodic. Note that i=0 covers the "n is odd" case, i=1 covers the "n={4,12,20,28} (mod 32)" cases, i=2 covers the "n=16 (mod 32)" case, and i>=3 all fall under "n=0 (mod 32)". Thus the values for n={8,24} (mod 32) can never be 0.
The formula also implies that the limit of the density of zeros as n goes to infinity is 1/2 + 1/8 + 1/32 + 1/128 + ... = 2/3. - Howard A. Landman, Apr 20 2016

A168553 a(n) = 1 if it is possible to place n sets of n queens on an n X n chessboard with no two queens of the same set attacking each other.

Original entry on oeis.org

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

Author

Howard A. Landman, Nov 29 2009

Keywords

Comments

Obviously this sequence must be a subset of the positive integers for which a single n-queens solution exists, which is all integers except 2 and 3. It is a proper subset, because e.g. there is a single-set solution for 4 X 4 or 8 X 8 but no n-set solution. George Polya showed that a doubly periodic solution for the n-queens problem exists if and only if n = 1 or 5 (mod 6). For years, due to this result, it was assumed that this defined the sequence, which would then have been an infinite repetition of 1,0,0,0,1,0. However, Patrick Hamlyn and Guenter Stertenbrink tried brute force on 12 X 12 and found 178 12-set solutions built from non-doubly-periodic sets. Thus the Polya condition only provides a lower bound, and the exact continuation of this sequence is an open research question.

Examples

			For n=1 a single queen is a solution. For n=2 or 3 there is no single-set solution. For n=4, there are 2 single-set solutions, and they can both fit on the board together, but these are insufficient to make a 4-set solution. For n=5, there is a doubly-periodic single-set solution by Polya's construction, which can be tiled to make a 5-set solution
		

References

  • G. Polya, Uber die 'doppelt-periodischen' Losungen des n-Damen-Problems. In Mathematische Unterhaltungen und Spiele, W. Ahrens, Ed., Teubner, Leipzig, 1918, pp. 364-374.

Crossrefs

A000170 gives the number of single-set solutions. A007705 gives the number of Polya-style doubly-periodic single-set solutions (with even n omitted since they are all 0).

A171760 The maximum number of sets of n queens which can be placed on an n X n chessboard such that no queen attacks another queen in the same set.

Original entry on oeis.org

0, 1, 0, 0, 2, 5, 4, 7, 6, 7, 8, 11, 12, 13, 14, 15, 16, 17
Offset: 0

Author

Howard A. Landman, Dec 17 2009

Keywords

Comments

a(n) is nonzero for n >= 4 (there is always at least one solution to the n-queens problem). a(n) <= n (because n sets of n queens fill up the board). a(n) = n if n = 1 or 5 (mod 6).
a(n) is at least two for all even n >= 4 since a solution and its reflection will fit on the same board. - Charlie Neder, Jul 24 2018
In addition a(18) >= 16 and a(20) = 20. - Benjamin Butin, Dec 11 2023

Examples

			a(4) = 2 because there are only two solutions to the 4-queens problem and they can both fit on the same board:
 0 1 2 0
 2 0 0 1
 1 0 0 2
 0 2 1 0
a(8) = 6 since at least 6 solutions to the 8-queens problem can fit on the same board but 7 solutions can't:
 3 0 5 2 1 6 0 4
 0 1 4 0 5 3 2 6
 4 6 0 1 2 0 5 3
 5 2 3 6 0 4 1 0
 6 4 1 5 0 2 3 0
 2 5 0 3 4 0 6 1
 0 3 2 0 6 1 4 5
 1 0 6 4 3 5 0 2
a(9) = 7
 7 5 6 3 1 . . 2 4
 6 3 . 4 2 7 1 . 5
 . . 2 7 5 6 3 4 1
 4 7 5 1 . 2 . 6 3
 3 1 4 . 6 . 7 5 2
 . 6 . 5 3 4 2 1 7
 2 4 7 6 . 1 5 3 .
 5 . 1 2 7 3 4 . 6
 1 2 3 . 4 5 6 7 .
a(10) = 8
 3 4 2 8 . . 1 7 5 6
 6 . 7 1 5 4 8 2 . 3
 . 1 5 6 7 2 3 4 8 .
 2 8 4 . 3 6 . 5 1 7
 7 . 6 5 1 8 4 3 . 2
 8 3 . 4 2 7 5 . 6 1
 5 6 8 7 . . 2 1 3 4
 4 7 3 . 8 1 . 6 2 5
 . 5 1 2 6 3 7 8 4 .
 1 2 . 3 4 5 6 . 7 8
		

Crossrefs

Cf. A000170.

Extensions

a(6) and known a(7) added by Charlie Neder, Jul 24 2018
a(8)-a(10) and known a(11)-a(13) from Giovanni Resta, Jul 26 2018
a(14) from Benjamin Butin, Nov 07 2023
a(15)-a(17) from Benjamin Butin, Dec 11 2023

A173732 a(n) = (A016957(n)/2^A007814(A016957(n)) - 1)/2, with A016957(n) = 6*n+4 and A007814(n) the 2-adic valuation of n.

Original entry on oeis.org

0, 2, 0, 5, 3, 8, 2, 11, 6, 14, 0, 17, 9, 20, 5, 23, 12, 26, 3, 29, 15, 32, 8, 35, 18, 38, 2, 41, 21, 44, 11, 47, 24, 50, 6, 53, 27, 56, 14, 59, 30, 62, 0, 65, 33, 68, 17, 71, 36, 74, 9, 77, 39, 80, 20, 83, 42, 86, 5, 89, 45, 92, 23, 95, 48, 98, 12, 101, 51, 104, 26, 107, 54, 110, 3
Offset: 0

Author

Howard A. Landman, Feb 22 2010

Keywords

Comments

All positive integers eventually reach 1 in the Collatz problem iff all nonnegative integers eventually reach 0 with repeated application of this map, i.e., if for all n, the sequence n, a(n), a(a(n)), a(a(a(n))), ... eventually hits 0.
0 <= a(n) <= (3n+1)/2, with the upper bound being achieved for all odd n.
The positions of the zeros are given by A020988 = (2/3)*(4^n-1). This is because if n = (2/3)*(4^k-1), then m = 2n+1 = (1/3)*(4^(k+1)-1), and 3m+1 = 4^(k+1) is a power of 4. - Howard A. Landman, Mar 14 2010
Subsequence of A025480, a(n) = A025480(3n+1), i.e., A025480 = 0,[0],1,0,[2],1,3,[0],4,2,[5],1,6,[3],7,0,[8],4,9,[2],10,5,[11],1,12,[6],13,3,[14],... with elements of A173732 in brackets. - Paul Tarau, Mar 21 2010
A204418(a(n)) = 1. - Reinhard Zumkeller, Apr 29 2012
Original name: "A compression of the Collatz (or 3x+1) sequence considered as a map from odd numbers to odd numbers." - Michael De Vlieger, Oct 07 2019

Examples

			a(0) = 0 because 2n+1 = 1 (the first odd number), 3*1 + 1 = 4, dividing all powers of 2 out of 4 leaves 1, and (1-1)/2 = 0.
a(1) = 2 because 2n+1 = 3, 3*3 + 1 = 10, dividing all powers of 2 out of 10 leaves 5, and (5-1)/2 = 2.
		

Crossrefs

Programs

  • C
    #include  main() { int k,m,n; for (k = 0; ; k++) { n = 2*k + 1 ; m = 3*n + 1 ; while (!(m & 1)) { m >>= 1 ; } printf("%d,",((m - 1) >> 1)); } }
    
  • Haskell
    a173732 n = a173732_list !! n
    a173732_list = f $ tail a025480_list where f (x :  :  : xs) = x : f xs
    -- Reinhard Zumkeller, Apr 29 2012
    
  • Mathematica
    Array[(#/2^IntegerExponent[#, 2] - 1)/2 &[6 # + 4] &, 75, 0] (* Michael De Vlieger, Oct 06 2019 *)
  • PARI
    odd(n) = n >> valuation(n, 2);
    a(n) = (odd(6*n+4) - 1)/2; \\ Amiram Eldar, Aug 26 2024

Formula

From Amiram Eldar, Aug 26 2024: (Start)
a(n) = (A075677(n+1) - 1)/2.
Sum_{k=1..n} a(k) ~ n^2 / 2. (End)

Extensions

Name changed by Michael De Vlieger, Oct 07 2019

A092177 a(n) = position of first occurrence of n in A093578. I.e., A093578(a(n)) = n and a(n) is the smallest number for which that is true.

Original entry on oeis.org

2, 0, 28, 105, 217, 259, 407, 511, 406, 598, 700, 889, 997, 1081, 1162, 1235, 1183, 1396, 1501, 1609, 1606, 1624, 1777, 1987, 1921, 1942, 2059, 2237, 2108, 2404, 2401, 2362, 2464, 2425, 2657, 2812, 2824, 2809, 2821, 2887, 3080, 2947, 3299, 3244, 3460
Offset: 0

Author

Howard A. Landman, Apr 01 2004

Keywords

Examples

			a(2) = 28 because 28 is the smallest number for which A093578 equals 2.
		

Crossrefs

Cf. A093578.

A093579 Take m sheets of paper, arrange them into piles, write on each sheet the cardinality (number of sheets) of its pile. Do this again, so each sheet is labeled by an ordered pair of positive integers. An integer m is in this sequence if there is a way to do this such that every sheet has a unique label, i.e., if A093578(m) > 0.

Original entry on oeis.org

0, 1, 3, 4, 6, 7, 10, 11, 13, 14, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 29, 31, 32, 34, 35, 36, 37, 39, 40, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 55, 56, 58, 59, 61, 62, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 81, 82, 84, 85, 88, 89, 91, 92, 93, 94, 95
Offset: 0

Author

Howard A. Landman, Apr 01 2004

Keywords

Examples

			4 is in this sequence because A093578(4) = 1 > 0; 5 is not in this sequence because A093578(5) = 0.
		

Crossrefs

A091823 a(n) = 2*n^2 + 3*n - 1.

Original entry on oeis.org

4, 13, 26, 43, 64, 89, 118, 151, 188, 229, 274, 323, 376, 433, 494, 559, 628, 701, 778, 859, 944, 1033, 1126, 1223, 1324, 1429, 1538, 1651, 1768, 1889, 2014, 2143, 2276, 2413, 2554, 2699, 2848, 3001, 3158, 3319, 3484, 3653, 3826, 4003, 4184, 4369, 4558, 4751
Offset: 1

Author

Howard A. Landman, Mar 08 2004

Keywords

Comments

a(n) is the position of the row in Pascal's triangle (A007318) in which three consecutive entries appear in the ratio n: n+1: n+2. (Even valid for n = 0 if you allow for a position of -1 to have value 0.) The solution is unique for each n.
The row numbers are given by A060626.
This sequence plus 1 (i.e., a(n) = 2*n^2 + 3*n) is the sequence A014106. - Howard A. Landman, Mar 28 2004
If Y and Z are a 2-blocks of a 2n-set X then, for n>=2, a(n-1) is the number of (2n-2)-subsets of X intersecting Y. - Milan Janjic, Nov 18 2007
One might prepend an initial -1: "-1, 4, 13, 26, 43, ..." - Vladimir Joseph Stephan Orlovsky, Oct 25 2008 (This would require too many other changes. - N. J. A. Sloane, Mar 27 2014)

Examples

			Entries in the ratio 1:2:3 appear in row 14 of Pascal's triangle (A007318) starting at position 4 (1001, 2002, 3003). Entries in the ratio 2:3:4 appear in row 34 of Pascal's triangle starting at position 13 (927983760, 1391975640, 1855967520); and so on (row 62, pos. 26; row 98, pos. 43; ...).
		

Crossrefs

Programs

Formula

a(n) = n + 4*binomial(2+n, n), with offset 0. - Zerinvary Lajos, May 12 2006
G.f.: x*(4 + x - x^2)/(1 - x)^3. - Vincenzo Librandi, Mar 28 2014
a(n) = A000290(n+1) + 2*A000217(n) - 2. - Leo Tavares, Aug 31 2023
E.g.f.: 1 + exp(x)*(2*x^2 + 5*x - 1). - Stefano Spezia, Jun 16 2024

A093578 Take n sheets of paper, arrange them into piles, write on each sheet the cardinality (number of sheets) of its pile. Do this again, so each sheet is labeled by an ordered pair of positive integers. How many ways can this be done so that every sheet has a unique label? (Only distinct sets of labels count, not every permutation of the labels or sheets.).

Original entry on oeis.org

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

Author

Howard A. Landman, Apr 01 2004

Keywords

Comments

If n is a triangular number (A000217), then there is a trivial solution using piles of 1,2,3,...,k, where n = k(k+1)/2. All solutions are based on sums of triangular numbers, but not all such sums are legal. No indices of the triangular numbers can have a ratio smaller than 2; if they do then labels from the two triangles are not disjoint. a(28) = 2 because we can either use the trivial T(7) = 28 solution or the T(6) + T(3) + T(1) = 21 + 6 + 1 = 28 solution. A093579 gives the integers for which there is a solution, so that a(A093579(n)) > 0 for all n.

Examples

			a(1) = 1 because the only possible label is (1,1); a(2) = 0 because there is no way to prevent both pieces of paper from getting labeled identically.
		

Crossrefs

A082538 Number of numbers k which give 1 after applying exactly n iterations of the 3k+1 algorithm (if a number is even, divide it by 2; if it is odd, multiply by 3 and add 1). This total includes numbers k which also give 1 for a smaller number of iterations (i.e., for this sequence we do not assume the algorithm halts when 1 is reached).

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 6, 7, 10, 12, 15, 20, 26, 33, 44, 55, 69, 88, 113, 141, 179, 226, 284, 358, 453, 571, 724, 913, 1149, 1456, 1839, 2323, 2945, 3718, 4688, 5933, 7498, 9476, 11982, 15126, 19111, 24172, 30535, 38563, 48733, 61560, 77792, 98313, 124240
Offset: 0

Author

Howard A. Landman, May 23 2003

Keywords

Examples

			a(3)=2 because both 1 and 8 lead to 1 in 3 steps (1->4->2->1 and 8->4->2->1).
		

References

  • Gunther J. Wirsching, "The Dynamical System Generated by the 3n+1 Function" Lecture Notes in Mathematics (Springer Verlag, 1999), p. 1681

Programs

  • Perl
    #!/usr/bin/perl @old = ( 1 ); while (1) { print scalar(@old), " "; @new = ( ); foreach $n (@old) { if (($n % 6) == 4) { push(@new,($n-1)/3); } push(@new,$n+$n); } @old = @new; } sub numeric { return ($a <=> $b); }