login
a(0) = 1; a(n) = n + (largest element of {a} <= n).
6

%I #25 Nov 19 2021 02:48:04

%S 1,2,4,5,8,10,11,12,16,17,20,22,24,25,26,27,32,34,35,36,40,41,44,45,

%T 48,50,52,54,55,56,57,58,64,65,68,70,72,73,74,75,80,82,83,84,88,90,91,

%U 92,96,97,100,101,104,105,108,110,112,114,116,117,118,119,120,121,128,130

%N a(0) = 1; a(n) = n + (largest element of {a} <= n).

%C A self-describing sequence. Pick any number n; this n says: "There are n terms in the sequence which are < 2n". This sequence is the slowest increasing one with this property. See comments on A037988. - _Eric Angelini_, Jun 15 2007

%H Michael De Vlieger, <a href="/A094591/b094591.txt">Table of n, a(n) for n = 0..10000</a>

%H Jon Maiga, <a href="http://sequencedb.net/s/A094591">Computer-generated formulas for A094591</a>, Sequence Machine.

%F From _Andrey Zabolotskiy_, Oct 28 2021: (Start)

%F a(n) = A037988(n-1) + 1. [Conjectured by the original author, apparently proved by Eric Angelini.]

%F The first differences are A272729. [discovered by Sequence Machine] (End)

%t Block[{a = {1}}, Do[AppendTo[a, i + Last@ TakeWhile[a, # <= i &]], {i, 65}]; a] (* _Michael De Vlieger_, Sep 04 2017 *)

%o (Python)

%o def aupton(nn):

%o alst = [1]

%o for n in range(1, nn+1):

%o alst.append(n + max(k for k in alst if k <= n))

%o return alst

%o print(aupton(65)) # _Michael S. Branicky_, Oct 28 2021

%Y Cf. A037988, A272729.

%K nonn,easy

%O 0,2

%A _Leroy Quet_, Jun 07 2004

%E More terms from _Vladeta Jovovic_, Jun 11 2004