A338852 a(n) = (7*floor(a(n-1)/3)) + (a(n-1) mod 3) with a(1) = 3.
3, 7, 15, 35, 79, 183, 427, 995, 2319, 5411, 12623, 29451, 68719, 160343, 374131, 872971, 2036931, 4752839, 11089955, 25876559, 60378635, 140883479, 328728115, 767032267, 1789741955, 4176064559, 9744150635, 22736351479, 53051486783
Offset: 1
Keywords
Examples
a(6) = 7*floor(79/3) + mod(79/3) = 183.
Links
- ARITH Project, 7/3 counter, Aoki lab., Tohoku University.
- HandWiki, Dadda Multiplier
- Stenzel, Kubitz and Garcia, A Compact High-Speed Parallel Multiplication Scheme, in IEEE Transactions on Computers, vol. C-26, no. 10, pp. 948-957, Oct. 1977, doi: 10.1109/TC.1977.1674730. See p. 137.
Crossrefs
Cf. A061418.
Programs
-
C
int a(int n) { int t1 = 3, nextTerm; for (int i = 2; i <= n; ++i) { nextTerm = 7*(t1/3) + t1%3; t1 = nextTerm; } return t1; }
-
Mathematica
NestList[7 Floor[#/3] + Mod[#, 3] &, 3, 28] (* Michael De Vlieger, Nov 12 2020 *)
-
PARI
a(n) = if (n==1, 3, my(x=divrem(a(n-1), 3)); 7*x[1] + x[2]); \\ Michel Marcus, Nov 12 2020
Comments