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: Jack W Grahl

Jack W Grahl's wiki page.

Jack W Grahl has authored 33 sequences. Here are the ten most recent ones:

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

Original entry on oeis.org

-1, 2, -5, 14, -41, 122, -365, 1094, -3281, 9842, -29525, 88574, -265721, 797162, -2391485, 7174454, -21523361, 64570082, -193710245, 581130734, -1743392201, 5230176602, -15690529805, 47071589414, -141214768241, 423644304722, -1270932914165, 3812798742494, -11438396227481, 34315188682442
Offset: 0

Author

Jack W Grahl, Feb 12 2021

Keywords

Comments

Shown by Tutte (he erroneously gave the negative of this sequence) to be the value of the function g(X_n), where X_n is the graph with one vertex and n loops, and g() is the extension to all graphs of the function f(G) defined on trivalent graphs by f(G) =(-1)^n.Q(G), where 2n is the number of vertices of G, and Q(G) is the number of spanning subgraphs of G such that every vertex of G is incident with 2 edges, and obeying the recursions discussed by Tutte in the article.
This sequence is given in balanced ternary representation as (-1), 1(-1), (-1)11, 1(-1)(-1)(-1), (-1)1111, 1(-1)(-1)(-1)(-1)(-1), etc.

References

  • W. T. Tutte, Some polynomials associated with graphs, Combinatorics, Proceedings of the British Combinatorial Conference. Vol. 13. Cambridge Univ. Press London, 1973.

Crossrefs

Absolute values give A007501.
Cf. A076040.

Programs

  • Python
    def a(n):
        return (-1)**(n+1) * (3 ** n + 1) // 2

Formula

a(n) = -4*a(n-1) - 3*a(n-2) for n > 1.
G.f.: -(1 + 2*x)/(1 + 4*x + 3*x^2). - Stefano Spezia, Feb 13 2021

A320505 Index of the first occurrence of n consecutive 0's in A164349.

Original entry on oeis.org

0, 2, 7, 2046
Offset: 1

Author

Jack W Grahl, Oct 13 2018

Keywords

Comments

Indexes are 0-based since A164349 has lead index 0.
The first 4 terms were found empirically and given in a comment to A164349 by Robert G Wilson.
The 5th term is 2^2059 - 3.
Each term is roughly 2 to the power of the previous term.

Examples

			Let us call A(n) the string of 0's and 1's given by applying the step "repeat and drop the last symbol" n times to A(0) = 01. Let B be the operation "drop the last symbol", e.g., B(01) = 0. Then A(n+1) = A(n) + B(A(n)) and A(n+m) = A(n) + ... B^m(A(n)). Then if A(n) contains a sequence of k consecutive 0's and no longer sequence, let p be the number of digits which follow after the end of the last occurrence of this sequence in A(n). In other words, B^p(A(n)) ends in a sequence of exactly k 0's. So A(n+p) = A(n) + ... + B^p(A(n)) also ends in a sequence of k 0's. Therefore A(n+p+1), since it concatenates A(n+p) with B(A(n+p)), which starts with a 0, contains a sequence of exactly k+1 0's. To see that no earlier sequence contains k+1 consecutive 0's, see that A(n) didn't. A new such sequence can only be formed by concatenating a prefix of A(n) with another prefix of A(n), which starts with only one 0. So such a prefix would have to end with n 0's. But by definition of p, no B^m(A(n)) for m < p ends with n 0's.
Now we can construct a(5). As can be easily checked, A(12) is made up of "01" + (2044 symbols) + "0000" + (2047 symbols). Therefore "00000" first appears in A(2047 + 12 + 1) = A(2060). The index of the last 0 is equal to the length of A(2059) = 2^2059 + 1. So the index of the first 0 is 2^2059 - 3.
		

Crossrefs

Cf. A164349.

A318895 Number of isoclinism classes of the groups of order 2^n.

Original entry on oeis.org

1, 1, 1, 2, 3, 8, 27, 115
Offset: 0

Author

