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: Peter A. Lawrence

Peter A. Lawrence's wiki page.

Peter A. Lawrence has authored 5 sequences.

A276628 Composite m such that A276469(m,k) are not all 1's.

Original entry on oeis.org

4, 6, 8, 9, 10, 14, 16, 18, 20, 21, 22, 25, 26, 27, 32, 34, 38, 39, 42, 46, 49, 50, 52, 54, 55, 57, 58, 62, 64, 68, 74, 78, 81, 82, 86, 93, 94, 98, 100, 106, 110, 111, 114, 116, 118, 121, 122, 125, 128, 129, 134, 136, 142, 146, 147, 148, 155, 156, 158, 162, 164, 166, 169
Offset: 1

Author

Peter A. Lawrence, Sep 07 2016

Keywords

Crossrefs

Programs

  • PARI
    T(m, k) = polcyclo(m, k) % m;
    isok(m) = !isprime(m+(m<2)) && vector(m, k, T(m, k-1)) != vector(m, k, 1); \\ Michel Marcus, Sep 22 2016 and modified by Jinyuan Wang, Jul 09 2020

Extensions

More terms from Michel Marcus, Sep 22 2016

A276469 Triangle read by rows: T(n,k) = n-th cyclotomic polynomial evaluated at x = k and then reduced mod n.

Original entry on oeis.org

0, 1, 0, 1, 0, 1, 1, 2, 1, 2, 1, 0, 1, 1, 1, 1, 1, 3, 1, 1, 3, 1, 0, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Author

Peter A. Lawrence, Sep 04 2016

Keywords

Comments

Let C_n(x) denote the n-th cyclotomic polynomial. Then T(n,k) = C_n(k) mod n.
Conjectures:
1) (mod p) C_p(k) == 1, except C_p(1) == 0, for prime p, 0<=k
2) (mod 2^e) C_[2^e](k) == 1 if k odd, == 0 k even, for e>1, 0<=k<2^e
3) (mod p^e) C_[p^e](k) == 1, except C_[p^e](1+np) = p, e>1, 0<=n
4.a) (mod m) C_m(k) for some composite m has values all 1's,
but it is not clear for which m this happens,
4.b) (mod m) C_m(m) for other composite m has values 1 and x,
4.c) with recurring period x
4.d) x is the largest prime dividing m.
Remarks: (1) is trivial, I suspect (2) and (3) are simple algebra-crunching, (4) seems to be an interesting question. (4) seems to partition the natural numbers into primes union A253235 union A276628.

Examples

			Let C_N(x) be the N'th cyclotomic polynomial, then the values of C_N(k) mod N, m=0,...,N-1, are:
    \  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 -- k -->
C_1:   0
C_2:   1 0
C_3:   1 0 1
C_4:   1 2 1 2
C_5:   1 0 1 1 1
C_6:   1 1 3 1 1 3     (note period 3)
C_7:   1 0 1 1 1 1 1
C_8:   1 2 1 2 1 2 1 2
C_9:   1 3 1 1 3 1 1 3 1     (note period 3)
C_10:  1 1 1 1 5 1 1 1 1 5     (note period 5)
C_11:  1 0 1 1 1 1 1 1 1 1 1
C_12:  1 1 1 1 1 1 1 1 1 1 1 1
C_13:  1 0 1 1 1 1 1 1 1 1 1 1 1
C_14:  1 1 1 1 1 1 7 1 1 1 1 1 1 7     (note period 7)
C_15:  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
C_16:  1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2
		

Crossrefs

Cf. A253235 (numbers m such that T(m,j) are all 1's), A276628 (composites m such that T(m,j) are not all 1's).

Programs

  • Mathematica
    Table[Mod[Cyclotomic[i, j], i], {i, 12}, {j, 0, i - 1}] // Flatten (* Michael De Vlieger, Sep 23 2016 *)
  • PARI
    T(n, k) = polcyclo(n, k) % n; \\ Michel Marcus, Sep 22 2016

Formula

T(i,j) = Cyclotomic_i(j) (mod i); for i>=1 and j=0..i-1.

Extensions

a(1) corrected by Jinyuan Wang, Jul 09 2020

A215462 Number of decompositions of 2n into ordered sums of two odd nonprimes.

Original entry on oeis.org

