A362942 Partial sums of A229037.
1, 2, 4, 5, 6, 8, 10, 14, 18, 19, 20, 22, 23, 24, 26, 28, 32, 36, 38, 42, 46, 51, 56, 64, 69, 74, 83, 84, 85, 87, 88, 89, 91, 93, 97, 101, 102, 103, 105, 106, 107, 109, 111, 115, 119, 121, 125, 129, 134, 139, 147, 152, 157, 166, 175, 179, 183, 188, 193
Offset: 1
Keywords
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..100000 (using b-file in A229037)
- N. J. A. Sloane, New Gilbreath Conjectures, Sum and Erase, Dissecting Polygons, and Other New Sequences, Doron Zeilberger's Exper. Math. Seminar, Rutgers, Sep 14 2023: Video, Slides, Updates. (Mentions this sequence.)
Programs
-
Mathematica
a[1] = 1; a[n_] := a[n] = Block[{z = 1}, While[Catch[Do[If[z == 2*a[n - k] - a[n - 2*k], Throw@ True], {k, Floor[(n - 1)/2]}]; False], z++]; z]; Accumulate@ Array[a, 120] (* Michael De Vlieger, Sep 12 2023, after Giovanni Resta at A229037 *)
-
Python
from itertools import count, islice def A362942_gen(): # generator of terms blist, c = [], 0 for n in count(0): i, j, b = 1, 1, set() while n-(i<<1) >= 0: b.add((blist[n-i]<<1)-blist[n-2*i]) i += 1 while j in b: j += 1 blist.append(j) yield (c:=c+j) A362942_list = list(islice(A362942_gen(),30)) # Chai Wah Wu, Sep 12 2023