A318265 a(1) = 1, a(n) = 5*a(n/3) if n is divisible by 3, otherwise a(n) = n - a(n-1).
1, 1, 5, -1, 6, 5, 2, 6, 25, -15, 26, -5, 18, -4, 30, -14, 31, 25, -6, 26, 10, 12, 11, 30, -5, 31, 125, -97, 126, -75, 106, -74, 130, -96, 131, -25, 62, -24, 90, -50, 91, -20, 63, -19, 150, -104, 151, -70, 119, -69, 155, -103, 156, 125, -70, 126, -30, 88, -29, 130, -69, 131, 50, 14, 51, 60, 7, 61, 55, 15, 56, 150
Offset: 1
Links
- Antti Karttunen, Table of n, a(n) for n = 1..19682
- Altug Alkan, A scatterplot of a(n) for n <= 3^10-1
- Rémy Sigrist, A colored scatterplot of (A318265(n), A305865(n)) for n = 1..3^13-1 (color is function of n)
Programs
-
PARI
a(n)=if(n==1, n, if(n%3==0, 5*a(n/3),n-a(n-1)));
Comments