cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-5 of 5 results.

A214546 First differences of A140472.

Original entry on oeis.org

1, 1, 0, 2, -1, 1, 0, 4, -3, 1, 0, 2, -1, 1, 0, 8, -7, 1, 0, 2, -1, 1, 0, 4, -3, 1, 0, 2, -1, 1, 0, 16, -15, 1, 0, 2, -1, 1, 0, 4, -3, 1, 0, 2, -1, 1, 0, 8, -7, 1, 0, 2, -1, 1, 0, 4, -3, 1, 0, 2, -1, 1, 0, 32, -31, 1, 0, 2, -1, 1, 0, 4, -3, 1, 0, 2, -1, 1, 0
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 20 2012

Keywords

Comments

a(n) = A140472(n+1) - A140472(n);
a(A016825(n)) = 0; a(A042965(n)) <> 0;
for n > 0: a(A008586(n)) < 0, a(A005843(n)) <= 0, a(A042968(n)) >= 0;
a(A004273(n)) > 0.

Crossrefs

Cf. A093879.

Programs

  • Haskell
    a214546 n = a214546_list !! n
    a214546_list = zipWith (-) (tail a140472_list) a140472_list

A109168 Continued fraction expansion of the constant x (A109169) such that the continued fraction of 2*x yields the continued fraction of x interleaved with the positive even numbers.

Original entry on oeis.org

1, 2, 2, 4, 3, 4, 4, 8, 5, 6, 6, 8, 7, 8, 8, 16, 9, 10, 10, 12, 11, 12, 12, 16, 13, 14, 14, 16, 15, 16, 16, 32, 17, 18, 18, 20, 19, 20, 20, 24, 21, 22, 22, 24, 23, 24, 24, 32, 25, 26, 26, 28, 27, 28, 28, 32, 29, 30, 30, 32, 31, 32, 32, 64, 33, 34, 34, 36, 35, 36, 36, 40, 37, 38, 38
Offset: 1

Views

Author

Paul D. Hanna, Jun 21 2005

Keywords

Comments

Compare with continued fraction A100338.
The sequence is equal to the sequence of positive integers (1, 2, 3, 4, ...) interleaved with the sequence multiplied by two, 2*(1, 2, 2, 4, 3, ...) = (2, 4, 4, 8, 6, ...): see the first formula. - M. F. Hasler, Oct 19 2019

Examples

			x=1.408494279228906985748474279080697991613998955782051281466263817524862977...
The continued fraction expansion of 2*x = A109170:
[2;1, 4,2, 6,2, 8,4, 10,3, 12,4, 14,4, 16,8, 18,5, ...]
which equals the continued fraction of x interleaved with the even numbers.
		

Crossrefs

Cf. A109169 (digits of x), A109170 (continued fraction of 2*x), A109171 (digits of 2*x).
Cf. A006519 and A129760. [Johannes W. Meijer, Jun 22 2011]
Half the terms of A285326.

Programs

  • Maple
    nmax:=75; pmax:= ceil(log(nmax)/log(2)); for p from 0 to pmax do for n from 1 to nmax do a((2*n-1)*2^p):= n*2^p: od: od: seq(a(n), n=1..nmax); # Johannes W. Meijer, Jun 22 2011
  • PARI
    a(n)=if(n%2==1,(n+1)/2,2*a(n/2))
    
  • PARI
    A109168(n)=(n+bitand(n,-n))\2 \\ M. F. Hasler, Oct 19 2019
  • Scheme
    ;; With memoization-macro definec
    (definec (A109168 n) (if (zero? n) n (if (odd? n) (/ (+ 1 n) 2) (* 2 (A109168 (/ n 2))))))
    ;; Antti Karttunen, Apr 19 2017
    

Formula

a(2*n-1) = n, a(2*n) = 2*a(n) for all n >= 1.
a((2*n-1)*2^p) = n * 2^p, p >= 0. - Johannes W. Meijer, Jun 22 2011
a(n) = n - (n AND n-1)/2. - Gary Detlefs, Jul 10 2014
a(n) = A285326(n)/2. - Antti Karttunen, Apr 19 2017
a(n) = A140472(n). - M. F. Hasler, Oct 19 2019

A328203 Expansion of Sum_{k>=1} k * x^k / (1 - x^(2*k))^2.

Original entry on oeis.org

1, 2, 5, 4, 8, 10, 11, 8, 20, 16, 17, 20, 20, 22, 42, 16, 26, 40, 29, 32, 58, 34, 35, 40, 53, 40, 74, 44, 44, 84, 47, 32, 90, 52, 94, 80, 56, 58, 106, 64, 62, 116, 65, 68, 174, 70, 71, 80, 102, 106, 138, 80, 80, 148, 146, 88, 154, 88, 89, 168, 92, 94, 241, 64, 172
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 07 2019

Keywords

Crossrefs

