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 A317648 #25 Nov 01 2020 06:07:54 %S A317648 1,1,2,2,3,3,4,4,5,5,6,7,7,7,8,8,9,9,10,11,12,12,12,12,13,14,15,15,15, %T A317648 15,16,16,17,17,18,19,20,21,21,21,21,21,22,23,24,25,26,27,27,27,27,27, %U A317648 27,27,28,29,30,31,31,31,31,31,32,32,33,33,34,35,36,37,38,38,38,38,38,38,39,40,41,42,43,44,45 %N A317648 a(1) = a(2) = 1; for n >= 3, a(n) = a(t(n)) + a(n-t(n)) where t = A004001. %C A317648 This sequence hits every positive integer. %C A317648 Let b(1) = b(2) = b(3) = 1; for n >= 4, b(n) = b(t(n)) + b(n-t(n)) where t = A004001. Observe the symmetric relation between this sequence (a(n)) and b(n) thanks to line plots of a(n)-n/2 and b(n)-n/2 in Links section. %H A317648 Altug Alkan, <a href="/A317648/b317648.txt">Table of n, a(n) for n = 1..65536</a> %H A317648 Altug Alkan, <a href="/A317648/a317648_1.png">Line plot of a(n)-n/2 for n <= 2^17</a> %H A317648 Altug Alkan, <a href="/A317648/a317648_2.png">Line plots of A004001(n)-n/2 and a(n)-n/2 for n <= 2^14</a> %H A317648 Altug Alkan, <a href="/A317648/a317648_3.png">Line plots of a(n)-n/2 and b(n)-n/2 for n <= 2^11</a> %F A317648 a(n+1) - a(n) = 0 or 1 for all n >= 1. %p A317648 b:= proc(n) option remember; `if`(n<3, 1, %p A317648 b(b(n-1)) +b(n-b(n-1))) %p A317648 end: %p A317648 a:= proc(n) option remember; `if`(n<3, 1, %p A317648 a(b(n)) +a(n-b(n))) %p A317648 end: %p A317648 seq(a(n), n=1..100); # after _Alois P. Heinz_ at A317686 %t A317648 t[1] = 1; t[2] = 1; t[n_] := t[n] = t[t[n-1]] + t[n - t[n-1]]; %t A317648 a[1] = a[2] = 1; a[n_] := a[n] = a[t[n]] + a[n - t[n]]; %t A317648 Array[a, 100] (* _Jean-François Alcover_, Nov 01 2020 *) %o A317648 (PARI) t=vector(99); t[1]=t[2]=1; for(n=3, #t, t[n] = t[t[n-1]]+t[n-t[n-1]]); a=vector(99); a[1]=a[2]=1; for(n=3, #a, a[n] = a[t[n]]+a[n-t[n]]); a %Y A317648 Cf. A004001, A317686. %K A317648 nonn,easy %O A317648 1,3 %A A317648 _Altug Alkan_, Aug 02 2018