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.

Showing 1-2 of 2 results.

A191372 The Sierpinski-Stern triangle.

Original entry on oeis.org

0, 1, 2, 1, 2, 1, 3, 2, 3, 2, 3, 1, 4, 2, 3, 2, 3, 1, 4, 3, 4, 2, 3, 1, 4, 3, 5, 2, 3, 1, 4, 3, 5, 2, 5, 3, 4, 3, 5, 2, 5, 3, 4, 1, 6, 3, 6, 4, 5, 2, 4, 3, 5, 2, 5, 3, 4, 1, 5, 4, 7, 4, 6, 2, 5, 3, 5, 2, 5, 3, 4, 1, 5, 4, 7, 3
Offset: 0

Views

Author

Johannes W. Meijer, Jun 05 2011

Keywords

Comments

The knight sums of the first and second kind Kn1y(n) = Kn2y(n), y >= 1, see A180662 for their definitions, of Sierpinski's triangle A047999 lead to the formula Kn1y(n) = A002487(n+(2*y-1)) - AS2S2S2(n,d) where the AS2S2S2(n,d) is the infinite concatenation of a S2(T, d = y-1) sequence; see for the first ten S2(T, d) and the first four Kn1y(n) the examples.
The A191372 sequence is the concatenation of all S2(T, d) sequences, d >= 0. The lengths of the S2(T, d) sequences are 2^ceiling(log(d)/log(2)) for d >= 1 while the length of S2(T, d=0) is 1.
Both the concatenation of the S2(T, d = 2^p) sequences, p >= 0, and the concatenation of the S2(T, d = 2^p-1) sequences, p >= 0, lead to Stern’s diatomic series A002487(n), n >= 2.
The differences of the sequences (AS2S2S2(T, 2^p-delta) - AS2S2S2(T, 2^(p-1)-delta)), T from 0 to (2^(p-1) -1) and 1 <= delta <= (2^(p-1)-1) (take care that p <= pmax), lead to sequences that are snippets of A002487 and, surprisingly, their reverse; see the examples.
The row sums of the Sierpinski-Stern triangle are given by the terms of A191487.

Crossrefs

Cf. A047999 (Sierpinski), A002487 (Stern).

Programs

  • Maple
    nmax:=2^5; pmax:=log(nmax)/log(2)-1; A047999:=proc(n,k) option remember; A047999(n,k) :=binomial(n,k) mod 2 end: A002487:=proc(n) option remember; if n<=1 then n elif n mod 2=0 then A002487(n/2); else A002487((n-1)/2)+A002487((n+1)/2); fi; end: d:=0: for n from 0 to nmax-d-1 do Kn1(n,d):= add(A047999(n-k+d, k+d),k=0..floor(n/2)): AS2S2S2(n,d):= A002487(n+1+2*d)-Kn1(n,d): od: for p from 1 to pmax do for d from 2^(p-1) to 2^p do for n from 0 to nmax-d-1 do Kn1(n,d):=add(A047999(n-k+d, k+d),k=0..floor(n/2)): AS2S2S2(n,d):= A002487(n+1+2*d)-Kn1(n,d) od: od: od: S2(0,0):=AS2S2S2(0,0): a(0):=S2(0,0): for d from 1 to 2^pmax do for Tx from 0 to 2^ceil(log(d)/log(2))-1 do S2(Tx,d):=AS2S2S2(Tx,d) od: od: Ty:=0: for d from 1 to 2^pmax do for Tx from 0 to 2^ceil(log(d)/log(2))-1 do Ty:=Ty+1: a(Ty):=S2(Tx,d) od: od: S2(0,0); for d from 1 to 2^pmax do seq(S2(Tx,d), Tx=0..2^ceil(log(d)/ log(2))-1) od; seq(a(n),n=0..Ty);

Formula

