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

A329137 Number of integer partitions of n whose differences are an aperiodic word.

Original entry on oeis.org

1, 1, 2, 2, 4, 6, 8, 14, 20, 25, 39, 54, 69, 99, 130, 167, 224, 292, 373, 483, 620, 773, 993, 1246, 1554, 1946, 2421, 2987, 3700, 4548, 5575, 6821, 8330, 10101, 12287, 14852, 17935, 21599, 25986, 31132, 37295, 44539, 53112, 63212, 75123, 89055, 105503, 124682
Offset: 0

Views

Author

Gus Wiseman, Nov 09 2019

Keywords

Comments

A sequence is aperiodic if its cyclic rotations are all different.

Examples

			The a(1) = 1 through a(7) = 14 partitions:
  (1)  (2)    (3)    (4)      (5)        (6)          (7)
       (1,1)  (2,1)  (2,2)    (3,2)      (3,3)        (4,3)
                     (3,1)    (4,1)      (4,2)        (5,2)
                     (2,1,1)  (2,2,1)    (5,1)        (6,1)
                              (3,1,1)    (4,1,1)      (3,2,2)
                              (2,1,1,1)  (2,2,1,1)    (3,3,1)
                                         (3,1,1,1)    (4,2,1)
                                         (2,1,1,1,1)  (5,1,1)
                                                      (2,2,2,1)
                                                      (3,2,1,1)
                                                      (4,1,1,1)
                                                      (2,2,1,1,1)
                                                      (3,1,1,1,1)
                                                      (2,1,1,1,1,1)
With differences:
  ()  ()   ()   ()     ()       ()         ()
      (0)  (1)  (0)    (1)      (0)        (1)
                (2)    (3)      (2)        (3)
                (1,0)  (0,1)    (4)        (5)
                       (2,0)    (3,0)      (0,2)
                       (1,0,0)  (0,1,0)    (1,0)
                                (2,0,0)    (2,1)
                                (1,0,0,0)  (4,0)
                                           (0,0,1)
                                           (1,1,0)
                                           (3,0,0)
                                           (0,1,0,0)
                                           (2,0,0,0)
                                           (1,0,0,0,0)
		

Crossrefs

The Heinz numbers of these partitions are given by A329135.
The periodic version is A329144.
The augmented version is A329136.
Aperiodic binary words are A027375.
Aperiodic compositions are A000740.
Numbers whose binary expansion is aperiodic are A328594.
Numbers whose prime signature is aperiodic are A329139.

