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-4 of 4 results.

A129629 Nonzero bisection of Moebius transform of A082392.

Original entry on oeis.org

1, 1, 3, 7, 14, 31, 63, 123, 255, 511, 1015, 2047, 4092, 8176, 16383, 32767, 65503, 131061, 262143, 524223, 1048575, 2097151, 4194162, 8388607, 16777208, 33554175, 67108863, 134217693, 268434943, 536870911, 1073741823
Offset: 1

Views

Author

Ralf Stephan, May 31 2007

Keywords

Comments

Possibly identical to A011947.

Programs

  • PARI
    A129629_upto(N=100)={ my( d=2*N+3, b=Vec( sum( k=0, exponent(d), (x^2^k)/(1-2*x^2^(k+1)),O(x^d)))); vector( N,i, sumdiv(i*2-1,k, moebius((i*2-1)/k)*b[k])) } \\  M. F. Hasler, May 03 2008, updated May 27 2025

Formula

a(n+1) = 2^n-A383182(n). - M. F. Hasler, May 03 2008; sequence number corrected by M. F. Hasler, May 27 2025

A220466 a((2*n-1)*2^p) = 4^p*(n-1) + 2^(p-1)*(1+2^p), p >= 0 and n >= 1.

Original entry on oeis.org

1, 3, 2, 10, 3, 7, 4, 36, 5, 11, 6, 26, 7, 15, 8, 136, 9, 19, 10, 42, 11, 23, 12, 100, 13, 27, 14, 58, 15, 31, 16, 528, 17, 35, 18, 74, 19, 39, 20, 164, 21, 43, 22, 90, 23, 47, 24, 392, 25, 51, 26, 106, 27, 55, 28, 228, 29, 59, 30, 122, 31, 63, 32, 2080, 33, 67, 34, 138, 35
Offset: 1

Views

Author

Johannes W. Meijer, Dec 24 2012

Keywords

Comments

The a(n) appeared in the analysis of A220002, a sequence related to the Catalan numbers.
The first Maple program makes use of a program by Peter Luschny for the calculation of the a(n) values. The second Maple program shows that this sequence has a beautiful internal structure, see the first formula, while the third Maple program makes optimal use of this internal structure for the fast calculation of a(n) values for large n.
The cross references lead to sequences that have the same internal structure as this sequence.

Crossrefs

Cf. A000027 (the natural numbers), A000120 (1's-counting sequence), A000265 (remove 2's from n), A001316 (Gould's sequence), A001511 (the ruler function), A003484 (Hurwitz-Radon numbers), A003602 (a fractal sequence), A006519 (highest power of 2 dividing n), A007814 (binary carry sequence), A010060 (Thue-Morse sequence), A014577 (dragon curve), A014707 (dragon curve), A025480 (nim-values), A026741, A035263 (first Feigenbaum symbolic sequence), A037227, A038712, A048460, A048896, A051176, A053381 (smooth nowhere-zero vector fields), A055975 (Gray code related), A059134, A060789, A060819, A065916, A082392, A085296, A086799, A088837, A089265, A090739, A091512, A091519, A096268, A100892, A103391, A105321 (a fractal sequence), A109168 (a continued fraction), A117973, A129760, A151930, A153733, A160467, A162728, A181988, A182241, A191488 (a companion to Gould's sequence), A193365, A220466 (this sequence).