0, 1, 0, 0, 0, 2, 0, 0, 2, 1, 0, 2, 2, 2, 2, 3, 0, 4, 6, 0, 4, 5, 2, 4, 6, 5, 4, 7, 4, 6, 10, 2, 8, 11, 2, 9, 10, 6, 8, 13, 6, 8, 14, 8, 8, 17, 8, 10, 16, 7, 14, 17, 10, 12, 16, 11, 14, 19, 12, 12, 26, 10, 14, 25, 10, 19, 22, 16, 16, 21, 18, 20, 28, 18, 18, 31, 14, 23, 30, 16
Offset: 0

Author

Peter A. Lawrence, Aug 11 2012

Keywords

Comments

A002372(n) + A215461(n) + a(n) = n.
Note: if n is odd-composite then a(n) is odd, otherwise even.
Conjecture: a(n) is never zero for n > 19, verified to 10^9.
Conjecture: a(n) > A215461(n) > A002372(n) for sufficiently large n.

Examples

			n=15, 2*n=30, 2*n = { 9+21, 15+15, 21+9 }, a(15) = 3.
n=18, 2*n=36, 2*n = { 1+35, 9+27, 15+21, 21+15, 27+9, 35+1 }, a(18) = 6.
		

Crossrefs

Formula

a(n) = convolve(c,c) where c(n) is the sequence defined by 1 if (2*n+1) is odd nonprime (includes 1), and 0 if (2*n+1) is odd prime.

A215461 Number of decompositions of 2n into ordered sums of one prime and one nonprime.

Original entry on oeis.org

0, 0, 2, 2, 2, 0, 4, 4, 2, 4, 6, 4, 4, 6, 8, 6, 12, 6, 4, 16, 10, 8, 14, 12, 8, 12, 16, 10, 18, 16, 8, 24, 14, 10, 28, 16, 14, 22, 20, 12, 26, 24, 12, 26, 28, 10, 30, 28, 18, 36, 24, 18, 32, 30, 22, 32, 28, 18, 34, 36, 10, 44, 38, 18, 48, 32, 26, 40, 42, 32, 38, 36, 22, 44
Offset: 0

Author

Peter A. Lawrence, Aug 11 2012

Keywords

Comments

A002372(n) + a(n) + A215462(n) = n.
Note: a(n) always even.
Conjecture: a(n) is never zero for n > 5, verified to 10^9.
Goldbach conjecture: a(n) + A215462(n) < n for all n > 2.

Examples

			n=15, 2*n=30, 2*n = { 3+27, 5+25, 29+1;  1+29, 25+5, 27+3 }, a(15) = 6
n=18, 2*n=36, 2*n = { 3+33, 11+25;  11+25, 33+3 }, a(18) = 4
		

Crossrefs

Formula

a(n) = convolve(p,c) + convolve(c,p) = 2*convolve(p,c) where p(n) = 1 if 2n+1 is prime and 0 otherwise, and c(n) = 1 if 2n+1 is nonprime and 0 otherwise.

A181360 Number of forests of rooted trees containing n nodes not counting the root nodes.

Original entry on oeis.org

1, 1, 3, 7, 19, 47, 127, 330, 889, 2378, 6450, 17510, 47907, 131388, 362081, 1000665, 2774857, 7714695, 21505455, 60084062, 168234804, 471977022, 1326558625, 3734804268, 10531738149, 29742332548, 84111212892, 238176473946, 675269414372, 1916715819186
Offset: 0

Author

Peter A. Lawrence, Oct 15 2010

Keywords

Comments

Every tree in the forest must have at least 2 nodes, i.e. at least one more node besides the root. - N. J. A. Sloane, Nov 26 2010
First, T(n), the number of rooted trees with n+1 nodes A000081(n+1) can be computed using partitions of n as follows: let n = (q1*1 + q2*2 + q3*3 + ... + qn*n) be a nonnegative integer partition of n (the "q"s are the multiplicities of the part sizes), and define a^b to be (a+b-1)! / (a-1)! / b! (the number of ways to color b identical items with a colors), then compute the sum of T(0)^q1 * T(1)^q2 * ... * T(n-1)^qn over all such partitions of n.
Then F(n), the number of forests of rooted trees containing N nodes not counting the roots, can be similarly computed as the sum of T(1)^q1 * T(2)^q2 * ... * T(n)^qn over all such partitions of n.
These are the diagonal sums of the triangle in A174135. - N. J. A. Sloane, Nov 26 2010.

Examples

			Trees for example (leaving out the "^0" factors for clarity):
T(0) = 1, T(1) = 1
T(2) = T(1)^1 + T(0)^2 = 2,
T(3) = T(2)^1 + T(1)^1*T(0)^1 + T(0)^3 = 4,
T(4) = T(3)^1 + T(2)^1*T(0)^1 + T(1)^2 + T(1)^1*T(0)^2 +T(0)^4 = 9,
T(5) = T(4)^1 + T(3)^1*T(0)^1 + T(2)^1*T(1)^1 + T(2)^1*T(0)^2 + T(1)^2*T(0)^1 + T(1)^1*T(0)^3 + T(0)^5 = 20.
Forests for example (leaving out the "^0" factors for clarity):
F(2) = T(2)^1 + T(1)^2 = 3,
F(3) = T(3)^1 + T(2)^1*T(1)^1 + T(1)^3 = 7,
F(4) = T(4)^1 + T(3)^1*T(1)^1 + T(2)^2 + T(2)*T(1)^2 + T(1)^4 = 19,
F(5) = T(5)^1 + T(4)^1*T(1)^1 + T(3)^1*T(2)^1 + T(3)^1*T(1)^2 + T(2)^2*T(1)^1 + T(2)^1*T(1)^3 + T(1)^5 = 47.
{Examples of this a^b definition:
2^1 = 2, 2^2 = 3, 2^3 = 4, 2^4 = 5,
3^1 = 3, 3^2 = 6, 3^3 = 10, 3^4 = 15, (triangular numbers)
4^1 = 4, 4^2 = 10, 4^3 = 20, 4^4 = 35, (tetrahedral numbers)
equivalently a^b = (b == 0 ? 1 : (a == 1 || b == 1 ? a : (a * (a+1)^(b-1) / b))) }
		

Crossrefs

Cf. A000081 (rooted trees).
Cf. A093637 (products of partition numbers).

Programs

  • Maple
    (From N. J. A. Sloane, Nov 26 2010) First read 110 terms of A000081 into array b1
    M:=100;
    t1:=1/mul((1-x*y^i)^b1[i+1],i=2..M):
    t2:=series(t1,y,M):
    t3:=series(t2,x,M):
    a:=(n,k)->coeff(coeff(t3,x,k),y,n);
    g:=n->add(a(n-1+i,i),i=1..n-1);
    [seq(g(n),n=1..48)];
    # second Maple program:
    g:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(binomial(T(i-1)+j-1, j) *g(n-i*j, i-1), j=0..n/i)))
        end:
    T:= n-> g(n, n):
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(binomial(T(i)+j-1, j) *b(n-i*j, i-1), j=0..n/i)))
        end:
    a:= n-> b(n, n):
    seq(a(n), n=0..40);  # Alois P. Heinz, Jul 20 2012
    # third Maple program:
    g:= proc(n) option remember; `if`(n<=1, n, (add(add(d*
          g(d), d=numtheory[divisors](j))*g(n-j), j=1..n-1))/(n-1))
        end:
    a:= proc(n) option remember; `if`(n=0, 1, add(add(d*
          g(d+1), d=numtheory[divisors](j))*a(n-j), j=1..n)/n)
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Sep 19 2017
  • Mathematica
    g[n_, i_] := g[n, i] = If[n==0, 1, If[i<1, 0, Sum[Binomial[T[i-1]+j-1, j]*g[n-i*j, i-1], {j, 0, n/i}]]]; T[n_] := g[n, n]; b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, Sum[Binomial[T[i]+j-1, j]*b[n-i*j, i-1], {j, 0, n/i}]]]; a[n_] := b[n, n] // FullSimplify; Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Mar 30 2015, after Alois P. Heinz *)

Formula

a(n) ~ c * d^n / n^(3/2), where d = 2.955765285651994974714817524... is the Otter's rooted tree constant (see A051491), and c = 10.088029891871277227771831767... . - Vaclav Kotesovec, May 09 2014
a(n) = A033185(2n, n). - Alois P. Heinz, Feb 15 2016
a(n) = A033185(2n+k, n+k) for all n, k >= 0. - Michael Somos, Aug 20 2018

Extensions

a(0)=1 prepended by Alois P. Heinz, Sep 19 2017