|
|
A364036
|
|
a(0) = 0, a(1) = 0; for n > 1, a(n) is the number of pairs of consecutive terms prior to a(n-1) that sum to the same value as a(n-2) + a(n-1).
|
|
3
|
|
|
0, 0, 0, 1, 0, 1, 2, 0, 0, 2, 1, 1, 2, 2, 0, 3, 3, 0, 4, 1, 0, 3, 5, 0, 1, 4, 2, 1, 6, 0, 2, 4, 3, 1, 2, 7, 0, 2, 5, 3, 1, 3, 4, 4, 2, 4, 5, 1, 6, 5, 0, 3, 8, 1, 2, 9, 2, 3, 4, 6, 0, 7, 7, 0, 8, 3, 4, 9, 0, 3, 10, 1, 5, 8, 2, 1, 11, 0, 6, 9, 0, 4, 5, 5, 2, 10, 1, 7, 4, 8, 2, 3, 5, 5, 4, 6, 5, 9
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,7
|
|
COMMENTS
|
The same number cannot occur four times in a row as the second pair in a triplet of the same numbers increments the appearance count of the first pair by one, so the fourth number is always one more than the previous three numbers.
The occurrences of three consecutive equal numbers is quite rare, only occurring thirteen times in the first 20 million terms. The last such triplet is a(3620001) = a(3620002) = a(3620003) = 1159. It is likely such triplets occur infinitely often although this is unknown.
|
|
LINKS
|
|
|
EXAMPLE
|
a(2) = 0 as there are no previous pairs prior to a(1).
a(3) = 1 as a(1) + a(2) = 0 + 0 = 0, and there has been one previous pair that also sums to 0, namely a(0) + a(1).
a(6) = 2 as a(4) + a(5) = 0 + 1 = 1, and there has been two previous pairs that also sums to 1, namely a(2) + a(3) and a(3) + a(4).
|
|
MATHEMATICA
|
nn = 120; c[_] := 0; a[0] = a[1] = i = j = 0; Do[Set[k, c[i + j]++]; i = j; j = a[n] = k, {n, 2, nn}]; Array[a, nn + 1, 0] (* Michael De Vlieger, Jul 02 2023 *)
|
|
PROG
|
(Python)
def A364036_gen(): # generator of terms
a, b, ndict = 0, 0, {0:1}
while True:
a, b = b, ndict[a+b]
yield b-1
ndict[a+b] = ndict.get(a+b, 0)+1 # Chai Wah Wu, Jul 02 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|