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.

Previous Showing 11-20 of 478 results. Next

A092119 EULER transform of A001511.

Original entry on oeis.org

1, 1, 3, 4, 10, 13, 26, 35, 66, 88, 150, 202, 331, 442, 688, 919, 1394, 1848, 2716, 3590, 5174, 6796, 9589, 12542, 17440, 22680, 31055, 40208, 54420, 70096, 93772, 120256, 159380, 203436, 267142, 339573, 442478, 560050, 724302, 913198, 1173375, 1473622
Offset: 0

Views

Author

Vladeta Jovovic, Mar 29 2004

Keywords

Comments

From Gary W. Adamson, Feb 11 2010: (Start)
Given A000041, P(x) = A(x)/A(x^2) with P(x) = (1 + x + 2x^2 + 3x^3 + 5x^4 + 7x^5 + ...),
A(x) = (1 + x + 3x^2 + 4x^3 + 10x^4 + 13x^5 + ...),
A(x^2) = (1 + x^2 + 3x^4 + 4x^6 + 10x^8 + ...), where A092119 = (1, 1, 3, 4, 10, ...) = Euler transform of the ruler sequence, A001511. (End)
Let M = triangle A173238 as an infinite lower triangular matrix. Then A092119 = lim_{n->infinity} M^n. Let P(x) = polcoeff A000041 = (1 + x + 2x^2 + 3x^3 + ...), and A(x) = polcoeff A092119. Then P(x) = A(x) / A(x^2), an example of a conjectured infinite set of operations (cf. A173238). - Gary W. Adamson, Feb 13 2010

Crossrefs

Cf. A000041. - Gary W. Adamson, Feb 11 2010
Cf. A173241.

Programs

  • Maple
    # Uses EulerTransform from A358369.
    t := EulerTransform(n -> padic[ordp](2*n, 2)):
    seq(t(n), n = 0..41); # Peter Luschny, Nov 18 2022
  • Mathematica
    m = 42;
    1/Product[QPochhammer[x^(2^k)], {k, 0, Log[2, m]//Ceiling}] + O[x]^m // CoefficientList[#, x]& (* Jean-François Alcover, Jan 14 2020, after Joerg Arndt *)
  • PARI
    N=66; x='x+O('x^N); /* that many terms */
    gf=1/prod(e=0,ceil(log(N)/log(2)),eta(x^(2^e)));
    Vec(gf) /* show terms */ /* Joerg Arndt, Jun 21 2011 */

Formula

G.f.: 1/Product_{k>=0} P(x^(2^k)) where P(x) = Product_{k>=1} (1 - x^k). - Joerg Arndt, Jun 21 2011

A287896 a(n) = A002487(n)*A001511(n).

Original entry on oeis.org

1, 2, 2, 3, 3, 4, 3, 4, 4, 6, 5, 6, 5, 6, 4, 5, 5, 8, 7, 9, 8, 10, 7, 8, 7, 10, 8, 9, 7, 8, 5, 6, 6, 10, 9, 12, 11, 14, 10, 12, 11, 16, 13, 15, 12, 14, 9, 10, 9, 14, 12, 15, 13, 16, 11, 12, 10, 14, 11, 12, 9, 10, 6, 7, 7, 12, 11, 15, 14, 18, 13, 16, 15, 22, 18, 21, 17, 20, 13, 15, 14, 22, 19, 24, 21, 26, 18, 20, 17
Offset: 1

Views

Author

I. V. Serov, Jun 02 2017

Keywords

Comments

Proposed name: N-fusc.
Each number n>0 appears in this sequence exactly n times.
From Yosu Yurramendi, Apr 08 2019: (Start)
The terms (n>0) may be written as a left-justified array with rows of length 2^m:
1,
2, 2,
3, 3, 4, 3,
4, 4, 6, 5, 6, 5, 6, 4,
5, 5, 8, 7, 9, 8, 10, 7, 8, 7, 10, 8, 9, 7, 8, 5,
6, 6, 10, 9, 12, 11, 14, 10, 12, 11, 16, 13, 15, 12, 14, 9, 10, 9, ...
...
as well as right-justified fashion:
1,
2, 2,
3, 3, 4, 3,
4, 4, 6, 5, 6, 5, 6, 4,
5, 5, 8, 7, 9, 8, 10, 7, 8, 7, 10, 8, 9, 7, 8, 5,
... 14, 9, 10, 9, 14, 12, 15, 13, 16, 11, 12, 10, 14, 11, 12, 9, 10, 6,
From these two dispositions interesting properties can be induced (see FORMULA section)
(End)

Crossrefs

Programs

  • Mathematica
    Table[Block[{a = 1, b = 0, m = n}, While[m > 0, If[OddQ@ m, b = a + b, a = a + b]; m = Floor[m/2]]; b] IntegerExponent[2 n, 2], {n, 89}] (* Michael De Vlieger, Jun 14 2017, after Jean-François Alcover at A002487 *)
  • Python
    from functools import reduce
    def A287896(n): return (n&-n).bit_length()*sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if int(y) else (x[0]+x[1],x[1]),bin(n)[-1:2:-1],(1,0))) # Chai Wah Wu, Jul 14 2022