Jack W Grahl, Sep 05 2018

Keywords

Comments

The concept of isoclinism was introduced in Hall (1940) and is crucial to enumerating the groups of order p^n where p is a prime.
An isoclinism exists between two groups G1 and G2 if the following holds: There is an isomorphism f between their two inner automorphism groups G1/Z(G1) and G2/Z(G2). There is an isomorphism h between their two commutator groups [G1, G1] and [G2, G2]. Lastly, f and h commute with F1 and F2, where F1 is the mapping from G1/Z(G1) x G1/Z(G1) to [G1, G1], given by a, b -> ab(a^-1)(b^-1), and F2 is defined analogously.

Examples

			There are 51 groups of order 32. These fall into 8 isoclinism classes. Therefore a(5) = 8.
		

Crossrefs

Cf. A000001, A000679. A000041 has an interpretation as the number of Abelian groups with order 2^n.

A316532 Leading least prime signatures, ordered by the underlying partitions, as in A063008.

Original entry on oeis.org

1, 6, 30, 36, 210, 180, 2310, 216, 900, 1260, 30030, 1080, 6300, 13860, 510510, 1296, 5400, 7560, 44100, 69300, 180180, 9699690, 6480, 27000, 37800, 83160, 485100, 900900, 3063060, 223092870, 7776, 32400, 45360, 189000, 264600, 415800, 1081080, 5336100
Offset: 0

Author

Jack W Grahl, Jul 06 2018

Keywords

Comments

The sequence A063008 gives the least number with each prime signature, ordered by the underlying partition. This sequence is a subsequence which only includes those prime signatures M for which M/2 is not a prime signature, the so-called 'leading' least prime signatures.
This sequence is therefore constructed by taking the partitions first in increasing order of their sum, then in decreasing order of the first term, then decreasing order of the second term, etc. We drop all partitions, except the empty partition, where the first term and the second term are different. Then we map (m1, m2, m3, ..., mk) to 2^m1 * 3^m2 * ... * pk^mk to give the terms of this sequence.
The sequence A062515 had a description which suggested that it had been confused with this sequence. They are the same leading least prime signatures, but in a different order, given by a different construction using integer partitions.

Examples

			The first few partitions are [], [1,1], [1,1,1], [2,2], [1,1,1,1]. So the first few terms are 1, 2 * 3 = 6, 2 * 3 * 5 = 30, 2^2 * 3^2 = 36, 2 * 3 * 5 * 7 = 210.
		

Crossrefs

Subsequence of A063008. A re-ordering of A062515, also of A056153. Cf A025487.

Programs

  • Haskell
    primes :: [Integer]
    primes = 2 : 3 : filter (\a -> all (not . divides a) (takeWhile (\x -> x <= a `div` 2) primes)) [4..]
    divides :: Integer -> Integer -> Bool
    divides a b = a `mod` b == 0
    partitions :: [[Integer]]
    partitions = concat $ map (partitions_of_n) [0..]
    partitions_of_n :: Integer -> [[Integer]]
    partitions_of_n n = partitions_at_most n n
    partitions_at_most :: Integer -> Integer -> [[Integer]]
    partitions_at_most _ 0 = [[]]
    partitions_at_most 0 _ = []
    partitions_at_most m n = concat $ map (\k -> map ([k] ++) (partitions_at_most k (n-k))) ( reverse [1..(min m n)])
    prime_signature :: [Integer] -> Integer
    prime_signature p = product $ zipWith (^) primes p
    seq :: [Integer]
    seq = map prime_signature $ filter compare_first_second partitions
        where
      compare_first_second p
            | length p == 0 = True
            | length p == 1 = False
            | otherwise = p!!0 == p!!1

A267795 Integers n such that n, 2n, 3n ... 10n contain almost equally many copies of each base 10 digit.

Original entry on oeis.org

1, 9, 109, 909, 10909, 90909, 1090909, 9090909, 13431958, 25834963, 32973507, 38296415, 45096237, 51546969, 94845303, 96237045, 109090909, 113431958, 126084879, 132868745, 132875488, 133595248, 134319558, 134755956, 134758658, 137584878, 143865844, 153584878
Offset: 1

