# Table of n, a(n) for n = 1..100 # A320100 Automata sum similar to A102376 but using mod 5. # Georg Fischer, Feb 20 2019 with (Python): # # 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)) # fms2 = (frameSize+1) / 2 # frame[151, 151] = 1 # mod = 5 # sequence = [] # for j in range(100): # frame = signal.convolve2d(frame, filter, mode='same') # frame = np.mod(frame, mod) # sequence.append(np.sum(frame.reshape(1, -1))) # print(j + 1, np.sum(frame.reshape(1, -1))) # 1 4 2 16 3 44 4 61 5 4 6 16 7 64 8 176 9 244 10 16 11 64 12 201 13 324 14 556 15 44 16 176 17 324 18 736 19 1004 20 61 21 244 22 556 23 1004 24 1561 25 4 26 16 27 64 28 176 29 244 30 16 31 64 32 256 33 704 34 976 35 64 36 256 37 804 38 1296 39 2224 40 176 41 704 42 1296 43 2944 44 4016 45 244 46 976 47 2224 48 4016 49 6244 50 16 51 64 52 201 53 324 54 556 55 64 56 256 57 804 58 1296 59 2224 60 201 61 804 62 1976 63 2924 64 5061 65 324 66 1296 67 2924 68 6176 69 8964 70 556 71 2224 72 5061 73 8964 74 14056 75 44 76 176 77 324 78 736 79 1004 80 176 81 704 82 1296 83 2944 84 4016 85 324 86 1296 87 2924 88 6176 89 8964 90 736 91 2944 92 6176 93 9984 94 16096 95 1004 96 4016 97 8964 98 16096 99 25004 100 61