Programs

  • Magma
    a:=[]; for k in [1..65] do if IsOdd(k) then a[k]:=(k * #Divisors(k) + DivisorSigma(1,k)) / 2; else a[k]:=(k * (#Divisors(k) - #Divisors(k div 2)) + DivisorSigma(1,k) - DivisorSigma(1,k div 2)) / 2;  end if; end for; a; // Marius A. Burtea, Oct 07 2019
    
  • Mathematica
    nmax = 65; CoefficientList[Series[Sum[k x^k/(1 - x^(2 k))^2, {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    a[n_] := DivisorSum[n, (n Mod[#, 2] + Boole[OddQ[n/#]] #)/2 &]; Table[a[n], {n, 1, 65}]
  • PARI
    A328203(n) = if(n%2,(1/2)*(sigma(n)+(n*numdiv(n))),2*A328203(n/2)); \\ Antti Karttunen, Nov 13 2021

Formula

a(n) = (n * d(n) + sigma(n)) / 2 if n odd, (n * (d(n) - d(n/2)) + sigma(n) - sigma(n/2)) / 2 if n even.
a(n) = (n * A001227(n) + A002131(n)) / 2.
a(2*n) = 2 * a(n).
From Antti Karttunen, Nov 13 2021: (Start)
The following two convolutions were found by Jon Maiga's Sequence Machine search algorithm. Both are easy to prove:
a(n) = Sum_{d|n} A003602(d) * A026741(n/d).
a(n) = Sum_{d|n} A109168(d) * A193356(n/d), where A109168(d) = A140472(d) = (d+A006519(d))/2.
(End)

A349344 Dirichlet inverse of A109168, where A109168(n) = (n+A006519(n))/2, and A006519 is the highest power of 2 dividing n.

Original entry on oeis.org

1, -2, -2, 0, -3, 4, -4, 0, -1, 6, -6, 0, -7, 8, 4, 0, -9, 2, -10, 0, 5, 12, -12, 0, -4, 14, -2, 0, -15, -8, -16, 0, 7, 18, 6, 0, -19, 20, 8, 0, -21, -10, -22, 0, 3, 24, -24, 0, -9, 8, 10, 0, -27, 4, 8, 0, 11, 30, -30, 0, -31, 32, 4, 0, 9, -14, -34, 0, 13, -12, -36, 0, -37, 38, 8, 0, 9, -16, -40, 0, -4, 42, -42, 0
Offset: 1

Views

Author

Antti Karttunen, Nov 15 2021

Keywords

Crossrefs

Programs

  • PARI
    up_to = 20000;
    DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(dA109168(n) = ((n+bitand(n, -n))\2); \\ From A109168 by M. F. Hasler, Oct 19 2019 (Cf. A140472).
    v349344 = DirInverseCorrect(vector(up_to,n,A109168(n)));
    A349344(n) = v349344[n];

Formula

a(1) = 1; a(n) = -Sum_{d|n, d < n} A109168(n/d) * a(d).
a(n) = A349345(n) - A109168(n).

A285326 a(0) = 0, for n > 0, a(n) = n + A006519(n).

Original entry on oeis.org

0, 2, 4, 4, 8, 6, 8, 8, 16, 10, 12, 12, 16, 14, 16, 16, 32, 18, 20, 20, 24, 22, 24, 24, 32, 26, 28, 28, 32, 30, 32, 32, 64, 34, 36, 36, 40, 38, 40, 40, 48, 42, 44, 44, 48, 46, 48, 48, 64, 50, 52, 52, 56, 54, 56, 56, 64, 58, 60, 60, 64, 62, 64, 64, 128, 66, 68, 68, 72, 70, 72, 72, 80, 74, 76, 76, 80, 78, 80, 80, 96, 82, 84, 84, 88, 86, 88, 88, 96, 90, 92, 92
Offset: 0

Views

Author

Antti Karttunen, Apr 19 2017

Keywords

Comments

From M. F. Hasler, Oct 19 2019: (Start)
This sequence is equal to itself multiplied by 2 and interleaved with the positive even numbers: We have a(2n-1) = 2n (n >= 1) from the very definition, since A006519(m) = 1 for odd m. And a(2n) = 2n + A006519(2n) = 2*a(n), using A006519(2n) = 2*A006519(n).
The sequence repeats the pattern [A, B, C, C] where in the n-th occurrence C = 4n, B = C - 2, A = C if n is even, A = C + 4 if n = 3 (mod 4), and A = 16*a((n-1)/4) otherwise. (End)

Crossrefs

Row 2 of A285325 (after the initial zero).
Cf. A109168 (same terms divided by 2), also A140472.

Programs

Formula

a(0) = 0; for n > 0, a(n) = n + A006519(n).
For n >= 1, a(n) = 2*A109168(n).
a(n) = 2*A140472(n) and a(2n) = 2*a(n) and a(2^n) = 2^(n+1) for all n >= 0, a(2n-1) = 2n for all n >= 1. - M. F. Hasler, Oct 19 2019
Showing 1-5 of 5 results.