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.

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

A059127 A hierarchical sequence (W2{3} - see A059126).

Original entry on oeis.org

1, 2, 1, 3, 1, 2, 1, 4, 5, 4, 6, 4, 5, 4, 1, 2, 1, 3, 1, 2, 1, 7, 8, 7, 9, 7, 8, 7, 1, 2, 1, 3, 1, 2, 1, 4, 5, 4, 6, 4, 5, 4, 1, 2, 1, 3, 1, 2, 1, 10, 11, 10, 12, 10, 11, 10, 1, 2, 1, 3, 1, 2, 1, 4, 5, 4, 6, 4, 5, 4, 1, 2, 1, 3, 1, 2, 1, 7, 8, 7, 9, 7, 8, 7, 1, 2, 1, 3, 1, 2, 1, 4, 5, 4, 6, 4, 5, 4, 1, 2, 1
Offset: 0

Views

Author

Jonas Wallgren, Jan 19 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Block[{m = 3, i = 7, a}, a = IntegerExponent[2 Range@ i, 2]; Array[IntegerExponent[2 #, 2] /. k_ :> (a + m k - m) &, 15]] // Flatten (* Michael De Vlieger, Nov 02 2018 *)

Formula

a(7n+3) = 3*A001511(1+n), a(7n) = a(7n+2) = a(7n+4) = a(7n+6) = a(7n+3)-2, a(7n+1) = a(7n+5) = a(7n+3)-1. - Antti Karttunen, May 28 2017

A059132 A hierarchical sequence (W2{2}c - see A059126).

Original entry on oeis.org

4, 10, 4, 16, 4, 10, 4, 22, 4, 10, 4, 16, 4, 10, 4, 28, 4, 10, 4, 16, 4, 10, 4, 22, 4, 10, 4, 16, 4, 10, 4, 34, 4, 10, 4, 16, 4, 10, 4, 22, 4, 10, 4, 16, 4, 10, 4, 28, 4, 10, 4, 16, 4, 10, 4, 22, 4, 10, 4, 16, 4, 10, 4, 40, 4, 10, 4, 16, 4, 10, 4, 22, 4, 10, 4, 16, 4, 10, 4, 28, 4, 10, 4, 16
Offset: 0

Views

Author

Jonas Wallgren, Jan 19 2001

Keywords

Crossrefs

Programs

Formula

a(n) = 4 + 6*A007814(n+1). a(2n) = 4, a(2n+1) = a(n) + 6. - Ralf Stephan, Oct 09 2003. Typo in the first formula corrected by Antti Karttunen, Nov 01 2018
a(n) = A059126(3*n) + A059126(3*n+1) + A059126(3*n+2). - Sean A. Irvine, Sep 12 2022

A059139 A hierarchical sequence (W2{2}*c - see A059126).

Original entry on oeis.org

4, 7, 4, 10, 4, 7, 4, 13, 4, 7, 4, 10, 4, 7, 4, 16, 4, 7, 4, 10, 4, 7, 4, 13, 4, 7, 4, 10, 4, 7, 4, 19, 4, 7, 4, 10, 4, 7, 4, 13, 4, 7, 4, 10, 4, 7, 4, 16, 4, 7, 4, 10, 4, 7, 4, 13, 4, 7, 4, 10, 4, 7, 4, 22, 4, 7, 4, 10, 4, 7, 4, 13, 4, 7, 4, 10, 4, 7, 4, 16, 4, 7, 4, 10, 4, 7, 4, 13, 4, 7, 4, 10, 4
Offset: 0

Views

Author

Jonas Wallgren, Jan 19 2001

Keywords

Comments

Let the general sequence H(a,b,n) = a*A007814(n+1) + b, then this sequence is H(3,4). Other hierarchical sequences of this type are A059132 (H(6,4)), A059141 (H(7,11)), A059144 (H(9,15)), A059134 (H(21,11)), A059137 (H(36,18)).

Formula

a(n) = 4 + 3*A007814(n). a(2n) = 4, a(2n+1) = a(n) + 3. - Ralf Stephan, Oct 09 2003
Showing 1-4 of 4 results.