Author

Jack W Grahl, Jan 20 2016

Keywords

Comments

Here 'almost equally many' means that the most common digit appears only once more than the least common.

Examples

			The first 10 multiples of 109 are 109, 218, 327, 436, 545, 654, 763, 872, 981, 1090. Every digit appears 3 times except for '1' which appears 4 times. It is clear that all numbers of the form 10909..0909 and 90909..0909 appear in the list, and it seems likely that these are the only members.
		

Crossrefs

Cf. A038365.

Programs

  • Python
    def f(n):
      """ This returns True iff n is in the sequence """
      l = [ n * i for i in range(1, 11) ]
      s = "".join(str(i) for i in l)
      c = [ s.count(str(j)) for j in range(10) ]
      return min(c) >= max(c) - 1
    for n in range(1, 10000000):
      if f(n):
        print(n, end=', ')

Extensions

a(7)-a(28) from Lars Blomberg, Aug 11 2016

A256535 The largest number of T-tetrominoes that fit within an n X n square.

Original entry on oeis.org

0, 0, 1, 4, 5, 8, 11, 16, 19, 24, 29, 36, 41, 48, 55, 64, 71, 80, 89, 100, 109, 120, 131, 144, 155, 168, 181, 196, 209, 224, 239, 256, 271, 288, 305, 324, 341, 360, 379, 400, 419, 440, 461, 484, 505, 528, 551, 576, 599, 624, 649, 676, 701, 728, 755, 784, 811
Offset: 1

Author

Jack W Grahl, Sep 15 2015

Keywords

Comments

No T-tetromino fits in a 1 X 1 or 2 X 2 square: a(1)=a(2)=0. A single T-tetromino can be placed in a 3 X 3 square, and must occupy the center square. Four T-tetrominos fit within a 4 X 4 square with no spaces left over, in a rotationally symmetric tiling: a(4)=4.
For n = 4m, it is obvious that a(n) = n^2/4, by repeating the construction for n=4. For n = 4m + 2, it can be shown, using a chessboard coloring, that a(n) < n^2/4. By tiling an L-shaped strip of width 2 in a manner that can be indefinitely extended, one can show that a(n) = n^2/4 - 1.
Shuxin Zhan proved that it is not possible to tile a square of side 4m+1 or 4m+3 with T-tetrominos and a single monomino. Thus there must be at least 5 empty squares in any partial tiling by T-tetrominos. This bound is achieved for tilings in 5 X 5, 7 X 7, 9 X 9 and 11 X 11 squares. Robert Hochberg proved that for n > 11, there must be either 5 or 9 empty squares. He conjectured that 5 is always enough.
Jack W Grahl proved that, for squares, 5 monominos are always sufficient. This means that the sequence is given by n^2/4, (n^2-1)/4-1, n^2/4-1, (n^2-1)/4-1, for n = 4m, n = 4m+1, n = 4m+2 and n = 4m+3, respectively (which the exception of a(1) = 0), and generating function x^3*(-1-2*x+2*x^2-2*x^3+x^4) / ( (1+x)*(x^2+1)*(x-1)^3 ). - Jack W Grahl, Jul 25 2018

Examples

			The optimal tiling for a 4 X 4 square is:
   AAAB
   DABB
   DDCB
   DCCC
This forms the building block of a solution for all n a multiple of four.
For n=7 a solution is given by:
   ABBBCCC
   AABD/CE
   A/DDDEE
       F/E
       FFG
       FGG
       //G
with 5 empty squares, and the 4 X 4 square in the lower left filled in as above.
For n=6, a tiling of the excess after removing a 4 X 4 square shows us how optimal solutions can be generated for any even number that is not a multiple of 4:
   //ABBB
   /AAABC
       CC
       DC
       DD
       D/