Programs

  • Mathematica
    aperQ[q_]:=Array[RotateRight[q,#1]&,Length[q],1,UnsameQ];
    Table[Length[Select[IntegerPartitions[n],aperQ[Differences[#]]&]],{n,0,30}]

Formula

a(n) + A329144(n) = A000041(n).

A265648 Number of binary strings of length n that are powers of shorter strings, but cannot be written as the concatenation of two or more such strings.

Original entry on oeis.org

0, 2, 2, 2, 0, 8, 0, 10, 6, 20, 0, 48, 0, 74, 26, 146, 0, 372, 0, 630, 94, 1350, 0, 2864, 0, 5598, 368, 11140, 0, 23892, 0, 46194, 1524, 95552, 0, 193026, 0, 390774, 6098, 778684, 0, 1606572, 0, 3180700, 24554, 6488240, 0, 13003236, 0, 26349278, 99384
Offset: 1

Views

Author

Jeffrey Shallit, Dec 11 2015

Keywords

Examples

			For n = 6 the strings are (01)^3, (001)^2, (010)^2, (011)^2 and their complements.
		

Programs

  • Maple
    Negate:= proc(S) StringTools:-Map(procname,S) end proc:
    Negate("0"):= "1":
    Negate("1"):= "0":
    FC0:= proc(n)
    # set of binary strings of length n starting with 0 that are
    # concatenations of nontrivial powers
    option remember;
    local m,s,t;
    {seq(seq(seq(cat(s,t),s=FC(m)),t=map(r -> (r,Negate(r)),
        procname(n-m))),m=2..n-2)} union FC(n)
    end proc:
    FC0(2):= {"00"}:
    FC:= proc(n)
    # set of binary strings of length n starting with 0 that are
    # nontrivial powers
    option remember;
    local d,s;
    {seq(seq(cat(s$d),s = S0(n/d)),d = numtheory:-divisors(n) minus {1})}
    end proc:
    S0:= proc(n)
    # set of binary strings of length n starting with 0
    map(t -> cat("0",t), convert(StringTools:-Generate(n-1,"01"),set))
    end proc:
    FC2:= proc(n)
    # set of binary strings of length n starting with 0 that are
    # concatenations of two or more nontrivial powers
    option remember;
    local m,s,t;
    {seq(seq(seq(cat(s,t),s=FC(m)),t=map(r -> (r,Negate(r)),FC0(n-m))),m=2..n-2)}
    end proc:
    seq(2*nops(FC0(n) minus FC2(n)),n=1..25); # Robert Israel, Dec 11 2015
  • Python
    # see link for faster version
    from sympy import divisors
    from itertools import product
    def is_pow(s):
        return any(s == s[:d]*(len(s)//d) for d in divisors(len(s))[:-1])
    def is_concat_pows(s, c):
        if len(s) < 2: return False
        if c > 0 and is_pow(s): return True
        for i in range(2, len(s)-1):
            if is_pow(s[:i]) and is_concat_pows(s[i:], c+1): return True
        return False
    def ok(s):
        return is_pow(s) and not is_concat_pows(s, 0)
    def pows_len(n): # generate powers of length n beginning with 0
        for d in divisors(n)[:-1]:
            for b in product("01", repeat=d-1):
                yield "".join(('0'+''.join(b))*(n//d))
    def a(n):
        return 2*sum(ok(s) for s in pows_len(n) if s[0] == '0')
    print([a(n) for n in range(1, 26)]) # Michael S. Branicky, Aug 17 2021

Formula

From Michael S. Branicky, Aug 17 2021: (Start)
a(n) <= A152061(n).
a(p) = 0 for prime p >= 5.
(End)

Extensions

a(26)-a(51) from Michael S. Branicky, Aug 17 2021

A350532 Triangle read by rows: T(n,k) is the number of degree-n polynomials over Z/2Z of the form f(x)^m for some m > 1 with exactly k nonzero terms; 1 <= k <= n + 1.

Original entry on oeis.org

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

Views

Author

Peter Kagey, Jan 03 2022

Keywords

Comments

For n >= 1, row sums are given by A152061.
Conjecture: T(n,n+1) = 1 if and only if n is a Mersenne prime (A000668).
Conjecture: T(2*n,2) = n.
Conjecture: T(2*n,3) = (n^2 - n)/2 for n >= 1.

Examples

			  n\k| 1  2   3   4  5  6  7  8  9 10 11
  ---+----------------------------------
   0 | 1
   1 | 0, 0
   2 | 1, 1,  0
   3 | 1, 0,  0,  1
   4 | 1, 2,  1,  0, 0
   5 | 1, 0,  0,  1, 0, 0
   6 | 1, 3,  3,  2, 1, 0, 0
   7 | 1, 0,  0,  0, 0, 0, 0, 1
   8 | 1, 4,  6,  4, 1, 0, 0, 0, 0
   9 | 1, 0,  0,  4, 1, 0, 2, 0, 0, 0
  10 | 1, 5, 10, 11, 5, 1, 0, 0, 1, 0, 0
The T(6,4) = 2 degree-6 polynomials over Z/2Z with k=4 nonzero terms are
1 + x^2 + x^4 + x^6 = (1 + x^2)^3 = (1 + x + x^2 + x^3)^2, and
x^3 + x^4 + x^5 + x^6 = (x + x^2)^3.
		

Crossrefs

Previous Showing 11-13 of 13 results.