OFFSET
1,2
COMMENTS
Conjectures: 1) For prime p, the sequence taken modulo p is purely periodic with minimum period dividing 2*(p - 1). For example, taken modulo 5 the sequence becomes [1, 3, 2, 3, 4, 2, 3, 2, 1, 3, 2, 3, 4, 2, 3, 2, ...], which appears to be a purely periodic sequence of period 8.
2) For composite n, the sequence taken modulo n is eventually periodic. For example, taken modulo 24 the sequence becomes [1, 3, 17, 15, 1, 15, 17, 15, 1, 15, 17, 15, 1, 15, ...], apparently with pre-period 2 and period 4.
FORMULA
a(n) = Sum_{k = 0..n-1} 2^(k*(k+1)/2)*( Product_{j = k+1..n-1} 2^j - 1 ).
MAPLE
a := n -> add( 2^((1/2)*k*(k+1))*mul(2^j-1, j = k+1..n-1), k = 0..n-1 ):
seq(a(n), n = 1..20);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Peter Bala, Feb 16 2021
STATUS
approved