OFFSET
1,2
COMMENTS
For n>4, a(n) = (a(n-1) + a(n-2) + a(n-3) + a(n-4)) / 2^d, where 2^d is the largest power of 2 dividing a(n-1) + a(n-2) + a(n-3) + a(n-4). In other words, sum the previous four terms, then divide by two until the result is odd.
REFERENCES
Alm, Herald, Miller, and Sexton, 2-Free Tetranacci Sequences, unpublished.
LINKS
Jeremy F. Alm, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = (a(n-1) + a(n-2) + a(n-3) + a(n-4)) / 2^d, where 2^d is the largest power of 2 dividing a(n-1) + a(n-2) + a(n-3) + a(n-4).
a(n) = A000265(a(n-1) + a(n-2) + a(n-3) + a(n-4)). - Michel Marcus, Dec 29 2015
MATHEMATICA
nxt[{a_, b_, c_, d_}] := {b, c, d, (a + b + c + d)/2^IntegerExponent[ a + b + c + d, 2]}; NestList[nxt, {1, 3, 5, 7}, 60][[All, 1]] (* Harvey P. Dale, Nov 09 2020 *)
PROG
(Python)
### CREATES A b-FILE ###
def main():
name = "b266295.txt"
file = open(name, 'w')
file.write('1' + ' ' + '1\n')
file.write('2' + ' ' + '3\n')
file.write('3' + ' ' + '5\n')
file.write('4' + ' ' + '7\n')
a, b, c, d = 1, 3, 5, 7
for i in range(5, 10001):
x=a+b+c+d
while x%2==0:
x /= 2
a, b, c, d = b, c, d, x
file.write(str(i) + ' ' + str(int(d)) + '\n')
file.close()
main()
(PARI) lista(nn) = {print1(x = 1, ", "); print1(y = 3, ", "); print1(z = 5, ", "); print1(t = 7, ", "); for (n=5, nn, tt = (x+y+z+t); tt /= 2^valuation(tt, 2); print1(tt, ", "); x=y; y=z; z=t; t=tt; ); } \\ Michel Marcus, Dec 29 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Jeremy F. Alm, Dec 28 2015
STATUS
approved