Collection of OEIS Number Sequences in Haskell
- A333333 - Irregular triangle: T(n,k) gives the number of k-polysticks on edges of the n-cube up to isometries of the n-cube, with 0 <= k <= A001787(n)
module HypercubeColorings.A333333 (a333333) where
import Helpers.HypercubeColorings (countPolyforms)
a333333_row :: Int -> [Int]
a333333_row n = map (a333333T n) [0..n*2^(n-1)]
a333333T :: Int -> Int -> Int
a333333T n = countPolyforms n 1
a333333_list :: [Int]
a333333_list = concatMap a333333_row [1..]
a333333 :: Int -> Int
a333333 n = a333333_list !! (n - 1)
- A303930 - Count leaf-free subgraphs of the 2 X n grid up to horizontal and vertical flipping
module Tiling.A303930 where
a303930 :: Int -> Integer
a303930 n = a303930_list !! (n - 1)
-- A303930
a303930_list :: [Integer]
a303930_list = map (`div` 4) sumOfOrbits where
sumOfOrbits = foldr (zipWith (+)) allCount [rotationalCount, horizontalCount, verticalCount]
-- A093129
allCount :: [Integer]
allCount = 1 : 2 : recurse 1 2 where
recurse a b = nextTerm : recurse b nextTerm where
nextTerm = 5 * (b - a)
-- A001519
verticalCount :: [Integer]
verticalCount = 1 : 2 : recurse 1 2 where
recurse a b = nextTerm : recurse b nextTerm where
nextTerm = 3 * b - a
horizontalCount :: [Integer]
horizontalCount = 1 : 2 : 3 : 7 : recurse 1 2 3 7 where
recurse a b c d = nextTerm : recurse b c d nextTerm where
nextTerm = 5 * (c - a)
rotationalCount :: [Integer]
rotationalCount = 1 : 2 : 3 : 5 : recurse 1 2 3 5 where
recurse a b c d = nextTerm : recurse b c d nextTerm where
nextTerm = 5 * (c - a)
- Anagram
- Binary
- Braxton
- BrickStacking
- Chess
- Coins
- CoinsInARow
- ConcavePolygon
- ConvexPolygon
- CostasLikeArrays
- Delahaye
- DistinctMidpoints
- DoubleOrIncrement
- EKG
- External
- Graham
- GridPolytopes
- HelperSequences
- Helpers
- HeronianTriangles
- HypercubeColorings
- IntegerTriangles
- KthDifferences
- Minecraft
- Miscellaneous
- NestedRoots
- Nonpalindromes
- Palindromes
- Permutations
- PolygonSizes
- Polynomial
- Poset
- PowerDivisibility
- ProjectEuler
- RemainderGame
- RichardGuy
- SqrtMultiples
- Staircase
- StoneTransfer
- SubprimeFib
- Subsets
- TableDifferences
- Tables
- Tiling
- ToiletPaper
- Walk
- XorTriangle
The sequence definitons are from The Online Encyclopedia of Integer Sequences - visit OEIS
Follow me on Twitter