OFFSET
1,4
COMMENTS
Partial sums of A004641. - Reinhard Zumkeller, Dec 05 2009
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
N. J. A. Sloane, Families of Essentially Identical Sequences, Mar 24 2021 (Includes this sequence)
FORMULA
a(n) = floor((sqrt(2)-1)*n + 1/sqrt(2)).
a(1) = a(2) = 1; a(n) = n - a(n-1) - a(a(n-2)) for n > 2. - Altug Alkan, Jun 24 2017
MATHEMATICA
Table[Floor[(Sqrt[2] - 1) n + 1 / Sqrt[2]], {n, 100}] (* Vincenzo Librandi, Jun 26 2017 *)
PROG
(Python)
l=[0, 1, 1]
for n in range(3, 101): l.append(n - l[n - 1] - l[l[n - 2]])
print(l[1:]) # Indranil Ghosh, Jun 24 2017, after Altug Alkan
(Magma) [Floor((Sqrt(2)-1)*n+1/Sqrt(2)): n in [1..100]]; // Vincenzo Librandi, Jun 26 2017
CROSSREFS
Cf. A005206.
The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A000201 as the parent: A000201, A001030, A001468, A001950, A003622, A003842, A003849, A004641, A005614, A014675, A022342, A088462, A096270, A114986, A124841. - N. J. A. Sloane, Mar 11 2021
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Nov 12 2003
STATUS
approved