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

A101624 Stern-Jacobsthal numbers.

Original entry on oeis.org

1, 1, 3, 1, 7, 5, 11, 1, 23, 21, 59, 17, 103, 69, 139, 1, 279, 277, 827, 273, 1895, 1349, 2955, 257, 5655, 5141, 14395, 4113, 24679, 16453, 32907, 1, 65815, 65813, 197435, 65809, 460647, 329029, 723851, 65793, 1512983, 1381397, 3881019, 1118225
Offset: 0

Views

Author

Paul Barry, Dec 10 2004

Keywords

Comments

The Stern diatomic sequence A002487 could be called the Stern-Fibonacci sequence, since it is given by A002487(n) = Sum_{k=0..floor(n/2)} (binomial(n-k,k) mod 2), where F(n+1) = Sum_{k=0..floor(n/2)} binomial(n-k,k). Now a(n) = Sum_{k=0..floor(n/2)} (binomial(n-k,k) mod 2)*2^k, where J(n+1) = Sum_{k=0..floor(n/2)} binomial(n-k,k)*2^k, with J(n) = A001045(n), the Jacobsthal numbers. - Paul Barry, Sep 16 2015
These numbers seem to encode Stern (0, 1)-polynomials in their binary expansion. See Dilcher & Ericksen paper, especially Table 1 on page 79, page 5 in PDF. See A125184 (A260443) for another kind of Stern-polynomials, and also A177219 for a reference to maybe a third kind. - Antti Karttunen, Nov 01 2016

Crossrefs

Programs

  • Haskell
    a101624 = sum . zipWith (*) a000079_list . map (flip mod 2) . a011973_row
    -- Reinhard Zumkeller, Jul 14 2015
  • Python
    prpr = 1
    prev = 1
    print("1, 1", end=", ")
    for i in range(99):
        current = (prev)^(prpr*2)
        print(current, end=", ")
        prpr = prev
        prev = current
    # Alex Ratushnyak, Apr 14 2012
    
  • Python
    def A101624(n): return sum(int(not k & ~(n-k))*2**k for k in range(n//2+1)) # Chai Wah Wu, Jun 20 2022
    

Formula

a(n) = Sum_{k=0..floor(n/2)} (binomial(n-k, k) mod 2)*2^k.
a(2^n-1)=1, a(2*n) = 2*a(n-1) + a(n+1) = A099902(n); a(2*n+1) = A101625(n+1).
a(n) = Sum_{k=0..n} (binomial(k, n-k) mod 2)*2^(n-k). - Paul Barry, May 10 2005
a(n) = Sum_{k=0..n} A106344(n,k)*2^(n-k). - Philippe Deléham, Dec 18 2008
a(0)=1, a(1)=1, a(n) = a(n-1) XOR (a(n-2)*2), where XOR is the bitwise exclusive-OR operator. - Alex Ratushnyak, Apr 14 2012
A000120(a(n-1)) = A002487(n). - Karl-Heinz Hofmann, Jun 18 2025

A166555 Triangle read by rows, T(n, k) = 2^k * A047999(n, k).

Original entry on oeis.org

1, 1, 2, 1, 0, 4, 1, 2, 4, 8, 1, 0, 0, 0, 16, 1, 2, 0, 0, 16, 32, 1, 0, 4, 0, 16, 0, 64, 1, 2, 4, 8, 16, 32, 64, 128, 1, 0, 0, 0, 0, 0, 0, 0, 256, 1, 2, 0, 0, 0, 0, 0, 0, 256, 512, 1, 0, 4, 0, 0, 0, 0, 0, 256, 0, 1024, 1, 2, 4, 8, 0, 0, 0, 0, 256, 512, 1024, 2048, 1, 0, 0, 0, 16, 0, 0, 0, 256, 0, 0, 0, 4096
Offset: 0

Views

Author

Gary W. Adamson, Oct 17 2009

Keywords

Comments

Number of positive terms in n-th row (n>=0) equals to A000120(n). - Vladimir Shevelev, Oct 25 2010
Former name: Triangle read by rows, Sierpinski's gasket, A047999 * (1,2,4,8,...) diagonalized. - G. C. Greubel, Dec 02 2024

Examples

			First few rows of the triangle are:
  1;
  1, 2;
  1, 0, 4;
  1, 2, 4, 8;
  1, 0, 0, 0, 16;
  1, 2, 0, 0, 16,.32;
  1, 0, 4, 0, 16,..0,..64;
  1, 2, 4, 8, 16,.32,..64,..128;
  1, 0, 0, 0,..0,..0,...0,....0,..256;
  1, 2, 0, 0,..0,..0,...0,....0,..256,...512;
  1, 0, 4, 0,..0,..0,...0,....0,..256,.....0,...1024;
  1, 2, 4, 8,..0,..0,...0,....0,..256,...512,...1024,...2048;
  1, 0, 0, 0, 16,..0,...0,....0,..256,.....0,......0,......0,..4096;
  ...
		

Crossrefs

Sums include: A001317 (row), A101624 (diagonal), A101625 (odd rows of signed diagonal).

Programs

  • Magma
    A166555:= func< n,k | 2^k*( Binomial(n,k) mod 2) >;
    [A166555(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Dec 01 2024
    
  • Mathematica
    A166555[n_, k_]:= 2^k*Mod[Binomial[n, k], 2];
    Table[A166555[n,k], {n,0,14}, {k,0,n}]//Flatten (* G. C. Greubel, Dec 01 2024 *)
  • SageMath
    def A166555(n,k): return 2^k*int(not ~n & k) if kA166555(n,k) for k in range(n+1)] for n in range(15)])) # G. C. Greubel, Dec 01 2024

