OFFSET
1,1
COMMENTS
The maximum number of nonzero terms is p+q; all powers of x of the form k*p and l*q for k=0..q-1 and l=1..p. The even terms of this sequence are twice the Mersenne primes: 2*3, 2*7, 2*31, 2*127, 2*8191,... Similarly, for terms divisible by 3, the other prime factor has the form 2*3^k-1. Note that A007012 gives the number of nonzero terms in the polynomial (1+x)^n (mod n).
EXAMPLE
15 is here because (1+x)^15 (mod 15) = 1+5x^3+3x^5+10x^6+10x^9+3x^10+5x^12+x^15 has 3+5 nonzero terms.
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Feb 26 2006
STATUS
approved