Programs

  • Haskell
    -- Following Ralf Stephan's recurrence:
    import Data.List (transpose)
    a220466 n = a006519_list !! (n-1)
    a220466_list = 1 : concat
       (transpose [zipWith (-) (map (* 4) a220466_list) a006519_list, [2..]])
    -- Reinhard Zumkeller, Aug 31 2014
  • Maple
    # First Maple program
    a := n -> 2^padic[ordp](n, 2)*(n+1)/2 : seq(a(n), n=1..69); # Peter Luschny, Dec 24 2012
    # Second Maple program
    nmax:=69: for p from 0 to ceil(simplify(log[2](nmax))) do for n from 1 to ceil(nmax/(p+2)) do a((2*n-1)*2^p) := 4^p*(n-1)  + 2^(p-1)*(1+2^p) od: od: seq(a(n), n=1..nmax);
    # Third Maple program
    nmax:=69: for p from 0 to ceil(simplify(log[2](nmax))) do n:=2^p: n1:=1: while n <= nmax do a(n) := 4^p*(n1-1)+2^(p-1)*(1+2^p): n:=n+2^(p+1): n1:= n1+1: od: od:  seq(a(n), n=1..nmax);
  • Mathematica
    A220466 = Module[{n, p}, p = IntegerExponent[#, 2]; n = (#/2^p + 1)/2; 4^p*(n - 1) + 2^(p - 1)*(1 + 2^p)] &; Array[A220466, 50] (* JungHwan Min, Aug 22 2016 *)
  • PARI
    a(n)=if(n%2,n\2+1,4*a(n/2)-2^valuation(n/2,2)) \\ Ralf Stephan, Dec 17 2013
    

Formula

a((2*n-1)*2^p) = 4^p*(n-1) + 2^(p-1)*(1+2^p), p >= 0 and n >= 1. Observe that a(2^p) = A007582(p).
a(n) = ((n+1)/2)*(A060818(n)/A060818(n-1))
a(n) = (-1/64)*(q(n+1)/q(n))/(2*n+1) with q(n) = (-1)^(n+1)*2^(4*n-5)*(2*n)!*A060818(n-1) or q(n) = (1/8)*A220002(n-1)*1/(A098597(2*n-1)/A046161(2*n))*1/(A008991(n-1)/A008992(n-1))
Recurrence: a(2n) = 4a(n) - 2^A007814(n), a(2n+1) = n+1. - Ralf Stephan, Dec 17 2013

A337821 For n >= 0, a(4n+1) = 0, a(4n+3) = a(2n+1) + 1, a(2n+2) = a(n+1).

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 2, 0, 0, 0, 1, 1, 0, 2, 3, 0, 0, 0, 1, 0, 0, 1, 2, 1, 0, 0, 1, 2, 0, 3, 4, 0, 0, 0, 1, 0, 0, 1, 2, 0, 0, 0, 1, 1, 0, 2, 3, 1, 0, 0, 1, 0, 0, 1, 2, 2, 0, 0, 1, 3, 0, 4, 5, 0, 0, 0, 1, 0, 0, 1, 2, 0, 0, 0, 1, 1, 0, 2, 3, 0, 0, 0, 1, 0, 0, 1, 2, 1, 0, 0, 1, 2, 0, 3, 4, 1
Offset: 1

Views

Author

Peter Munn, Sep 23 2020

Keywords

Comments

This sequence is the ruler sequence A007814 interleaved with this sequence; specifically, the odd bisection is A007814, the even bisection is the sequence itself.
The 3-adic valuation of the Doudna sequence (A005940).
The 2-adic valuation of Kimberling's paraphrase (A003602) of the binary number system. [Edited Peter Munn, Aug 13 2025.]

Examples

			Start of table showing the interleaving with ruler sequence, A007814:
   n  a(n)  A007814    a(n/2)
            ((n+1)/2)
   1   0       0
   2   0                 0
   3   1       1
   4   0                 0
   5   0       0
   6   1                 1
   7   2       2
   8   0                 0
   9   0       0
  10   0                 0
  11   1       1
  12   1                 1
  13   0       0
  14   2                 2
  15   3       3
  16   0                 0
  17   0       0
  18   0                 0
  19   1       1
  20   0                 0
  21   0       0
  22   1                 1
  23   2       2
  24   1                 1
		

Crossrefs

Odd bisection: A007814.
A000265, A003602, A005940, A007949 are used in a formula defining this sequence.
Positions of zeros: A091072.
Sequences with similar interleaving: A089309, A014577, A025480, A034947, A038189, A082392, A099545, A181363, A274139.

Programs

  • Mathematica
    a[n_] := IntegerExponent[(n/2^IntegerExponent[n, 2] + 1)/2, 2]; Array[a, 100] (* Amiram Eldar, Sep 30 2020 *)
  • PARI
    a(n) = valuation(n>>valuation(n,2)+1, 2) - 1; \\ Kevin Ryde, Apr 06 2024

Formula

a(2*n) = a(n).
a(2*n+1) = A007814(n+1).
a(n) = A007949(A005940(n)).
a(n) = A007814(A003602(n)) = A007814((A000265(n)+1) / 2) = A089309(n) - 1.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1. - Amiram Eldar, Sep 13 2024

A274139 a(n) = 2^A000265(n) = 2^numerator(n/2^n), a sequence related to Oresme numbers.

Original entry on oeis.org

2, 2, 8, 2, 32, 8, 128, 2, 512, 32, 2048, 8, 8192, 128, 32768, 2, 131072, 512, 524288, 32, 2097152, 2048, 8388608, 8, 33554432, 8192, 134217728, 128, 536870912, 32768, 2147483648, 2, 8589934592, 131072, 34359738368, 512, 137438953472, 524288, 549755813888, 32
Offset: 1

Views

Author

Keywords

Comments

Differences: 0, 6, -6, 30, -24, 120, -126, 510, -480, 2016, -2040, 8184, -8064, 32640, -32766, 131070, -130560, ...
GCD of differences is 6.

Crossrefs

Programs

  • Mathematica
    a[n_] := 2^(n/2^IntegerExponent[n, 2]);
    Array[a, 40]
  • PARI
    a(n) = 2^(n/2^valuation(n,2)); \\ Michel Marcus, Jun 12 2016

Formula

a(n) = 2^denominator(2^n/n).
a(n) = 2^(n/2^valuation(n,2)) = 2^A007814(n).
a(n) = 2*A082392(n)^2 (conjecture).
Showing 1-4 of 4 results.