Formula

Triangle read by rows, A047999 * Q. A047999 = Sierpinski's gasket, Q = an infinite lower triangular matrix with (1,2,4,8,...) as the main diagonal and the rest zeros.
Sum_{k=0..n} T(n, k) = A001317(n).
From G. C. Greubel, Dec 02 2024: (Start)
T(n, k) = 2^k * (binomial(n,k) mod 2).
T(n, n) = A000079(n).
T(2*n, n) = A000007(n).
Sum_{k=0..n} (-1)^k*T(n, k) = (1/2)*( (1+(-1)^n)*A038183(n/2) - (1-(-1)^n) *A038183((n-1)/2) ).
Sum_{k=0..floor(n/2)} T(n-k, k) = A101624(n).
Sum_{k=0..floor((2*m+1)/2)} T(2*m-k+1, k) = A101625(m+1), m >= 0. (End)

Extensions

New name by G. C. Greubel, Dec 02 2024

A204771 a(n) = a(n-1) XOR (a(n-2)*3).

Original entry on oeis.org

0, 1, 1, 2, 1, 7, 4, 17, 29, 46, 121, 243, 408, 833, 1929, 3658, 6353, 12815, 30844, 61009, 100133, 216534, 514233, 930107, 1686288, 3352737, 8264081, 15163506, 27077825, 53153175, 133991380, 243114769, 428343405, 854649182, 2120804377, 3870970883, 6937439304
Offset: 0

Views

Author

Alex Ratushnyak, May 07 2012

Keywords

Crossrefs

Cf. A101624: a(n) = a(n-1) XOR (a(n-2)*2).
Cf. A101625: a(n) = a(n-1) XOR (a(n-2)*4).

Programs

  • Python
    prpr = 0
    prev = 1
    for i in range(99):
        current = (prev)^(prpr*3)
        print(prpr, end=',')
        prpr = prev
        prev = current

Formula

a(0)=0, a(1)=1, a(n) = a(n-1) XOR (a(n-2)*3), where XOR is the bitwise exclusive-OR operator.

A260534 Square array read by ascending antidiagonals, T(n,k) = Sum_{j=0..k} n^j*(C(k-j,j) mod 2).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 4, 1, 3, 1, 1, 1, 5, 1, 7, 2, 1, 1, 1, 6, 1, 13, 5, 3, 1, 1, 1, 7, 1, 21, 10, 11, 1, 1, 1, 1, 8, 1, 31, 17, 31, 1, 4, 1, 1, 1, 9, 1, 43, 26, 69, 1, 23, 3, 1, 1, 1, 10, 1, 57, 37, 131, 1, 94, 21, 5, 1, 1, 1, 11
Offset: 0

Views

Author

Peter Luschny, Sep 20 2015

Keywords

Comments

A parametrization of Stern's diatomic series (which is here T(1,k)). (For other generalizations of Dijkstra's fusc function see the Luschny link.)

Examples

			Array starts:
n\k[0, 1,  2, 3,  4,  5,   6, 7,    8,    9,    10]
[0] 1, 1,  1, 1,  1,  1,   1, 1,    1,    1,     1, ...
[1] 1, 1,  2, 1,  3,  2,   3, 1,    4,    3,     5, ... [A002487]
[2] 1, 1,  3, 1,  7,  5,  11, 1,   23,   21,    59, ... [A101624]
[3] 1, 1,  4, 1, 13, 10,  31, 1,   94,   91,   355, ...
[4] 1, 1,  5, 1, 21, 17,  69, 1,  277,  273,  1349, ... [A101625]
[5] 1, 1,  6, 1, 31, 26, 131, 1,  656,  651,  3881, ...
[6] 1, 1,  7, 1, 43, 37, 223, 1, 1339, 1333,  9295, ...
[7] 1, 1,  8, 1, 57, 50, 351, 1, 2458, 2451, 19559, ...
[8] 1, 1,  9, 1, 73, 65, 521, 1, 4169, 4161, 37385, ...
-,-,-,-,A002061,A002522,A071568,-,-,A059826,-,A002523,
		

Crossrefs

Programs

  • Maple
    T := (n,k) -> add(modp(binomial(k-j,j),2)*n^j, j=0..k):
    seq(lprint(seq(T(n,k),k=0..10)),n=0..5);
  • Mathematica
    Table[If[(n - k) == 0, 1, Sum[(n - k)^j Mod[Binomial[k - j, j], 2], {j, 0, k}]], {n, 0, 10}, {k, 0, n}] (* Michael De Vlieger, Sep 21 2015 *)
  • Python
    def A260534_T(n,k):
        return sum(0 if ~(k-j) & j else n**j for j in range(k+1)) # Chai Wah Wu, Feb 08 2016

A284247 Binary representation of generation n in the reversible cellular automaton RCA(1) when started with a single ON cell at generation 0.

Original entry on oeis.org

1, 1, 101, 1, 10101, 10001, 1000101, 1, 100010101, 100010001, 10101000101, 100000001, 1010000010101, 1000000010001, 100000001000101, 1, 10000000100010101, 10000000100010001, 1010000010101000101, 10000000100000001, 101010001010000010101, 100010001000000010001
Offset: 0

Views

Author

Robert Price, Mar 23 2017

Keywords

Comments

This sequence is the binary representation of A101625.
The count of ON cells at each generation is A002487.

Examples

			The fourth generation (starting at 0) of RCA(1) is x.x.x where "x" is an ON cell and "." is OFF. Treating this as a binary number yields 10101. Thus a(4) = 10101.
		

Crossrefs

Showing 1-5 of 5 results.