This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A256994 #19 Feb 22 2025 16:13:06 %S A256994 2,3,4,7,11,19,35,67,131,259,515,1027,2051,4099,8195,16387,32771, %T A256994 65539,131075,262147,524291,1048579,2097155,4194307,8388611,16777219, %U A256994 33554435,67108867,134217731,268435459,536870915,1073741827,2147483651,4294967299,8589934595,17179869187,34359738371,68719476739,137438953475,274877906947 %N A256994 a(n) = n + 1 when n <= 3, otherwise a(n) = 2^(n-2) + 3; also iterates of A005187 starting from a(1) = 2. %C A256994 Note that if we instead iterated function b(n) = 1+A005187(n), from b(1) onward, we would get the powers of two, A000079. %H A256994 Antti Karttunen, <a href="/A256994/b256994.txt">Table of n, a(n) for n = 1..128</a> %F A256994 If n < 4, a(n) = n + 1, otherwise a(n) = 2^(n-2) + 3 = A062709(n-2). %F A256994 a(1) = 2; for n > 1, a(n) = A005187(a(n-1)). %t A256994 Table[If[n<4,n+1,2^(n-2)+3],{n,40}] (* _Harvey P. Dale_, May 14 2019 *) %o A256994 (PARI) %o A256994 A256994(n) = if(n < 4, n+1, 2^(n-2) + 3); %o A256994 (PARI) %o A256994 \\ By iterating A005187: %o A256994 A005187(n) = { my(s=n); while(n>>=1, s+=n); s; }; %o A256994 i=1; k=2; print1(k); while(i <= 40, k = A005187(k); print1(", ", k); i++); %o A256994 (Scheme) %o A256994 (define (A256994 n) (if (< n 4) (+ n 1) (+ (A000079 (- n 2)) 3))) %o A256994 (Scheme) %o A256994 ;; The following uses memoization-macro definec: %o A256994 (definec (A256994 n) (if (= 1 n) 2 (A005187 (A256994 (- n 1))))) %Y A256994 Topmost row of A256995, leftmost column of A256997. %Y A256994 Cf. A000079, A005187, A062709, A068156. %K A256994 nonn %O A256994 1,1 %A A256994 _Antti Karttunen_, Apr 15 2015