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-10 of 14 results. Next

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

A090129 Smallest exponent such that -1 + 3^a(n) is divisible by 2^n.

Original entry on oeis.org

1, 2, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592, 17179869184
Offset: 1

Views

Author

Labos Elemer and Ralf Stephan, Jan 19 2004

Keywords

Comments

A131577 and A011782 are companions, A131577(n) + A011782(n) = 2^n, (and differences each other). - Paul Curtz, Jan 18 2009
A090127 with offset 0: (1, 2, 2, 4, 8, ...) = A(x) / A(x^2), when A(x) = (1 + 2x + 4x^2 + 8x^3 + ...). - Gary W. Adamson, Feb 20 2010
From Wolfdieter Lang, Apr 18 2012: (Start)
a(n) is the order of 3 modulo 2^n. For n=1 and 2 this is obviously 1 and 2, respectively, and for n >= 3 it is 2^(n-2).
For a proof see, e.g., the Graeme McRae link under A068531, the section 'A Different Approach', proposed by Alexander Monnas, the first part, where the result from the expansion of (4-1)^(2^(k-2)) holds only for k >= 3. See also the Charles R Greathouse IV program below where this result has been used.
This means that the cycle generated by 3, taken modulo 2^n, has length a(n), and that 3 is not a primitive root modulo 2^n, if n >= 3 (because Euler's phi(2^n) = 2^(n-1), n >= 1, see A000010).
(End)
Let r(x) = (1 + 2x + 2x^2 + 4x^3 + ...). Then (1 + 2x + 4x^2 + 8x^3 + ...) = (r(x) * r(x^2) * r(x)^4 * r(x^8) * ...). - Gary W. Adamson, Sep 13 2016

Examples

			a(1) = 1 since -1 + 3 = 2 is divisible by 2^1;
a(2) = a(3) = 2 since -1 + 9 = 8 is divisible by 4 = 2^2 and also by 8 = 2^3;
a(5) = 8 since -1 + 6561 = 6560 = 32*205 is divisible by 2^5.
From _Wolfdieter Lang_, Apr 18 2012: (Start)
n=3: the order of 3 (mod 8) is a(3)=2 because the cycle generated by 3 is [3, 3^2==1 (mod 8)].
n=5: a(5) = 2^3 = 8 because the cycle generated by 3 is [3^1=3, 3^2=9, 3^3=27, 17, 19, 25, 11, 1] (mod 32).
  The multiplicative group mod 32 is non-cyclic (see A033949(10)) with the additional four cycles  [5, 25, 29, 17, 21, 9, 13, 1], [7, 17, 23, 1], [15, 1], and [31, 1]. This is the cycle structure of the (Abelian) group Z_8 x Z_2 (see one of the cycle graphs shown in the Wikipedia link 'List of small groups' for the order phi(32)=16, given under A192005).
(End)
		

Crossrefs

Essentially the same as A000079.

Programs

  • Mathematica
    t=Table[Part[Flatten[FactorInteger[ -1+3^(n)]], 2], {n, 1, 130}] Table[Min[Flatten[Position[t, j]]], {j, 1, 10}]
    Join[{1,2},2^Range[30]] (* or *) Join[{1,2},NestList[2#&,2,30]] (* Harvey P. Dale, Nov 08 2012 *)
  • PARI
    a(n)=2^(n+(n<3)-2) \\ Charles R Greathouse IV, Apr 09 2012
    
  • Python
    def A090129(n): return n if n<3 else 1<Chai Wah Wu, Jul 11 2022

Formula

a(n) = 2^(n-2) if n >= 3, 1 for n=1 and 2 for n=2 (see the order comment above).
a(n+2) = A152046(n) + A152046(n+1) = 2*A011782(n). - Paul Curtz, Jan 18 2009

Extensions

a(11) through a(20) from R. J. Mathar, Aug 08 2008
More terms (powers of 2, see a comment above) from Wolfdieter Lang, Apr 18 2012

A090740 Exponent of 2 in 3^n - 1.

Original entry on oeis.org

1, 3, 1, 4, 1, 3, 1, 5, 1, 3, 1, 4, 1, 3, 1, 6, 1, 3, 1, 4, 1, 3, 1, 5, 1, 3, 1, 4, 1, 3, 1, 7, 1, 3, 1, 4, 1, 3, 1, 5, 1, 3, 1, 4, 1, 3, 1, 6, 1, 3, 1, 4, 1, 3, 1, 5, 1, 3, 1, 4, 1, 3, 1, 8, 1, 3, 1, 4, 1, 3, 1, 5, 1, 3, 1, 4, 1, 3, 1, 6, 1, 3, 1, 4, 1, 3, 1, 5, 1, 3, 1, 4, 1, 3, 1, 7, 1, 3, 1, 4, 1, 3, 1, 5, 1
Offset: 1

Views

Author

Labos Elemer and Ralf Stephan, Jan 19 2004

Keywords

Comments

Also the 2-adic order of Fibonacci(3n) [Lengyel]. - R. J. Mathar, Nov 05 2008

Examples

			n=2: 3^2 - 1 = 8 = 2^3 so a(2)=3.
		

Crossrefs

Programs

  • Maple
    seq(padic:-ordp(3^n-1, 2), n=1..100); # Robert Israel, Dec 28 2015
  • Mathematica
    Table[Part[Flatten[FactorInteger[ -1+3^n]], 2], {n, 1, 70}]
    IntegerExponent[#,2]&/@(3^Range[110]-1) (* Harvey P. Dale, Jan 28 2017 *)
  • PARI
    a(n)=if(n<1,0,if(n%2==0,a(n/2)+1+(n/2)%2,1)) /* Ralf Stephan, Jan 23 2004 */
    
  • PARI
    a(n)=valuation(fibonacci(3*n),2); \\ Joerg Arndt, Oct 28 2012
    
  • PARI
    a(n)=my(t=valuation(n,2)); if(t,t+2,1) \\ Charles R Greathouse IV, Mar 14 2014
    
  • Python
    def A090740(n): return (n&-n).bit_length()+int(not n&1) # Chai Wah Wu, Jul 11 2022

Formula

a(n) = A007814(n) + A059841(n) + 1.
Multiplicative with a(p^e) = e+2 if p = 2; 1 if p > 2. G.f.: A(x) = 1/(1-x^2) + Sum_{k>=0} x^(2^k)/(1-x^(2^k)). - Vladeta Jovovic, Jan 19 2004
G.f.: Sum_{k>=0} t*(1+2*t+t^2+t^3)/(1-t^4) with t=x^2^k. Recurrence: a(2n) = a(n) + 1 + [n odd], a(2n+1) = 1. - Ralf Stephan, Jan 23 2004
a(n) = A337923(3*n). [Lengyel]. - R. J. Mathar, Nov 05 2008
G.f. A(x) satisfies A(x) = A(x^2) + x/(1-x) + x^2/(1-x^4). - Robert Israel, Dec 28 2015
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 5/2. - Amiram Eldar, Nov 28 2022
Dirichlet g.f.: zeta(s)*(2^s+1-1/2^s)/(2^s-1). - Amiram Eldar, Jan 04 2023

A061549 Denominator of probability that there is no error when average of n numbers is computed, assuming errors of +1, -1 are possible and they each occur with p=1/4.

Original entry on oeis.org

1, 8, 128, 1024, 32768, 262144, 4194304, 33554432, 2147483648, 17179869184, 274877906944, 2199023255552, 70368744177664, 562949953421312, 9007199254740992, 72057594037927936, 9223372036854775808, 73786976294838206464, 1180591620717411303424, 9444732965739290427392
Offset: 0

Views

Author

Leah Schmelzer (leah2002(AT)mit.edu), May 16 2001

Keywords

Comments

We observe that b(n) = log(a(n))/log(2) = A120738(n). Furthermore c(n+1) = b(n+1)-b(n) = A090739(n+1) and c(n+1)-3 = A007814(n+1) for n>=0. - Johannes W. Meijer, Jul 06 2009
Using WolframAlpha, it appears that 2*a(n) gives the coefficients of Pi in the denominators of the residues of f(z) = 2z choose z at odd negative half integers. E.g., the residues of f(z) at z = -1/2, -3/2, -5/2 are 1/(2*Pi), 1/(16*Pi), and 3/(256*Pi) respectively. - Nicholas Juricic, Mar 31 2022

Examples

			For n=1, the binomial(2*n-1/2, -1/2) yields the term 3/8. The denominator of this term is 8, which is the second term of the sequence.
		

Crossrefs

Bisection of A046161.
Appears in A162448.

Programs

  • Magma
    A061549:= func< n | 2^(4*n-(&+Intseq(2*n, 2))) >;
    [A061549(n): n in [0..30]]; // G. C. Greubel, Oct 20 2024
  • Maple
    seq(denom(binomial(2*n-1/2, -1/2)), n=0..20);
  • Mathematica
    Table[Denominator[(4*n)!/(2^(4*n)*(2*n)!^2) ], {n, 0, 20}] (* Indranil Ghosh, Mar 11 2017 *)
  • PARI
    for(n=0, 20, print1(denominator((4*n)!/(2^(4*n)*(2*n)!^2)),", ")) \\ Indranil Ghosh, Mar 11 2017
    
  • Python
    import math
    f = math.factorial
    def A061549(n): return (2**(4*n)*f(2*n)**2) // math.gcd(f(4*n), (2**(4*n)*f(2*n)**2)) # Indranil Ghosh, Mar 11 2017
    
  • Sage
    # uses[A000120]
    def a(n): return 1 << (4*n - A000120(n))
    [a(n) for n in (0..19)]  # Peter Luschny, Dec 02 2012
    

Formula

a(n) = denominator of binomial(2*n-1/2, -1/2).
a(n) are denominators of coefficients of 1/(sqrt(1+x)-sqrt(1-x)) power series. - Benoit Cloitre, Mar 12 2002
a(n) = 16^n/A001316(n). - Paul Barry, Jun 29 2006
a(n) = denom((4*n)!/(2^(4*n)*(2*n)!^2)). - Johannes W. Meijer, Jul 06 2009
a(n) = abs(A067624(n)/A117972(n)). - Johannes W. Meijer, Jul 06 2009

Extensions

More terms from Asher Auel, May 20 2001

A091512 a(n) is the largest integer m such that 2^m divides (2*n)^n, i.e., the exponent of 2 in (2*n)^n.

Original entry on oeis.org

1, 4, 3, 12, 5, 12, 7, 32, 9, 20, 11, 36, 13, 28, 15, 80, 17, 36, 19, 60, 21, 44, 23, 96, 25, 52, 27, 84, 29, 60, 31, 192, 33, 68, 35, 108, 37, 76, 39, 160, 41, 84, 43, 132, 45, 92, 47, 240, 49, 100, 51, 156, 53, 108, 55, 224, 57, 116, 59, 180, 61, 124, 63
Offset: 1

Views

Author

Ralf Stephan and Labos Elemer, Jan 18 2004

Keywords

Comments

n times one more than the trailing 0's in the binary representation of n. - Ralf Stephan, Aug 22 2013

Crossrefs

Programs

  • Magma
    [n*(Valuation(n, 2)+1): n in [1..80]]; // Vincenzo Librandi, May 16 2013
    
  • Maple
    nmax:=63: 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) := (2*n-1)*(p+1)*2^p od: od: seq(a(n), n=1..nmax); # Johannes W. Meijer, Feb 08 2013
    # second Maple program:
    a:= n-> n*padic[ordp](2*n, 2):
    seq(a(n), n=1..63);  # Alois P. Heinz, Jan 02 2024
  • Mathematica
    Table[ Part[ Flatten[ FactorInteger[(2 n)^n]], 2], {n, 1, 124}]
    Table[IntegerExponent[(2n)^n,2],{n,70}] (* Harvey P. Dale, Sep 11 2015 *)
  • PARI
    a(n)=n*(valuation(n,2)+1)
    
  • PARI
    a(n)=if(n<1,0,if(n%2==0,2*a(n/2)+n,n))
    
  • Python
    def A091512(n): return n*(n&-n).bit_length() # Chai Wah Wu, Jul 11 2022

Formula

a(n) = A007814(A000312(n)) = n*A001511(n) = A069895(n)/2.
G.f.: Sum_{k>=0} 2^k*x^2^k/(1-x^2^k)^2.
Recurrence: a(0) = 0, a(2*n) = 2*a(n) + 2*n, a(2*n+1) = 2*n+1.
Dirichlet g.f.: zeta(s-1)*2^s/(2^s-2). - Ralf Stephan, Jun 17 2007
Mobius transform of A162728, where x/(1-x)^2 = Sum_{n>=1} A162728(n)*x^n/(1+x^n). - Paul D. Hanna, Jul 12 2009
a(n) = A162728(2*n)/phi(2*n), where x/(1-x)^2 = Sum_{n>=1} A162728(n)*x^n/(1+x^n). - Paul D. Hanna, Jul 12 2009
a((2*n-1)*2^p) = (2*n-1)*(p+1)*2^p, p >= 0. Observe that a(2^p) = A001787(p+1). - Johannes W. Meijer, Feb 08 2013
Sum_{k=1..n} a(k) ~ n^2. - Amiram Eldar, Oct 22 2022
a(n) = Sum_{d divides n} d*A048298(n/d); that is, a(n) is the Dirichlet product of A048298(n) and A000027(n). - Peter Bala, Jan 02 2024

A120738 a(n) = 4*n - A000120(n).

Original entry on oeis.org

0, 3, 7, 10, 15, 18, 22, 25, 31, 34, 38, 41, 46, 49, 53, 56, 63, 66, 70, 73, 78, 81, 85, 88, 94, 97, 101, 104, 109, 112, 116, 119, 127, 130, 134, 137, 142, 145, 149, 152, 158, 161, 165, 168, 173, 176, 180, 183, 190, 193, 197, 200, 205, 208, 212, 215, 221, 224, 228
Offset: 0

Views

Author

Paul Barry, Jun 29 2006

Keywords

Comments

Partial sums of A090739.
a(n) is also the increasing sequence of exponents of x in Product_{k > 1} (1 + x^(2^k - 1)). - Paul Pearson (ppearson(AT)rochester.edu), Aug 06 2008
Related to partial sums of the Ruler sequence A001511 by a(n) = A005187(2n), therefore {a(n)+1} are the indices of 1's in A252488. - M. F. Hasler, Jan 22 2015

Crossrefs

Programs

  • Magma
    A120738:= func< n | 4*n-(&+Intseq(n, 2)) >;
    [A120738(n): n in [0..100]]; // G. C. Greubel, Oct 20 2024
  • Maple
    a:=n->simplify(log[2](16^n/(add(modp(binomial(n,k),2),k=0..n))));
    a:=n->simplify(log[2](16^n/(2^(n-(padic[ordp](n!,2)))))); # Note: n-(padic[ordp](n!,2)) is the number of 1's in the binary expansion of n. - Paul Pearson (ppearson(AT)rochester.edu), Aug 06 2008
  • Mathematica
    Table[4 n - DigitCount[n, 2, 1], {n, 0, 58}] (* Michael De Vlieger, Nov 06 2016 *)
  • PARI
    {a(n) = if( n < 0, 0, 4*n - subst( Pol( binary( n ) ), x, 1) ) } /* Michael Somos, Aug 28 2007 */
    
  • PARI
    a(n) = 4*n - hammingweight(n); \\ Michel Marcus, Nov 06 2016
    
  • Python
    # Python 3.10
    def A120738(n): return (n<<2)-n.bit_count() # Chai Wah Wu, Jul 12 2022
    
  • Sage
    A120738 = lambda n: 4*n - sum(n.digits(2))
    print([A120738(n) for n in (0..58)]) # Peter Luschny, Nov 06 2016
    

Formula

a(n) = log_2(16^n/A001316(n)). [This was the original definition.]
a(n) = 2n + A005187(n).
a(n) = 3n + A011371(n).
a(n) = 4n - log_2(A001316(n)).
a(n) = log_2(A061549(n)).
2^a(n) = 16^n/A001316(n) = A061549(n).
a(n) = A086343(n) + A001511(n) for n>0. - Alford Arnold, Mar 23 2009
2^a(n) = abs(A067624(n)/A117972(n)). - Johannes W. Meijer, Jul 06 2009
a(n) = Sum_{k>=0} (A030308(n,k)*A000225(k+2)). - Philippe Deléham, Oct 16 2011
a(n) = A005187(2n). - M. F. Hasler, Jan 22 2015

Extensions

Definition simplified by M. F. Hasler, Dec 29 2012

A161737 Numerators of the column sums of the BG2 matrix.

Original entry on oeis.org

1, 2, 16, 128, 2048, 32768, 262144, 2097152, 67108864, 2147483648, 17179869184, 137438953472, 2199023255552, 35184372088832, 281474976710656, 2251799813685248, 144115188075855872, 9223372036854775808, 73786976294838206464, 590295810358705651712, 9444732965739290427392
Offset: 1

Views

Author

Johannes W. Meijer, Jun 18 2009

Keywords

Comments

For the definition of the BG2 matrix coefficients see A161736.

Examples

			sb(1) = 1; sb(2) = 2; sb(3) = 16/9; sb(4) = 128/75; sb(5) = 2048/1225; etc..
		

Crossrefs

Programs

  • Magma
    [Numerator((2^(4*n-5)*(Factorial(n-1))^4)/((n-1)*(Factorial(2*n-2))^2)): n in [2..20]]; // G. C. Greubel, Sep 26 2018
  • Maple
    nmax := 18; x(1):=0: x(2):=1: for n from 2 to nmax-1 do x(n+1) := A050605(n-2) + x(n) + 3 od: for n from 1 to nmax do a(n) := 2^x(n) od: seq(a(n), n=1..nmax); # End program 1
    nmax1 := 20; for n from 0 to nmax1 do y(2*n+1) := A090739(n); y(2*n) := A090739(n) od: z(1) := 0: z(2) := 1: for n from 3 to nmax1 do z(n) := z(n-1) + y(n-1) od: for n from 1 to nmax1 do a(n) := 2^z(n) od: seq(a(n), n=1..nmax1); # End program 2
    # Above Maple programs edited by Johannes W. Meijer, Sep 25 2012 and by Peter Luschny, Feb 13 2025
    r := n -> Pi*(2*n - 2)*((n - 3/2)!/(n - 1)!)^2: a := n -> denom(simplify(r(n))):
    seq(a(n), n = 1..20);  # Peter Luschny, Feb 12 2025
  • Mathematica
    sb[1] = 1; sb[2] = 2; sb[n_] := sb[n] = sb[n-1]*4*(n-1)*(n-2)/(2n-3)^2;
    Table[sb[n] // Numerator, {n, 2, 20}] (* Jean-François Alcover, Aug 14 2017 *)
  • PARI
    vector(20, n, n++; numerator((2^(4*n-5)*(n-1)!^4)/((n-1)*(2*n-2)!^2))) \\ G. C. Greubel, Sep 26 2018
    

Formula

a(n) = numer(sb(n)) with sb(n) = (2^(4*n-5)*(n-1)!^4)/((n-1)*(2*n-2)!^2) and A161736(n) = denom(sb(n)).
a(n) = denominator(Pi*(2*n - 2)*((n - 3/2)!/(n - 1)!)^2). - Peter Luschny, Feb 12 2025

Extensions

Offset set to 1 and a(1) = 1 prepended by Peter Luschny, Feb 13 2025

A162728 G.f.: x/(1-x) = Sum_{n>=1} a(n)*log(1+x^n)/n.

Original entry on oeis.org

1, 3, 2, 8, 4, 6, 6, 20, 6, 12, 10, 16, 12, 18, 8, 48, 16, 18, 18, 32, 12, 30, 22, 40, 20, 36, 18, 48, 28, 24, 30, 112, 20, 48, 24, 48, 36, 54, 24, 80, 40, 36, 42, 80, 24, 66, 46, 96, 42, 60, 32, 96, 52, 54, 40, 120, 36, 84, 58, 64, 60, 90, 36, 256, 48, 60, 66, 128, 44, 72, 70
Offset: 1

Views

Author

Paul D. Hanna, Jul 12 2009

Keywords

Comments

Dirichlet inverse of A117212. - R. J. Mathar, Jul 15 2010

Examples

			x/(1-x) = log(1+x) + 3*log(1+x^2)/2 + 2*log(1+x^3)/3 + 8*log(1+x^4)/4 + 4*log(1+x^5)/5 + 6*log(1+x^6)/6 + 6*log(1+x^7)/7 + 20*log(1+x^8)/8 +...
		

Crossrefs

Programs

  • Maple
    nmax:=71: with(numtheory): 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) := (p+2)*2^(p-1)*phi(2*n-1) od: od: seq(a(n), n=1..nmax); # Johannes W. Meijer, Jan 26 2013
  • Mathematica
    f[p_, e_] := (p-1)*p^(e-1); f[2, e_] := (e+2)*2^(e-1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Aug 27 2023 *)
  • PARI
    /* As the inverse Mobius transform of A091512: */
    {a(n)=sumdiv(n,d,moebius(n/d)*valuation((2*d)^d,2))}
    
  • PARI
    /* From a(2n-1)=phi(2n-1); a(2n)=phi(2n)*A090739(n), we get: */
    {a(n)=if(n%2==1,eulerphi(n),eulerphi(n)*valuation(3^n-1,2))}
    
  • PARI
    /* From x/(1-x) = Sum_{n>=1} a(n)*log(1+x^n)/n, we get: */
    {a(n)=local(A=[1]);for(k=1,n,A=concat(A,0);A[ #A]=#A*(1-polcoeff(sum(m=1,#A,A[m]/m*log(1+x^m +x*O(x^#A)) ),#A)));A[n]}

Formula

a(2n-1) = phi(2n-1); a(2n) = phi(2n)*A090739(n), where A090739(n) = exponent of 2 in 3^(2n)-1.
Inverse Mobius transform of A091512, where A091512(n) = exponent of 2 in (2n)^n.
Multiplicative: a(m*n) = a(m)*a(n) when gcd(m,n)=1, with a(p) = p-1 for odd prime p and a(2)=3.
G.f.: x/(1-x)^2 = Sum_{n>=1} a(n)*x^n/(1+x^n). - Paul D. Hanna, Jul 12 2009
Dirichlet g.f.: zeta(s-1)/( zeta(s)*(1-2^(1-s)) ). - R. J. Mathar, Apr 14 2011
a((2*n-1)*2^p) = (p+2)*2^(p-1)* phi(2*n-1), p >= 0. Observe that a(2^p) = A001792(p). - Johannes W. Meijer, Jan 26 2013
Sum_{k=1..n} a(k) ~ 6*n^2 / Pi^2. - Vaclav Kotesovec, Feb 07 2019
Multiplicative with a(2^e) = (e+2)*2^(e-1) and a(p^e) = (p-1)*p^(e-1) for an odd prime p. - Amiram Eldar, Aug 27 2023
From Ridouane Oudra, Jul 05 2025: (Start)
a(n) = Sum_{k=0..A007814(n)} 2^k*phi(n/2^k).
a(n) = Sum_{d|n} mu(n/d)*d*A001511(d).
a(n) = A000010(n)*A090740(n).
a(n) = A085058(n-1)*A055034(n), for n>1. (End)

A354223 The initial sequence of the positive integers gradually becomes interspersed with the copies of its terms and so is transformed into this sequence. The method is described in the Comments section.

Original entry on oeis.org

1, 2, 3, 1, 3, 4, 2, 1, 2, 4, 1, 4, 5, 3, 2, 1, 2, 3, 1, 3, 5, 2, 1, 2, 5, 1, 5, 6, 4, 3, 2, 1, 2, 3, 1, 3, 4, 2, 1, 2, 4, 1, 4, 6, 3, 2, 1, 2, 3, 1, 3, 6, 2, 1, 2, 6, 1, 6, 7, 5, 4, 3, 2, 1, 2, 3, 1, 3, 4, 2, 1, 2, 4, 1, 4, 5, 3, 2, 1, 2, 3, 1, 3, 5, 2, 1, 2, 5, 1, 5, 7, 4, 3, 2, 1, 2, 3, 1, 3, 4, 2, 1, 2, 4, 1, 4, 7, 3, 2, 1, 2, 3, 1, 3, 7, 2, 1, 2, 7, 1, 7
Offset: 1

Views

Author

Tamas Sandor Nagy, May 19 2022

Keywords

Comments

Pre-inked rubberstamps of the positive integers 1, 2, 3, ... are lined up on an infinite paper strip, with sufficient gaps between them. Underneath them already there are their imprints on the paper. We lift and move the first stamp over as many others as is the number of the second one in the line. Then, we press it down on the paper in the gap between the two stamps at that location. We leave it to stand there on its new imprint until its next turn. We successively repeat this with every temporary leading pair: the second stamp will govern the first one, how many others it has to leap over. The ink-printed numbers left uncovered on the paper in front of the receding line of the stamps form the sequence.
It appears that for every new term k > 1, runs of 2^(k-1)-1 length are in this sequence, with k being at the beginning and at the end of these runs. Also, within these runs k repeats itself in the self-same manner, only in reverse order. Could this indicate a fractal property?
If you take the first differences of this sequence as a new sequence and remove all negative numbers from it, then you will obtain A089309. - Thomas Scheuerle, May 20 2022

Examples

			The initial line of the stamps:
(1) (2) (3)         (4)         (5) ...
Stamp (1) leaps over two others as is governed by stamp (2), leaving its imprint 1 in front:
1  (2) (3) (1)     (4)         (5) ...
Stamp (2) leaps over three others as stamp (3) dictates. Its imprint 2 remains on the paper:
1   2  (3) (1)     (4) (2)     (5) ...
Stamp (3) leaps over only the stamp (1), leaving its imprint 3 behind:
1   2   3  (1) (3) (4) (2)     (5) ...
Now stamp (1) leaps again, over three others into the gap between stamps (2) and (5). Its print 1 remains:
1   2   3   1  (3) (4) (2) (1) (5) ...
(And so on.)
		

Crossrefs

Programs

  • MATLAB
    function a = A354223( max_n )
      a = [1:max_n];
      for n = 1:max_n
          m = a(n);
          j = a(n+1);
          a = [a(1:n+j) m a(n+j+1:end)];
      end
      a = a(1:max_n);
    end % Thomas Scheuerle, May 20 2022

Formula

From Thomas Scheuerle, May 19 2022: (Start)
a(2^(m+1) + n - 1) - a(n) < 2, if n < 2^(m+1) - m. This evaluates to zero for all n with m+1 exceptions. For these exceptions it will become 1. The exceptions are n = {A132045(m), A132045(m)+2^m, A132045(m)+2^m+2^(m-1), A132045(m)+2^m+2^(m-1)+2^(m-2), ..., A132045(m)+2^(m+1)-1}.
(1/n)*Sum_{k=1..n} a(k) <= 3. It appears that this arithmetic mean converges to 3 if n approaches infinity.
a(1 + Sum_{k=1..n} A090739(k)) = a(1 + A120738(n - 1)) = 1.
a(Sum_{k=1..n} (1 + A195986(k))) = 2. (End)

A091283 Exponent of 2 in -1+prime[n]^s, if s is an exponent of the form s=8k-4.

Original entry on oeis.org

0, 4, 4, 5, 4, 4, 6, 4, 5, 4, 7, 4, 5, 4, 6, 4, 4, 4, 4, 5, 5, 6, 4, 5, 7, 4, 5, 4, 4, 6, 9, 4, 5, 4, 4, 5, 4, 4, 5, 4, 4, 4, 8, 8, 4, 5, 4, 7, 4, 4, 5, 6, 6, 4, 10, 5, 4, 6, 4, 5, 4, 4, 4, 5, 5, 4, 4, 6, 4, 4, 7, 5, 6, 4, 4, 9, 4, 4, 6, 5, 4, 4, 6, 6, 5, 4, 8, 5, 4, 6, 4, 7, 5, 4, 4, 5, 4, 5, 4, 4, 4, 4, 4, 5, 4
Offset: 1

Views

Author

Labos Elemer, Jan 22 2004

Keywords

Crossrefs

Programs

  • Mathematica
    Table[{8*k-4, Table[Part[Flatten[FactorInteger [ -1+Prime[n]^(8*k-4)]], 2], {n, 2, m}]}, {k, 1, 2}]
Showing 1-10 of 14 results. Next