Formula

a(1) = 1; for n>1: a(n) = (A002487(n-1) + A002487(n) + A002487(n+1))/2.
a(n) = A007306(n) - A288002(n).
From Yosu Yurramendi, Apr 08 2019: (Start)
For m >= 0, 0 <= k < 2^m, a(2^(m+1)+k) - a(2^m+k) = a(k). a(0) = 1 is needed.
For m >= 0, 0 <= k < 2^m, a(2^(m+1)-1-k) - a(2^(m)-1-k) = a(k).
(End)

A249811 Permutation of natural numbers: a(n) = A249741(A001511(n), A003602(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 7, 6, 9, 14, 11, 24, 13, 20, 15, 10, 17, 26, 19, 34, 21, 32, 23, 48, 25, 38, 27, 54, 29, 44, 31, 12, 33, 50, 35, 64, 37, 56, 39, 76, 41, 62, 43, 84, 45, 68, 47, 120, 49, 74, 51, 94, 53, 80, 55, 90, 57, 86, 59, 114, 61, 92, 63, 16, 65, 98, 67, 124, 69, 104, 71, 118, 73, 110, 75, 144, 77, 116, 79, 142, 81
Offset: 1

Views

Author

Antti Karttunen, Nov 06 2014

Keywords

Comments

In the essence, a(n) tells which number in square array A249741 (the sieve of Eratosthenes minus 1) is at the same position where n is in array A135764, which is formed from odd numbers whose binary expansions are shifted successively leftwards on the successive rows. As the topmost row in both arrays is A005408 (odd numbers), they are fixed, i.e., a(2n+1) = 2n+1 for all n.
Equally: a(n) tells which number in array A114881 is at the same position where n is in the array A054582, as they are the transposes of above two arrays.

Crossrefs

Inverse: A249812.
Similar or related permutations: A249814 ("deep variant"), A246676, A249815, A114881, A209268, A249725, A249741.
Differs from A246676 for the first time at n=14, where a(14)=20, while
A246676(14)=26.

Programs

Formula

In the following formulas, A083221 and A249741 are interpreted as bivariate functions:
a(n) = A083221(A001511(n),A003602(n)) - 1 = A249741(A001511(n),A003602(n)).
As a composition of related permutations:
a(n) = A114881(A209268(n)).
a(n) = A249741(A249725(n)).
a(n) = A249815(A246676(n)).
Other identities. For all n >= 1 the following holds:
a(A000079(n-1)) = A006093(n).

A323885 Sum of A001511 and its Dirichlet inverse.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 08 2019

Keywords

Crossrefs

Programs

  • PARI
    A001511(n) = (1+valuation(n,2));
    A092673(n) = (moebius(n)-if(n%2,0,moebius(n/2)));
    A323885(n) = (A001511(n)+A092673(n));
    
  • Python
    from sympy import mobius
    def A323885(n): return (n&-n).bit_length()+mobius(n)-(0 if n&1 else mobius(n>>1)) # Chai Wah Wu, Jul 13 2022

Formula

a(n) = A001511(n) + A092673(n).

A060572 Tower of Hanoi: the optimal way to move an even number of disks from peg 0 to peg 2 or an odd number from peg 0 to peg 1 is on move n to move disk A001511 from peg A060571 to peg A060572 (here).

Original entry on oeis.org

1, 2, 2, 1, 0, 1, 1, 2, 2, 0, 0, 2, 1, 2, 2, 1, 0, 1, 1, 0, 2, 0, 0, 1, 1, 2, 2, 1, 0, 1, 1, 2, 2, 0, 0, 2, 1, 2, 2, 0, 0, 1, 1, 0, 2, 0, 0, 2, 1, 2, 2, 1, 0, 1, 1, 2, 2, 0, 0, 2, 1, 2, 2, 1, 0, 1, 1, 0, 2, 0, 0, 1, 1, 2, 2, 1, 0, 1, 1, 0, 2, 0, 0, 2, 1, 2, 2, 0, 0, 1, 1, 0, 2, 0, 0, 1, 1, 2, 2, 1, 0, 1, 1, 2, 2
Offset: 1

Views

Author

Henry Bottomley, Apr 03 2001

Keywords

Comments

If written in a fractal pattern of 4 X 4 squares, skipping the first square, going right then down then right then down, etc.:
X122 1011 ...
1011 0200
2200 1122
2122 1011
a number of patterns become apparent. Most notably the central diagonal going from the X down and to the right, when the 1's and 2's are reversed, gives the sequence A060571. When the same process is applied to A060571, this sequence emerges. - Donald Sampson (marsquo(AT)hotmail.com), Dec 01 2003

Examples

			Start by moving first disk (from peg 0) to peg 1, second disk (from peg 0) to peg 2, first disk (from peg 1) to peg 2, etc., so sequence starts 1,2,2,...
		

Crossrefs

Programs

  • PARI
    a(n) = (- (-1)^valuation(n,2) - n)%3; \\ Kevin Ryde, Aug 07 2021

Formula

a(n) = A060571(n) - (-1)^A001511(n) mod 3.
If n > 2^A001511(n) then a(n) = a(n-2^A001511(n)) - (-1)^A001511(n) mod 3, otherwise a(k) = -(-1)^A001511(n) mod 3.
a(n) = A001511(n)-th digit from right of A055662(n).
If a(n)=0 then a(2n)=0, If a(n)=1 then a(2n)=2, If a(n)=2 then a(2n)=1, Thus a(n)=a(4n). - Donald Sampson (marsquo(AT)hotmail.com), Dec 01 2003
a(5n) = A060571(n) with the 1's and 2s reversed. - Donald Sampson (marsquo(AT)hotmail.com), Dec 08 2003

A094267 First differences of A001511.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jun 03 2004

Keywords

Comments

For n even, Sum_{k=1..n} a(k) > 0. For n odd, Sum_{k=1..n} a(k) = 0. - James Spahlinger, Oct 13 2013

Examples

			G.f. = 1 - x + 2*x^2 - 2*x^3 + x^4 - x^5 + 3*x^6 - 3*x^7 + x^8 - x^9 + ...
		

Crossrefs

Absolute values give A050603. Cf. A001511, A005187.

Programs

  • PARI
    a(n)=(-1)^n*valuation(n+2-n%2,2) \\ Charles R Greathouse IV, Oct 14 2013
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = sum(k=0, length( binary(n+2)) - 1, x^(2^k) / (1 - x^(2^k)), x^3 * O(x^n));  polcoeff( (A * (1 - x) - x) / x^2, n))}; /* Michael Somos, May 11 2014 */
    
  • Python
    def A094267(n): return (((m:=n>>1)&~(m+1)).bit_length()+1)*(-1 if n&1 else 1) # Chai Wah Wu, Jul 12 2022

Formula

a(n) = (-1)^n * A050603(n).
G.f.: -1/x + (1 - x)*Sum_{k>=0} x^(2^k-2)/(1 - x^(2^k)). - Ilya Gutkovskiy, Feb 28 2017

A115364 a(n) = A000217(A001511(n)), where A001511 is one more than the 2-adic valuation of n, and A000217(n) is the n-th triangular number, binomial(n+1, 2).

Original entry on oeis.org

1, 3, 1, 6, 1, 3, 1, 10, 1, 3, 1, 6, 1, 3, 1, 15, 1, 3, 1, 6, 1, 3, 1, 10, 1, 3, 1, 6, 1, 3, 1, 21, 1, 3, 1, 6, 1, 3, 1, 10, 1, 3, 1, 6, 1, 3, 1, 15, 1, 3, 1, 6, 1, 3, 1, 10, 1, 3, 1, 6, 1, 3, 1, 28, 1, 3, 1, 6, 1, 3, 1, 10, 1, 3, 1, 6, 1, 3, 1, 15, 1, 3, 1, 6, 1, 3, 1, 10, 1, 3, 1, 6, 1
Offset: 1

Views

Author

Paul Barry, Jan 21 2006

Keywords

Comments

Row sums of A115363. In general, the row sums of ((1,x) - m(x,x^2))^(-2) are obtained by following the ruler function A001511(n) by the solution of the recurrence a(1)=1, a(n) = n*m^(n-1) + a(n-1), n > 1.
The Stephan formula says this is the Dirichlet convolution of A000012 with A104117. - R. J. Mathar, Feb 07 2011

