OFFSET
1,2
COMMENTS
Conjectures:
1) The sequence taken modulo n becomes periodic with a pre-period of length either 0 or 1, and with the minimum period dividing phi(n). For example, taken modulo 21 the sequence becomes [1, 5, 7, 8, 19, 14, 1, 5, 7, 8, 19, 14, ...], apparently a purely periodic sequence of period 6.
2) If n and m are coprime then the period of the sequence taken modulo n*m equals the l.c.m. of the periods of the sequence taken modulo n and taken modulo m.
FORMULA
a(n) = Sum_{k = 0..n-1} 2^(k^2) * ( Product_{j = k+1..n-1} 2^(2*j) - 1 ).
MAPLE
a := n -> add( 2^(k^2)*mul(2^(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