The pairs A&B and C&D can be extended in the manner of a frieze. A nice solution for 9 X 9 does not include tilings of smaller even squares:
   ABBBCDDDE
   AABFCCDEE
   AGFFCHHHE
   GGGFI/HJ/
   KKKIIIJJJ
   /KL//MNNN
   OLLLPMMNQ
   OORPPMSQQ
   ORRRPSSSQ
		

Programs

  • Mathematica
    Delete[Flatten[ Table[{4n^2, 4n^2 + 2n - 1, 4n^2 + 4n, 4n^2 + 6n + 1}, {n, 0, 14}]], 2] (* or *)
    CoefficientList[ Series[1 + (x^4 - 2x^3 - 2x + 1)/((x - 1)^3 (x^3 + x^2 + x + 1)), {x, 0, 58}], x] (* Robert G. Wilson v, Jul 25 2018 *)
    LinearRecurrence[{2,-1,0,1,-2,1},{0,0,1,4,5,8,11},60] (* Harvey P. Dale, Aug 11 2024 *)
  • PARI
    concat([0,0], Vec(x^3*(1 + 2*x - 2*x^2 + 2*x^3 - x^4) / ((1 - x)^3*(1 + x)*(1 + x^2)) + O(x^60))) \\ Colin Barker, May 24 2019

Formula

From Jack W Grahl, Jul 25 2018: (Start)
a(4m) = 4m^2;
a(4m+1) = 4m^2 + 2m - 1;
a(4m+2) = 4m^2 + 4m;
a(4m+3) = 4m^2 + 6m + 1.
(End)
From Colin Barker, May 24 2019: (Start)
G.f.: x^3*(1 + 2*x - 2*x^2 + 2*x^3 - x^4) / ((1 - x)^3*(1 + x)*(1 + x^2)).
a(n) = (-7 + 3*(-1)^n + 2*(-i)^n + 2*i^n + 2*n^2) / 8 for n>1, where i=sqrt(-1).
a(n) = 2*a(n-1) - a(n-2) + a(n-4) - 2*a(n-5) + a(n-6) for n>7.
(End)

A236972 The number of partitions of n into at least 5 parts from which we can form every partition of n into 5 parts by summing elements.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 2, 3, 3, 4, 7, 8, 9, 13, 14, 24, 29, 35, 38
Offset: 1

Author

Jack W Grahl, Feb 02 2014

Keywords

Comments

The corresponding partitions with 2 in the definition instead of 5 are the complete partitions, which A126796 counts.
The qualifier 'into at least 5 parts' is only relevant for n = 1, 2, 3 or 4. It is included because otherwise the condition would be vacuously true for all partitions of 1, 2, 3 and 4. It seems neater to consider that there are no partitions of 1, 2, 3 or 4 of this form.
What is the limit for large n of the proportion of partitions of n for which this holds, or this sequence divided by A000041?

Examples

			The valid partitions of 11 are all those which contain only 1's, 2's and 3's, with no more than one 3 and no more than three 2's or 3's. This is because every partition of 11 into 5 parts contains at least one element 3 or more, and at least 3 elements 2 or more. There are 7 such partitions, therefore a(11) = 7.
		

Crossrefs

A000041 counts partitions, A126796 counts complete partitions - the case for partitions into 2 instead of 5, A236970 and A236971 are the cases for 3 and 4 respectively.

A236971 Number of partitions of n into at least 4 parts from which we can form every partition of n into 4 parts by summing elements.

Original entry on oeis.org

0, 0, 0, 1, 2, 2, 3, 3, 6, 7, 8, 11, 19, 21, 26, 31, 52, 66, 76, 88, 134, 169, 215, 251, 358, 412, 517, 639, 899, 1065, 1242, 1496, 2072, 2482, 2930, 3449, 4677, 5566
Offset: 1

Author

Jack W Grahl, Feb 02 2014

Keywords

Comments

