# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a087192 Showing 1-1 of 1 %I A087192 #34 Jun 03 2024 18:19:11 %S A087192 1,2,3,4,6,8,11,15,20,27,36,48,64,86,115,154,206,275,367,490,654,872, %T A087192 1163,1551,2068,2758,3678,4904,6539,8719,11626,15502,20670,27560, %U A087192 36747,48996,65328,87104,116139,154852,206470,275294,367059,489412,652550 %N A087192 a(n) = ceiling(a(n-1)*4/3), with a(1) = 1. %C A087192 If you repeatedly base 64 encode a string, starting with a single character, the length of the string at step n is 4*a(n). - _Christian Perfect_, Jan 06 2016 %H A087192 Robert Israel, Table of n, a(n) for n = 1..7994 %F A087192 Partial sums of A072493. Also indices of records in A087165: A087165(a(n))=n. %p A087192 A[1]:= 1: %p A087192 for n from 2 to 100 do A[n]:= ceil(4/3*A[n-1]) od: %p A087192 seq(A[i],i=1..100); # _Robert Israel_, Aug 17 2017 %t A087192 a[1] = 1; a[n_] := a[n] = Ceiling[4 a[n - 1]/3]; Table[a@ n, {n, 45}] (* _Michael De Vlieger_, Jan 06 2016 *) %o A087192 (PARI) a(n) = if (n==1, 1, ceil(a(n-1)*4/3)) \\ _Michel Marcus_, Aug 01 2013 %o A087192 (Magma) [n eq 1 select 1 else Ceiling(Self(n-1)*4/3): n in [1..50]]; // _Vincenzo Librandi_, Aug 17 2017 %o A087192 (Python) %o A087192 from fractions import Fraction %o A087192 from functools import lru_cache %o A087192 @lru_cache(maxsize=None) %o A087192 def A087192(n): return int(Fraction(4*A087192(n-1),3).__ceil__()) if n>1 else 1 # _Chai Wah Wu_, Sep 07 2023 %Y A087192 Cf. A072493, A087165, A155167. %K A087192 nonn %O A087192 1,2 %A A087192 _Paul D. Hanna_, Aug 24 2003 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE