OFFSET
0,3
COMMENTS
The composer Per Nørgård's name is also written in the OEIS as Per Noergaard.
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..65536
FORMULA
PROG
(PARI)
up_to = 65536;
A004718list(up_to) = { my(v=vector(up_to)); v[1]=1; v[2]=-1; for(n=3, up_to, v[n] = if(n%2, 1+v[n>>1], -v[n/2])); (v); }; \\ After code in A004718.
v004718 = A004718list(up_to);
A004718(n) = if(!n, n, v004718[n]);
A117967(n) = if(n<=1, n, if(!(n%3), 3*A117967(n/3), if(1==(n%3), 1+3*A117967((n-1)/3), 2+3*A117967((n+1)/3))));
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 10 2019
STATUS
approved