The corresponding partitions with 2 in the definition instead of 3 are the complete partitions, which A126796 counts.
The qualifier 'into at least 4 parts' is only relevant for n = 1, 2 or 3. It is included because otherwise the condition would be vacuously true for all partitions of 1, 2 and 3. It seems neater to consider that there are no partitions of 1, 2 or 3 of this form.
What is the limit for large n of the proportion of partitions of n for which this holds, or this sequence divided by A000041?

Examples

			The valid partitions of 7 are (2, 2, 1, 1, 1), (2, 1, 1, 1, 1, 1) and (1, 1, 1, 1, 1, 1, 1). Given any partition of 7 into 4 parts, we can express these four parts as disjoint sums of elements from these partitions. For the third one this is trivial, for the second one because one element of the partition must be at least 2, for the third because in fact two elements of the partition must be at least 2. So a(7) = 3.
		

Crossrefs

A000041 counts partitions, A126796 counts complete partitions - the case for partitions into 2 instead of 4, A236970 and A236972 are the cases for 3 and 5 respectively.

Extensions

a(30)-a(38) from Willy Van den Driessche, Oct 22 2019

A236970 The number of partitions of n into at least 3 parts from which we can form every partition of n into 3 parts by summing elements.

Original entry on oeis.org

0, 0, 1, 2, 2, 3, 5, 6, 7, 13, 16, 19, 29, 38, 49, 72, 84, 108, 155, 195, 234, 331, 410, 501, 672, 824, 1006, 1341, 1621, 1981, 2583, 3111, 3740, 4846, 5819, 6957, 8787, 10582, 12606, 15840, 18762, 22386, 27851, 32934, 38824, 47961, 56633, 66577, 81168, 95612
Offset: 1

Author

Jack W Grahl, Feb 02 2014

Keywords

Comments

The corresponding partitions with 2 in the definition instead of 3 are the complete partitions, which are counted by A126796.
The qualifier 'into at least 3 parts' is only relevant for n = 1 or 2. It is included because otherwise the condition would be vacuously true for all partitions of 1 and 2. It seems neater to consider that there are no partitions of 1 and 2 of this form.

Examples

			The valid partitions of 5 are (2,1,1,1) and (1,1,1,1,1). Given any partition of 5 into 3 parts, it contains one part of at least 2. Therefore we can make any partition of 5 into 3 parts by joining (2,1,1,1) into three sums. (3, 1, 1) is not a valid partition, since (2,2,1) is a partition of 5 into 3 parts which cannot be made by summing elements from (3,1,1). Therefore a(5) = 2.
		

Crossrefs

Cf. A000041. A126796 is the case for 2 instead of 3, A236971 and A236972 are the cases for 4 and 5.