Crossrefs

Programs

Formula

a(n) = binomial(A007814(n)+2, 2) = binomial(A001511(n)+1, 2).
Dirichlet g.f.: zeta(s)*(2^s/(2^s-1))^2. - Ralf Stephan, Jun 17 2007
Multiplicative with a(2^k) = A000217(k+1), a(p^k) = 1 for odd primes p. - Antti Karttunen, Nov 02 2018
O.g.f.: Sum_{k >= 1} k*x^(2^(k-1))/(1 - x^(2^(k-1))). More generally, if f(n) is an arithmetic function and g(n) := Sum_{k = 1..n} f(k), then Sum_{k >= 1} f(k)*x^(2^(k-1))/(1 - x^(2^(k-1))) = Sum_{n >= 1} g(A001511(n))*x^n. This is the case f(n) = n. - Peter Bala, Mar 26 2019
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 4. - Amiram Eldar, Oct 22 2022
More precise asymptotics: Sum_{k=1..n} a(k) ~ 4*n - log(n)*(log(n) + 2*log(4*Pi))/(4*log(2)^2). - Vaclav Kotesovec, Jun 25 2024

Extensions

Formula corrected and the name changed by Antti Karttunen, Nov 02 2018

A228371 First differences of A228370. Also A001511 and A006519 interleaved.

Original entry on oeis.org

1, 1, 2, 2, 1, 1, 3, 4, 1, 1, 2, 2, 1, 1, 4, 8, 1, 1, 2, 2, 1, 1, 3, 4, 1, 1, 2, 2, 1, 1, 5, 16, 1, 1, 2, 2, 1, 1, 3, 4, 1, 1, 2, 2, 1, 1, 4, 8, 1, 1, 2, 2, 1, 1, 3, 4, 1, 1, 2, 2, 1, 1, 6, 32, 1, 1, 2, 2, 1, 1, 3, 4, 1, 1, 2, 2, 1, 1, 4, 8, 1, 1, 2, 2, 1, 1, 3, 4, 1, 1, 2, 2, 1, 1, 5, 16, 1, 1, 2, 2, 1, 1, 3, 4, 1, 1, 2, 2, 1, 1, 4, 8, 1, 1, 2, 2, 1, 1, 3, 4, 1, 1, 2, 2, 1, 1, 7, 64
Offset: 1

Views

Author

Omar E. Pol, Aug 21 2013

Keywords

Comments

Number of toothpicks added at n-th stage to the toothpick structure (related to integer compositions) of A228370.
The equivalent sequence for integer partitions is A220517.

Examples

			Illustration of the structure after 32 stages. The diagram represents the 16 compositions of 5. The k-th horizontal line segment has length A001511(k) equals the largest part of the k-th region. The k-th vertical line segment has length A006519(k) equals the number of parts of the k-th region.
.      _ _ _ _ _
16     _        |
15     _|_      |
14     _  |     |
13     _|_|_    |
12     _    |   |
11     _|_  |   |
10     _  | |   |
9      _|_|_|_  |
8      _      | |
7      _|_    | |
6      _  |   | |
5      _|_|_  | |
4      _    | | |
3      _|_  | | |
2      _  | | | |
1       | | | | |
.
Written as an irregular triangle the sequence begins:
  1,1;
  2,2;
  1,1,3,4;
  1,1,2,2,1,1,4,8;
  1,1,2,2,1,1,3,4,1,1,2,2,1,1,5,16;
  1,1,2,2,1,1,3,4,1,1,2,2,1,1,4,8,1,1,2,2,1,1,3,4,1,1,2,2,1,1,6,32;
  ...
		

