Search: a021070 -id:a021070
|
|
A040001
|
|
1 followed by {1, 2} repeated.
|
|
+10
54
|
|
|
1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Continued fraction for sqrt(3).
Also coefficient of the highest power of q in the expansion of the polynomial nu(n) defined by: nu(0)=1, nu(1)=b and for n>=2, nu(n)=b*nu(n-1)+lambda*(n-1)_q*nu(n-2) with (b,lambda)=(1,1), where (n)_q=(1+q+...+q^(n-1)) and q is a root of unity. - Y. Kelly Itakura (yitkr(AT)mta.ca), Aug 21 2002
nu(0)=1 nu(1)=1; nu(2)=2; nu(3)=3+q; nu(4)=5+3q+2q^2; nu(5)=8+7q+6q^2+4q^3+q^4; nu(6)=13+15q+16q^2+14q^3+11q^4+5q^5+2q^6.
a(n) = denominators of arithmetic means of the first n positive integers for n >= 1.
See A026741(n+1) or A145051(n) - denominators of arithmetic means of the first n positive integers. (End)
This is a prototype of multiplicative sequences defined by a(p^e)=1 for odd primes p, and a(2^e)=c with some constant c, here c=2. They have Dirichlet generating functions (1+(c-1)/2^s)*zeta(s).
Examples are A153284, A176040 (c=3), A040005 (c=4), A021070, A176260 (c=5), A040011, A176355 (c=6), A176415 (c=7), A040019, A021059 (c=8), A040029 (c=10), A040041 (c=12). (End)
a(n) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = A000325(k) for k = 0, 1, ..., n. - Michael Somos, May 12 2012
For n > 0, a(n) is the minimal gap of distinct numbers coprime to n. Proof: denote the minimal gap by b(n). For odd n we have A058026(n) > 0, hence b(n) = 1. For even n, since 1 and -1 are both coprime to n we have b(n) <= 2, and that b(n) >= 2 is obvious.
The maximal gap is given by A048669. (End)
|
|
LINKS
|
|
|
FORMULA
|
Multiplicative with a(p^e) = 2 if p even; 1 if p odd. - David W. Wilson, Aug 01 2001
G.f.: (1 + x + x^2) / (1 - x^2). E.g.f.: (3*exp(x)-2*exp(0)+exp(-x))/2. - Paul Barry, Apr 27 2003
a(n) = (3-2*0^n +(-1)^n)/2. a(-n)=a(n). a(2n+1)=1, a(2n)=2, n nonzero.
a(n) = sum{k=0..n, F(n-k+1)*(-2+(1+(-1)^k)/2+C(2, k)+0^k)}. - Paul Barry, Jun 22 2007
Euler transform of length 3 sequence [ 1, 1, -1]. - Michael Somos, Aug 04 2009
Moebius transform is length 2 sequence [ 1, 1]. - Michael Somos, Aug 04 2009
a(n) = sign(n) + ((n+1) mod 2) = 1 + sign(n) - (n mod 2). - Wesley Ivan Hurt, Dec 13 2013
|
|
EXAMPLE
|
1.732050807568877293527446341... = 1 + 1/(1 + 1/(2 + 1/(1 + 1/(2 + ...))))
G.f. = 1 + x + 2*x^2 + x^3 + 2*x^4 + x^5 + 2*x^6 + x^7 + 2*x^8 + x^9 + ...
|
|
MAPLE
|
Digits := 100: convert(evalf(sqrt(N)), confrac, 90, 'cvgts'):
|
|
MATHEMATICA
|
|
|
PROG
|
(PARI) {a(n) = 2 - (n==0) - (n%2)} /* Michael Somos, Jun 11 2003 */
(PARI) { allocatemem(932245000); default(realprecision, 12000); x=contfrac(sqrt(3)); for (n=0, 20000, write("b040001.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 01 2009
(Haskell)
a040001 0 = 1; a040001 n = 2 - mod n 2
|
|
CROSSREFS
|
Apart from a(0) the same as A134451.
|
|
KEYWORD
|
nonn,cofr,easy,mult,frac
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
Search completed in 0.003 seconds
|