cp's OEIS Frontend

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.

A050027 a(n) = a(n-1) + a(m) for n >= 4, where m = 2*n - 2 - 2^(p+1) and p is the unique integer such that 2^p < n - 1 <= 2^(p+1), starting with a(1) = a(2) = a(3) = 1.

This page as a plain text file.
%I A050027 #17 May 10 2020 22:57:22
%S A050027 1,1,1,2,4,5,7,12,24,25,27,32,44,69,101,170,340,341,343,348,360,385,
%T A050027 417,486,656,997,1345,1730,2216,3213,4943,8156,16312,16313,16315,
%U A050027 16320,16332,16357,16389,16458,16628,16969,17317,17702
%N A050027 a(n) = a(n-1) + a(m) for n >= 4, where m = 2*n - 2 - 2^(p+1) and p is the unique integer such that 2^p < n - 1 <= 2^(p+1), starting with a(1) = a(2) = a(3) = 1.
%H A050027 Ivan Neretin, <a href="/A050027/b050027.txt">Table of n, a(n) for n = 1..8193</a>
%p A050027 a := proc(n) option remember;
%p A050027      `if`(n < 4, [1,1,1][n], a(n - 1) + a(-2^ceil(log[2](n - 1)) + 2*n - 2)):
%p A050027      end proc:
%p A050027 seq(a(n), n = 1..40); # _Petros Hadjicostas_, Nov 18 2019
%t A050027 Fold[Append[#1, #1[[-1]] + #1[[#2]]] &, {1, 1, 1}, Flatten@Table[2 k, {n, 5}, {k, 2^n}]] (* _Ivan Neretin_, Sep 06 2015 *)
%o A050027 (PARI) lista(nn) = {nn = max(nn, 3); my(va = vector(nn)); va[1] = 1; va[2] = 1; va[3] = 1; for(n=4, nn, va[n] = va[n-1] + va[2*(n - 1 - 2^logint(n-2, 2))]); va; } \\ _Petros Hadjicostas_, May 10 2020
%K A050027 nonn
%O A050027 1,4
%A A050027 _Clark Kimberling_
%E A050027 Name edited by _Petros Hadjicostas_, Nov 18 2019