Crossrefs

Row lengths give 2*A011782. Right border gives A000079.

Programs

  • Python
    def A228371(n): return ((m:=(n>>1)+1)&-m).bit_length() if n&1 else (m:=n>>1)&-m # Chai Wah Wu, Jul 14 2022

Formula

a(2n-1) = A001511(n), n >= 1. a(2n) = A006519(n), n >= 1.

A286251 Compound filter: a(n) = P(A001511(1+n), A046523(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

3, 2, 9, 7, 5, 16, 14, 29, 12, 16, 9, 67, 5, 16, 50, 121, 5, 67, 9, 67, 23, 16, 14, 277, 12, 16, 48, 67, 5, 436, 27, 497, 23, 16, 31, 631, 5, 16, 40, 277, 5, 436, 9, 67, 80, 16, 20, 1129, 12, 67, 31, 67, 5, 277, 40, 277, 23, 16, 9, 1771, 5, 16, 160, 2017, 23, 436, 9, 67, 23, 436, 14, 2557, 5, 16, 94, 67, 23, 436, 20, 1129, 138, 16, 9, 1771, 23, 16, 40, 277, 5
Offset: 1

Views

Author

Antti Karttunen, May 07 2017

Keywords

Crossrefs

Programs

  • PARI
    A001511(n) = (1+valuation(n,2));
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    A286251(n) = (2 + ((A001511(1+n)+A046523(n))^2) - A001511(1+n) - 3*A046523(n))/2;
    for(n=1, 10000, write("b286251.txt", n, " ", A286251(n)));
    
  • Python
    from sympy import factorint
    def a001511(n): return 2 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a(n): return T(a001511(n + 1), a046523(n)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A286251 n) (* (/ 1 2) (+ (expt (+ (A001511 (+ 1 n)) (A046523 n)) 2) (- (A001511 (+ 1 n))) (- (* 3 (A046523 n))) 2)))
    

Formula

a(n) = (1/2)*(2 + ((A001511(1+n)+A046523(n))^2) - A001511(1+n) - 3*A046523(n)).

A286260 Compound filter: a(n) = P(A001511(n), A161942(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 8, 1, 39, 4, 8, 1, 157, 79, 47, 4, 39, 22, 8, 4, 600, 37, 782, 11, 256, 1, 47, 4, 157, 466, 233, 11, 39, 106, 47, 1, 2284, 4, 380, 4, 4281, 172, 122, 22, 1132, 211, 8, 56, 256, 742, 47, 4, 600, 1597, 4373, 37, 1278, 352, 122, 37, 157, 11, 1037, 106, 256, 466, 8, 79, 8785, 211, 47, 137, 2083, 4, 47, 37, 19507, 667, 1655, 466, 669, 4, 233, 11, 4661, 7261
Offset: 1

Views

Author

Antti Karttunen, May 07 2017

Keywords

Crossrefs

Programs

  • PARI
    A001511(n) = (1+valuation(n,2));
    A000265(n) = (n >> valuation(n, 2));
    A161942(n) = A000265(sigma(n));
    A286260(n) = (2 + ((A001511(n)+A161942(n))^2) - A001511(n) - 3*A161942(n))/2;
    for(n=1, 16384, write("b286260.txt", n, " ", A286260(n)));
    
  • Python
    from sympy import factorint, divisors, divisor_sigma
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def a000265(n): return max(list(filter(lambda i: i%2 == 1, divisors(n))))
    def a161942(n): return a000265(divisor_sigma(n))
    def a001511(n): return 2 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
    def a(n): return T(a001511(n), a161942(n)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A286260 n) (* (/ 1 2) (+ (expt (+ (A001511 n) (A161942 n)) 2) (- (A001511 n)) (- (* 3 (A161942 n))) 2)))
    

Formula

a(n) = (1/2)*(2 + ((A001511(n)+A161942(n))^2) - A001511(n) - 3*A161942(n)).
Previous Showing 11-20 of 478 results. Next