The first few S2(T, d) rows of the Sierpinski-Stern triangle are:
d=0: [0]
d=1: [1]
d=2: [2, 1]
d=3: [2, 1, 3, 2]
d=4: [3, 2, 3, 1]
d=5: [4, 2, 3, 2, 3, 1, 4, 3]
d=6: [4, 2, 3, 1, 4, 3, 5, 2]
d=7: [3, 1, 4, 3, 5, 2, 5, 3]
d=8: [4, 3, 5, 2, 5, 3, 4, 1]
d=9: [6, 3, 6, 4, 5, 2, 4, 3, 5, 2, 5, 3, 4, 1, 5, 4]
The first four Kn1y(n), y = d+1, sequences:
Kn11(n) = A002487(n+1) - A000004(n)
Kn12(n) = A002487(n+3) - A000012(n)
Kn13(n) = A002487(n+5) - A000034(n+1)
Kn14(n) = A002487(n+7) - A157810(n+1)
Three (AS2S2S2(T, 2^p-delta) - AS2S2S2(T, 2^(p-1)-delta)) sequences for p=6:
delta = 1: [1, 0, 1, 1, 2, 1, 3, 2, 3, 1, 4, 3, 5, 2, 5, 3, 4, 1, 5, 4, 7, 3, 8, 5, 7, 2, 7, 5, 8, 3, 7, 4]
delta = 8: [4, 3, 5, 2, 5, 3, 4, 1, 3, 2, 3, 1, 2, 1, 1, 0, 1, 1, 2, 1, 3, 2, 3, 1, 4, 3, 5, 2, 5, 3, 4, 1]
delta = 16: [5, 4, 7, 3, 8, 5, 7, 2, 7, 5, 8, 3, 7, 4, 5, 1, 4, 3, 5, 2, 5, 3, 4, 1, 3, 2, 3, 1, 2, 1, 1, 0]

A191488 A companion to Gould’s sequence A001316.

Original entry on oeis.org

4, 6, 8, 10, 8, 12, 16, 18, 8, 12, 16, 20, 16, 24, 32, 34, 8, 12, 16, 20, 16, 24, 32, 36, 16, 24, 32, 40, 32, 48, 64, 66, 8, 12, 16, 20, 16, 24, 32, 36, 16, 24, 32, 40, 32, 48, 64, 68, 16, 24, 32, 40, 32, 48, 64, 72, 32, 48, 64, 80, 64, 96, 128
Offset: 0

Views

Author

Johannes W. Meijer, Jun 05 2011

Keywords

Comments

The row sums of the Sierpinski-Stern triangle A191372 are given by sequence A191487.
The differences diff1(n) = A191487(2*n+3) - A191487(2*n+1) lead to a peculiar number triangle, see the examples. The leading terms of the rows of the diff1(n) triangle clearly stand out from the rest of the terms and are given by A001550(p+1), p>=1; for p=0 this term is 7.
If we ignore the first term of the diff1(n) rows and reverse the order of the remaining terms we get sequence A191488, see the examples; more terms require a higher row number.
Both the diff1(n) and the diff2(n) sequences are related to Gould’s sequence A001316. We ignore the first term and reverse the order of the rest of the terms. The diff2(n) sequence leads directly to A001316, see A191487, while the diff1(n) sequence leads to A001316 in a slightly more complex way. We observe that for Gould’s sequence equation A001316((2*n+1)*2^p-1) = C(p)*A001316(n) with C(p) = 2^p holds, while for its companion A191488 equation A191488((2*n+1)*2^p-1) = C(p)*A001316(n) with C(p) = 2^(p+1)+2 holds; see the Maple program. Furthermore for both sequences a(2^p - 1) = C(p).

Examples

			The first few rows of diff1(n) as a triangle, row lengths A000079(p) with p>=0, are:
[7]
[14, 4]
[36, 8, 6, 4]
[98, 16, 12, 8, 10, 8, 6, 4]
[276, 32, 24, 16, 20, 16, 12, 8, 18, 16, 12, 8, 10, 8, 6, 4]
[794, 64, 48, 32, 40, 32, 24, 16, 36, 32, 24, 16, 20, 16, 12, 8, 34, 32, 24, 16, 20, 16, 12, 8, 18, 16, 12, 8, 10, 8, 6, 4]
The first few rows of diff1(n) reversed minus the first term are:
[4]
[4, 6, 8]
[4, 6, 8, 10, 8, 12, 16]
[4, 6, 8, 10, 8, 12, 16, 18, 8, 12, 16, 20, 16, 24, 32]
[4, 6, 8, 10, 8, 12, 16, 18, 8, 12, 16, 20, 16, 24, 32, 34, 8, 12, 16, 20, 16, 24, 32, 36, 16, 24, 32, 40, 32, 48, 64]
		

Crossrefs

Programs

  • Maple
    nmax:=2^6; pmax:=ceil(log(nmax)/log(2)); A001316 := n -> if n<=-1 then 0 else 2^add(i, i=convert(n, base, 2)) fi: C := proc(p): C(p) := 2^(p+1)+2 end: for p from 0 to pmax do for n from 0 to nmax do a((2*n+1)*2^p-1):= C(p)*A001316(n) od: od: seq(a(n), n=0..nmax-2);

Formula

a((2*n+1)*2^p - 1) = C(p) * A001316(n) with C(p) = (2^(p+1)+2), p>=0.
a(2^p - 1) = 2^(p+1)+2 = A052548(p+1), p>=0.
Showing 1-2 of 2 results.