This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A256994 a(n) = n + 1 when n <= 3, otherwise a(n) = 2^(n-2) + 3; also iterates of A005187 starting from a(1) = 2. 5
 2, 3, 4, 7, 11, 19, 35, 67, 131, 259, 515, 1027, 2051, 4099, 8195, 16387, 32771, 65539, 131075, 262147, 524291, 1048579, 2097155, 4194307, 8388611, 16777219, 33554435, 67108867, 134217731, 268435459, 536870915, 1073741827, 2147483651, 4294967299, 8589934595, 17179869187, 34359738371, 68719476739, 137438953475, 274877906947 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Note that if we instead iterated function b(n) = 1+A005187(n), from b(1) onward, we would get the powers of two, A000079. LINKS Antti Karttunen, Table of n, a(n) for n = 1..128 FORMULA If n < 4, a(n) = n + 1, otherwise a(n) = 2^(n-2) + 3 = A062709(n-2). a(1) = 2; for n > 1, a(n) = A005187(a(n-1)). MATHEMATICA Table[If[n<4, n+1, 2^(n-2)+3], {n, 40}] (* Harvey P. Dale, May 14 2019 *) PROG (PARI) A256994(n) = if(n < 4, n+1, 2^(n-2) + 3); \\ Alternatively, by iterating A005187: A005187(n) = { my(s=n); while(n>>=1, s+=n); s; }; i=1; k=2; print1(k); while(i <= 40, k = A005187(k); print1(", ", k); i++); (Scheme, two alternatives) (define (A256994 n) (if (< n 4) (+ n 1) (+ (A000079 (- n 2)) 3))) ;; The following uses memoization-macro definec: (definec (A256994 n) (if (= 1 n) 2 (A005187 (A256994 (- n 1))))) CROSSREFS Topmost row of A256995, leftmost column of A256997. Cf. A000079, A005187, A062709, A068156. Sequence in context: A018064 A226161 A188624 * A107481 A058521 A116628 Adjacent sequences:  A256991 A256992 A256993 * A256995 A256996 A256997 KEYWORD nonn AUTHOR Antti Karttunen, Apr 15 2015 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified July 17 20:45 EDT 2019. Contains 325109 sequences. (Running on oeis4.)