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.

A332306 a(n) is the least k such that A121663(k) = n.

Original entry on oeis.org

0, 1, 2, 4, 8, 3, 32, 5, 128, 9, 512, 6, 2048, 33, 10, 65, 32768, 18, 131072, 12, 34, 513, 2097152, 7, 8388608, 2049, 130, 36, 134217728, 11, 536870912, 68, 514, 32769, 40, 19, 34359738368, 131073, 2050, 13, 549755813888, 35, 2199023255552, 516, 136, 2097153
Offset: 1

Views

Author

Rémy Sigrist, Feb 09 2020

Keywords

Comments

The binary representation of a(n) encodes the colexicographically earliest factorization of n into distinct factors greater than 1.

Examples

			The first terms, alongside their binary representations and factorizations, are:
  n   a(n)    bin(a(n))           Factorization
  --  ------  ------------------  -------------
   1       0                   0
   2       1                   1              2
   3       2                  10              3
   4       4                 100              4
   5       8                1000              5
   6       3                  11            2*3
   7      32              100000              7
   8       5                 101            2*4
   9     128            10000000              9
  10       9                1001            2*5
  11     512          1000000000             11
  12       6                 110            3*4
  13    2048        100000000000             13
  14      33              100001            2*7
  15      10                1010            3*5
  16      65             1000001            2*8
  17   32768    1000000000000000             17
  18      18               10010            3*6
  19  131072  100000000000000000             19
  20      12                1100            4*5
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(n) = 2^(n-2) iff n is a prime number of the square of a prime number (A000430).
a(n!) = 2^(n-1)-1 for any n > 0.
a(p_1*...*p_k) = 2^(p_1-2)+...+2^(p_k-2) for distinct prime numbers p_1, ..., p_k.

A096111 If n = 2^k - 1, then a(n) = k+1, otherwise a(n) = (A000523(n)+1)*a(A053645(n)).

Original entry on oeis.org

1, 2, 2, 3, 3, 6, 6, 4, 4, 8, 8, 12, 12, 24, 24, 5, 5, 10, 10, 15, 15, 30, 30, 20, 20, 40, 40, 60, 60, 120, 120, 6, 6, 12, 12, 18, 18, 36, 36, 24, 24, 48, 48, 72, 72, 144, 144, 30, 30, 60, 60, 90, 90, 180, 180, 120, 120, 240, 240, 360, 360, 720, 720, 7, 7, 14, 14, 21, 21
Offset: 0

Views

Author

Amarnath Murthy, Jun 29 2004

Keywords

Comments

Each n > 1 occurs 2*A045778(n) times in the sequence.
f(n+2^k) = (k+1)*f(n) if 2^k > n+1. - Robert Israel, Apr 25 2016
If the binary indices of n (row n of A048793) are the positions 1's in its reversed binary expansion, then a(n) is the product of all binary indices of n + 1. The number of binary indices of n is A000120(n), their sum is A029931(n), and their average is A326699(n)/A326700(n). - Gus Wiseman, Jul 27 2019

Crossrefs

Permutation of A096115, i.e. a(n) = A096115(A122198(n+1)) [Note the different starting offsets]. Bisection: A121663. Cf. A096113, A052330.
Cf. A029931.

Programs

  • Maple
    f:= proc(n) local L;
        L:= convert(2*n+2,base,2);
        convert(subs(0=NULL,zip(`*`,L, [$0..nops(L)-1])),`*`);
    end proc:
    map(f, [$0..100]); # Robert Israel, Apr 25 2016
  • Mathematica
    CoefficientList[(Product[1 + k x^(2^(k - 1)), {k, 7}] - 1)/x, x] (* Michael De Vlieger, Apr 08 2016 *)
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];Table[Times@@bpe[n+1],{n,0,100}] (* Gus Wiseman, Jul 26 2019 *)
  • PARI
    N=166; q='q+O('q^N);
    gf= (prod(n=1,1+ceil(log(N)/log(2)), 1+n*q^(2^(n-1)) ) - 1) / q;
    Vec(gf)
    /* Joerg Arndt, Oct 06 2012 */
  • Scheme
    (define (A096111 n) (cond ((pow2? (+ n 1)) (+ 2 (A000523 n))) (else (* (+ 1 (A000523 n)) (A096111 (A053645 n))))))
    (define (pow2? n) (and (> n 0) (zero? (A004198bi n (- n 1)))))
    

Formula

G.f.: ( prod(k>=1, 1+k*x^(2^(k-1)) )- 1 ) / x. - Vladeta Jovovic, Nov 08 2005
a(n) is the product of the exponents in the binary expansion of 2*n + 2. - Peter Kagey, Apr 24 2016

Extensions

Edited, extended and Scheme code added by Antti Karttunen, Aug 25 2006

A332382 If n = Sum (2^e_k) then a(n) = Product (prime(e_k + 2)).

Original entry on oeis.org

1, 3, 5, 15, 7, 21, 35, 105, 11, 33, 55, 165, 77, 231, 385, 1155, 13, 39, 65, 195, 91, 273, 455, 1365, 143, 429, 715, 2145, 1001, 3003, 5005, 15015, 17, 51, 85, 255, 119, 357, 595, 1785, 187, 561, 935, 2805, 1309, 3927, 6545, 19635, 221, 663, 1105, 3315, 1547, 4641, 7735, 23205
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 10 2020

Keywords

Comments

Permutation of odd squarefree numbers (A056911).
a(n) is the n-th power of 3 in the monoid defined in A331590. - Peter Munn, May 02 2020