Programs

  • Mathematica
    ric[p_, {x_,y_}] := If[x==0, If[y > Total[p], False, y==0 || AnyTrue[ Reverse@ Union[p], y>=# && ric[ DeleteCases[p, #, 1, 1], {0, y-#}] &]], If[x >= Total[p], False, AnyTrue[ Reverse@ Union@ p, x>=# && ric[ DeleteCases[p, #, 1, 1], {x-#, y}] &]]]; chk[p_] := AllTrue[ Rest /@ IntegerPartitions[Plus @@ p, {3}], ric[p,#] &]; a[n_] := Length@ Select[ IntegerPartitions[n, {3, Infinity}], chk]; Array[a, 24] (* Giovanni Resta, Jul 18 2018 *)

A229037 The "forest fire": sequence of positive integers where each is chosen to be as small as possible subject to the condition that no three terms a(j), a(j+k), a(j+2k) (for any j and k) form an arithmetic progression.

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 2, 4, 4, 1, 1, 2, 1, 1, 2, 2, 4, 4, 2, 4, 4, 5, 5, 8, 5, 5, 9, 1, 1, 2, 1, 1, 2, 2, 4, 4, 1, 1, 2, 1, 1, 2, 2, 4, 4, 2, 4, 4, 5, 5, 8, 5, 5, 9, 9, 4, 4, 5, 5, 10, 5, 5, 10, 2, 10, 13, 11, 10, 8, 11, 13, 10, 12, 10, 10, 12, 10, 11, 14, 20, 13
Offset: 1

Author

Jack W Grahl, Sep 11 2013

Keywords

Comments

Added name "forest fire" to make it easier to locate this sequence. - N. J. A. Sloane, Sep 03 2019
This sequence and A235383 and A235265 were winners in the best new sequence contest held at the OEIS Foundation booth at the 2014 AMS/MAA Joint Mathematics Meetings. - T. D. Noe, Jan 20 2014
See A236246 for indices n such that a(n)=1. - M. F. Hasler, Jan 20 2014
See A241673 for indices n such that a(n)=2^k. - Reinhard Zumkeller, Apr 26 2014
The graph (for up to n = 10000) has an eerie similarity (why?) to the distribution of rising smoke particles subjected to a lateral wind, and where the particles emanate from randomly distributed burning areas in a fire in a forest or field. - Daniel Forgues, Jan 21 2014
The graph (up to n = 100000) appears to have a fractal structure. The dense areas are not random but seem to repeat, approximately doubling in width and height each time. - Daniel Forgues, Jan 21 2014
a(A241752(n)) = n and a(m) != n for m < A241752(n). - Reinhard Zumkeller, Apr 28 2014
The indices n such that a(n) = 1 are given by A236313 (relative spacing) up to 19 terms, and A003278 (directly) up to 20 terms. If just placing ones, the 21st 1 would be n=91. The sequence A003278 fails at n=91 because the numbers filling the gaps create an arithmetic progression with a(27)=9, a(59)=5 and a(91)=1. Additionally, if you look at indices n starting at the first instance of 4 or 5, A003278/A236313 provide possible indices for a(n)=4 or a(n)=5, with some indexes instead filled by numbers < (4,5). A003278/A236313 also fail to predict indices for a(n)=4 or a(n)=5 by the ~20th term. - Daniel Putt, Sep 29 2022

Crossrefs

Cf. A094870, A362942 (partial sums).
For a variant see A309890.
A selection of sequences related to "no three-term arithmetic progression": A003002, A003003, A003278, A004793, A005047, A005487, A033157, A065825, A092482, A093678, A093679, A093680, A093681, A093682, A094870, A101884, A101886, A101888, A140577, A185256, A208746, A229037.

Programs

  • Haskell
    import Data.IntMap (empty, (!), insert)
    a229037 n = a229037_list !! (n-1)
    a229037_list = f 0 empty  where
       f i m = y : f (i + 1) (insert (i + 1) y m) where
         y = head [z | z <- [1..],
                       all (\k -> z + m ! (i - k) /= 2 * m ! (i - k `div` 2))
                           [1, 3 .. i - 1]]
    -- Reinhard Zumkeller, Apr 26 2014
    
  • Mathematica
    a[1] = 1; a[n_] := a[n] = Block[{z = 1}, While[Catch[ Do[If[z == 2*a[n-k] - a[n-2*k], Throw@True], {k, Floor[(n-1)/2]}]; False], z++]; z]; a /@ Range[100] (* Giovanni Resta, Jan 01 2014 *)
  • PARI
    step(v)=my(bad=List(),n=#v+1,t); for(d=1,#v\2,t=2*v[n-d]-v[n-2*d]; if(t>0, listput(bad,t))); bad=Set(bad); for(i=1,#bad, if(bad[i]!=i, return(i))); #bad+1
    first(n)=my(v=List([1])); while(n--, listput(v, step(v))); Vec(v) \\ Charles R Greathouse IV, Jan 21 2014
    
  • Python
    A229037_list = []
    for n in range(10**6):
        i, j, b = 1, 1, set()
        while n-2*i >= 0:
            b.add(2*A229037_list[n-i]-A229037_list[n-2*i])
            i += 1
            while j in b:
                b.remove(j)
                j += 1
        A229037_list.append(j) # Chai Wah Wu, Dec 21 2014

Formula

a(n) <= (n+1)/2. - Charles R Greathouse IV, Jan 21 2014