login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A305865 a(1) = 1, a(n) = -5*a(n/3) if n is divisible by 3, otherwise a(n) = n - a(n-1). 4

%I #43 Aug 26 2018 12:23:12

%S 1,1,-5,9,-4,-5,12,-4,25,-15,26,-45,58,-44,20,-4,21,25,-6,26,-60,82,

%T -59,20,5,21,-125,153,-124,75,-44,76,-130,164,-129,225,-188,226,-290,

%U 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 a(1) = 1, a(n) = -5*a(n/3) if n is divisible by 3, otherwise a(n) = n - a(n-1).

%H Altug Alkan, <a href="/A305865/b305865.txt">Table of n, a(n) for n = 1..19682</a>

%H Altug Alkan, <a href="/A305865/a305865.png">A scatterplot of a(n) for n <= 3^10-1</a>

%H Altug Alkan, <a href="/A305865/a305865_1.png">A scatterplot of a(n) + A318265(n) for n <= 3^10-1</a>

%F 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 f:= proc(n) option remember;

%p if n mod 3 = 0 then -5*procname(n/3)

%p else n - procname(n-1)

%p fi

%p end proc:

%p f(1):= 1:

%p map(f, [$1..100]); # _Robert Israel_, Aug 24 2018

%o (PARI) a(n)=if(n==1, n, if(n%3==0, -5*a(n/3),n-a(n-1)));

%Y Cf. A318265.

%K sign,look

%O 1,3

%A _Altug Alkan_, Aug 23 2018

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 04:14 EDT 2024. Contains 371918 sequences. (Running on oeis4.)