This site is supported by donations to The OEIS Foundation.

 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
 1, 1, -5, 9, -4, -5, 12, -4, 25, -15, 26, -45, 58, -44, 20, -4, 21, 25, -6, 26, -60, 82, -59, 20, 5, 21, -125, 153, -124, 75, -44, 76, -130, 164, -129, 225, -188, 226, -290, 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 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS Altug Alkan, Table of n, a(n) for n = 1..19682 Altug Alkan, A scatterplot of a(n) for n <= 3^10-1 Altug Alkan, A scatterplot of a(n) + A318265(n) for n <= 3^10-1 FORMULA 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 MAPLE f:= proc(n) option remember;   if n mod 3 = 0 then -5*procname(n/3)   else n - procname(n-1)   fi end proc: f(1):= 1: map(f, [\$1..100]); # Robert Israel, Aug 24 2018 PROG (PARI) a(n)=if(n==1, n, if(n%3==0, -5*a(n/3), n-a(n-1))); CROSSREFS Cf. A318265. Sequence in context: A198990 A153356 A129956 * A010774 A272610 A198748 Adjacent sequences:  A305862 A305863 A305864 * A305866 A305867 A305868 KEYWORD sign,look AUTHOR Altug Alkan, Aug 23 2018 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 October 20 17:50 EDT 2019. Contains 328268 sequences. (Running on oeis4.)