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.

A096053 a(n) = (3*9^n - 1)/2.

Original entry on oeis.org

1, 13, 121, 1093, 9841, 88573, 797161, 7174453, 64570081, 581130733, 5230176601, 47071589413, 423644304721, 3812798742493, 34315188682441, 308836698141973, 2779530283277761, 25015772549499853, 225141952945498681
Offset: 0

Views

Author

Benoit Cloitre, Jun 18 2004

Keywords

Comments

Generalized NSW numbers. - Paul Barry, May 27 2005
Counts total area under elevated Schroeder paths of length 2n+2, where area under a horizontal step is weighted 3. Case r=4 for family (1+(r-1)x)/(1-2(1+r)x+(1-r)^2*x^2). Case r=2 gives NSW numbers A002315. Fifth binomial transform of (1+8x)/(1-16x^2), A107906. - Paul Barry, May 27 2005
Primes in this sequence include: a(2) = 13, a(4) = 1093, a(7) = 797161. Semiprimes in this sequence include: a(3) = 121 = 11^2, a(5) = 9841 = 13 * 757, a(6) = 88573 = 23 * 3851, a(9) = 64570081 = 1871 * 34511, a(10) = 581130733 = 1597 * 363889, a(12) = 47071589413 = 47 * 1001523179, a(19) = 225141952945498681 = 13097927 * 17189128703.
Sum of divisors of 9^n. - Altug Alkan, Nov 10 2015

Crossrefs

Cf. A107903, A138894 ((5*9^n-1)/4).

Programs

Formula

From Paul Barry, May 27 2005: (Start)
G.f.: (1+3*x)/(1-10*x+9*x^2);
a(n) = Sum_{k=0..n} binomial(2n+1, 2k)*4^k;
a(n) = ((1+sqrt(4))*(5+2*sqrt(4))^n+(1-sqrt(4))*(5-2*sqrt(4))^n)/2. (End)
a(n-1) = (-9^n/3)*B(2n,1/3)/B(2n) where B(n,x) is the n-th Bernoulli polynomial and B(k)=B(k,0) is the k-th Bernoulli number.
a(n) = 10*a(n-1) - 9*a(n-2).
a(n) = 9*a(n-1) + 4. - Vincenzo Librandi, Nov 01 2011
a(n) = A000203(A001019(n)). - Altug Alkan, Nov 10 2015
a(n) = A320030(3^n-1). - Nathan M Epstein, Jan 02 2019

Extensions

Edited by N. J. A. Sloane, at the suggestion of Andrew S. Plewe, Jun 15 2007

A320100 Automata sum similar to A102376 but using mod 5.

Original entry on oeis.org

4, 16, 44, 61, 4, 16, 64, 176, 244, 16, 64, 201, 324, 556, 44, 176, 324, 736, 1004, 61, 244, 556, 1004, 1561, 4, 16, 64, 176, 244, 16, 64, 256, 704, 976, 64, 256, 804, 1296, 2224, 176, 704, 1296, 2944, 4016, 244, 976, 2224, 4016, 6244, 16, 64, 201, 324, 556
Offset: 1

Views

Author

Nathan M Epstein, Dec 10 2018

Keywords

Comments

The automata that generates this sequence operates on a grid of cells c(i,j). The cells in the automata have five possible values, [0-4]. The next generation in the CA is calculated by applying the following rule to each cell: c(i,j) = ( c(i+1,j-1) + c(i+1,j+1) + c(i-1,j-1) + c(i-1,j+1) ) mod 5.
Start with a single cell with a value of 1, with all other cells set to 0. For each generation, the term in this sequence c(n) is the aggregate values of all cells in the grid for each discrete generation of the automaton (i.e., not cumulative over multiple generations).
The cellular automaton that generates this sequence has been empirically observed to repeat the number of active cells (4 in this case) if the iteration number N is a power of the modulus + 1. The modulus in this case is 5.
This has been observed to occur with any prime mod and any starting pattern of cells. I'm picking this particular implementation because it's the same as the one used in A102376.
Counting the active (nonzero) cells instead of taking the sum also creates a different but related sequence. This sequence is the sum of each iteration, and cells in this automaton have values 0, 1, 2, 3 or 4. Only for mod 2 are both the sum and active cell counts the same.

Crossrefs

Cf. A102376 (mod 2), A320030 (mod 3).

Programs

  • Python
    # requires scipy library (try pip install scipy)
    # more info: https://scipy.org/install/
    import numpy as np
    from scipy import signal
    frameSize = 301
    filter = [[0, 1, 0], [1, 0, 1], [0, 1, 0]] # this defines the CA neighborhood
    frame  = np.zeros((frameSize, frameSize))
    frame[int(frameSize/2), int(frameSize/2)] = 1
    mod = 5
    sequence = []
    for j in range(140):
        frame = signal.convolve2d(frame, filter, mode='same')
        frame = np.mod(frame, mod)
        # If you want to visualize the automaton you can use a tool
        # like opencv (pip install opencv-python) to save the frame
        # as an image each  iteration.
        # i:e:(with other imports) import cv2
        #     (inside loop)         cv2.imwrite('automatonFrame%s.png' % j, frame)
        sequence.append(int(np.sum(frame.reshape(1, -1))))
    print(sequence)
Showing 1-2 of 2 results.