editing
proposed
editing
proposed
It appears that for n > 4: a(n) = 2*3^(n-1) + a(n-4), for . For n < 5: a(n) = 2*3^(n-1) + 1. Conjecture in closed form: a(n) = 2*ceiling(3^(n+3)/80) - 1.
editing
proposed
(PARI) a(n) = if(n<5, 2*3^(n-1)+1, 2*3^(n-1)+a(n-4));
proposed
editing
editing
proposed
1, 3, 7, 19, 55, 165, 493, 1477, 4429, 13287, 39859, 119575, 358723, 1076169, 3228505, 9685513, 29056537, 87169611, 261508831, 784526491, 2353579471, 7060738413, 21182215237, 63546645709, 190639937125, 571919811375, 1715759434123, 5147278302367, 15441834907099
nonn,more
(PARI) { a(n) = #setbinop((x, y)->Mod(x, 3^n)^4+Mod(y, 3^n)^4, [0..3^n-1]);
(PARI) { a(n) = if(n<5, 2*3^(n-1)+1, 2*3^(n-1)+a(n-4));
a(n) = 2*ceiling(3^(n+3)/80)-1. (Conjectured).
proposed
editing
editing
proposed
editing
proposed