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.

A305865 a(1) = 1, a(n) = -5*a(n/3) if n is divisible by 3, otherwise a(n) = n - a(n-1).

This page as a plain text file.
%I A305865 #43 Aug 26 2018 12:23:12
%S A305865 1,1,-5,9,-4,-5,12,-4,25,-15,26,-45,58,-44,20,-4,21,25,-6,26,-60,82,
%T A305865 -59,20,5,21,-125,153,-124,75,-44,76,-130,164,-129,225,-188,226,-290,
%U A305865 330,-289,220,-177,221,-100,146,-99,20,29,21,-105,157,-104,-125,180,-124,30,28,31,-130,191,-129,300,-236,301,-410,477,-409,295
%N A305865 a(1) = 1, a(n) = -5*a(n/3) if n is divisible by 3, otherwise a(n) = n - a(n-1).
%H A305865 Altug Alkan, <a href="/A305865/b305865.txt">Table of n, a(n) for n = 1..19682</a>
%H A305865 Altug Alkan, <a href="/A305865/a305865.png">A scatterplot of a(n) for n <= 3^10-1</a>
%H A305865 Altug Alkan, <a href="/A305865/a305865_1.png">A scatterplot of a(n) + A318265(n) for n <= 3^10-1</a>
%F A305865 G.f. g(x) satisfies g(x) = -5*(1-x+x^2)*g(x^3) + (1+x+2*x^3-x^4)*x/(1-x^3)^2. - _Robert Israel_, Aug 24 2018
%p A305865 f:= proc(n) option remember;
%p A305865   if n mod 3 = 0 then -5*procname(n/3)
%p A305865   else n - procname(n-1)
%p A305865   fi
%p A305865 end proc:
%p A305865 f(1):= 1:
%p A305865 map(f, [$1..100]); # _Robert Israel_, Aug 24 2018
%o A305865 (PARI) a(n)=if(n==1, n, if(n%3==0, -5*a(n/3),n-a(n-1)));
%Y A305865 Cf. A318265.
%K A305865 sign,look
%O A305865 1,3
%A A305865 _Altug Alkan_, Aug 23 2018