Examples

			21 = 2^0 + 2^2 + 2^4 so a(21) = prime(2) * prime(4) * prime(6) = 3 * 7 * 13 = 273.
		

Crossrefs

Bisection of A019565.
A003961, A003987, A059897, A331590, A334748 are used to express relationship between terms of this sequence.

Programs

  • Maple
    a:= n-> (l-> mul(ithprime(i+1)^l[i], i=1..nops(l)))(convert(n, base, 2)):
    seq(a(n), n=0..55);  # Alois P. Heinz, Feb 10 2020
  • Mathematica
    nmax = 55; CoefficientList[Series[Product[(1 + Prime[k + 2] x^(2^k)), {k, 0, Floor[Log[2, nmax]]}], {x, 0, nmax}], x]
    a[0] = 1; a[n_] := Prime[Floor[Log[2, n]] + 2] a[n - 2^Floor[Log[2, n]]]; Table[a[n], {n, 0, 55}]
  • PARI
    a(n) = my(b=Vecrev(binary(n))); prod(k=1, #b, if (b[k], prime(k+1), 1)); \\ Michel Marcus, Feb 10 2020

Formula

G.f.: Product_{k>=0} (1 + prime(k+2) * x^(2^k)).
a(0) = 1; a(n) = prime(floor(log_2(n)) + 2) * a(n - 2^floor(log_2(n))).
a(2^(k-1)-1) = A002110(k)/2 for k > 0.
From Peter Munn, May 02 2020: (Start)
a(2n) = A003961(a(n)).
a(2n+1) = 3 * a(2n).
a(n) = A225546(4^n).
a(n+k) = A331590(a(n), a(k)).
a(n XOR k) = A059897(a(n), a(k)), where XOR denotes bitwise exclusive-or, A003987.
A048675(a(n)) = 2n.
(End)
a(n+1) = A334748(a(n)). - Peter Munn, Mar 04 2022

A309840 If n = Sum (2^e_k) then a(n) = Product (Fibonacci(e_k + 3)).

Original entry on oeis.org

1, 2, 3, 6, 5, 10, 15, 30, 8, 16, 24, 48, 40, 80, 120, 240, 13, 26, 39, 78, 65, 130, 195, 390, 104, 208, 312, 624, 520, 1040, 1560, 3120, 21, 42, 63, 126, 105, 210, 315, 630, 168, 336, 504, 1008, 840, 1680, 2520, 5040, 273, 546, 819, 1638, 1365, 2730, 4095, 8190
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 19 2019

Keywords

Examples

			23 = 2^0 + 2^1 + 2^2 + 2^4 so a(23) = Fibonacci(3) * Fibonacci(4) * Fibonacci(5) * Fibonacci(7) = 390.
		

Crossrefs

Programs

  • Mathematica
    nmax = 55; CoefficientList[Series[Product[(1 + Fibonacci[k + 3] x^(2^k)), {k, 0, Floor[Log[2, nmax]] + 1}], {x, 0, nmax}], x]
    a[0] = 1; a[n_] := Fibonacci[Floor[Log[2, n]] + 3] a[n - 2^Floor[Log[2, n]]]; Table[a[n], {n, 0, 55}]
  • PARI
    a(n)={vecprod([fibonacci(k+2) | k<-Vec(select(b->b, Vecrev(digits(n, 2)), 1))])} \\ Andrew Howroyd, Aug 19 2019

Formula

G.f.: Product_{k>=0} (1 + Fibonacci(k + 3) * x^(2^k)).
a(0) = 1; a(n) = Fibonacci(floor(log_2(n)) + 3) * a(n - 2^floor(log_2(n))).
a(2^(k-2)-1) = A003266(k).

A309841 If n = Sum (2^e_k) then a(n) = Product ((e_k + 2)!).

Original entry on oeis.org

1, 2, 6, 12, 24, 48, 144, 288, 120, 240, 720, 1440, 2880, 5760, 17280, 34560, 720, 1440, 4320, 8640, 17280, 34560, 103680, 207360, 86400, 172800, 518400, 1036800, 2073600, 4147200, 12441600, 24883200, 5040, 10080, 30240, 60480, 120960, 241920, 725760, 1451520, 604800
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 19 2019

Keywords

Examples

			21 = 2^0 + 2^2 + 2^4 so a(21) = 2! * 4! * 6! = 34560.
		

Crossrefs

Programs

  • Maple
    a:= n-> (l-> mul((i+1)!^l[i], i=1..nops(l)))(convert(n, base, 2)):
    seq(a(n), n=0..40);  # Alois P. Heinz, Feb 10 2020
  • Mathematica
    nmax = 40; CoefficientList[Series[Product[(1 + (k + 2)! x^(2^k)), {k, 0, Floor[Log[2, nmax]] + 1}], {x, 0, nmax}], x]
    a[0] = 1; a[n_] := (Floor[Log[2, n]] + 2)! a[n - 2^Floor[Log[2, n]]]; Table[a[n], {n, 0, 40}]
  • PARI
    a(n)={vecprod([(k+1)! | k<-Vec(select(b->b, Vecrev(digits(n, 2)), 1))])} \\ Andrew Howroyd, Aug 19 2019

Formula

G.f.: Product_{k>=0} (1 + (k + 2)! * x^(2^k)).
a(0) = 1; a(n) = (floor(log_2(n)) + 2)! * a(n - 2^floor(log_2(n))).
a(2^(k-1)-1) = A000178(k).
Showing 1-5 of 5 results.