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

A061142 Replace each prime factor of n with 2: a(n) = 2^bigomega(n), where bigomega = A001222, number of prime factors counted with multiplicity.

Original entry on oeis.org

1, 2, 2, 4, 2, 4, 2, 8, 4, 4, 2, 8, 2, 4, 4, 16, 2, 8, 2, 8, 4, 4, 2, 16, 4, 4, 8, 8, 2, 8, 2, 32, 4, 4, 4, 16, 2, 4, 4, 16, 2, 8, 2, 8, 8, 4, 2, 32, 4, 8, 4, 8, 2, 16, 4, 16, 4, 4, 2, 16, 2, 4, 8, 64, 4, 8, 2, 8, 4, 8, 2, 32, 2, 4, 8, 8, 4, 8, 2, 32, 16, 4, 2, 16, 4, 4, 4, 16, 2, 16, 4, 8, 4, 4, 4
Offset: 1

Views

Author

Henry Bottomley, May 29 2001

Keywords

Comments

The inverse Möbius transform of A162510. - R. J. Mathar, Feb 09 2011

Examples

			a(100)=16 since 100=2*2*5*5 and so a(100)=2*2*2*2.
		

Crossrefs

Programs

  • Maple
    with(numtheory): seq(2^bigomega(n),n=1..95);
  • Mathematica
    Table[2^PrimeOmega[n], {n, 1, 95}] (* Jean-François Alcover, Jun 08 2013 *)
  • PARI
    a(n)=direuler(p=1,n,1/(1-2*X))[n] /* Ralf Stephan, Mar 28 2015 */
    
  • PARI
    a(n) = 2^bigomega(n); \\ Michel Marcus, Aug 08 2017

Formula

a(n) = Sum_{d divides n} 2^(bigomega(d)-omega(d)) = Sum_{d divides n} 2^(A001222(d) - A001221(d)). - Benoit Cloitre, Apr 30 2002
a(n) = A000079(A001222(n)), i.e., a(n)=2^bigomega(n). - Emeric Deutsch, Feb 13 2005
Totally multiplicative with a(p) = 2. - Franklin T. Adams-Watters, Oct 04 2006
Dirichlet g.f.: Product_{p prime} 1/(1-2*p^(-s)). - Ralf Stephan, Mar 28 2015
a(n) = A001316(A156552(n)). - Antti Karttunen, May 29 2017
Dirichlet g.f.: zeta(s)^2 * Product_{p prime} 1/(1 - 1/(p^s - 1)^2). - Vaclav Kotesovec, Mar 14 2023

A212172 Row n of table represents second signature of n: list of exponents >= 2 in canonical prime factorization of n, in nonincreasing order, or 0 if no such exponent exists.

Original entry on oeis.org

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

Views

Author

Matthew Vandermast, Jun 03 2012

Keywords

Comments

Length of row n equals A056170(n) if A056170(n) is positive, or 1 if A056170(n) = 0.
The multiset of exponents >=2 in the prime factorization of n completely determines a(n) for over 20 sequences in the database (see crossreferences). It also determines the fractions A034444(n)/A000005(n) and A037445(n)/A000005(n).
For squarefree numbers, this multiset is { } (the empty multiset). The use of 0 in the table to represent each n with no exponents >=2 in its prime factorization accords with the usual OEIS practice of using 0 to represent nonexistent elements when possible. In comments, the second signature of squarefree numbers will be represented as { }.
For each second signature {S}, there exist values of j and k such that, if the second signature of n is {S}, then A085082(n) is congruent to j modulo k. These values are nontrivial unless {S} = { }. Analogous (but not necessarily identical) values of j and k also exist for each second signature with respect to A088873 and A181796.
Each sequence of integers with a given second signature {S} has a positive density, unlike the analogous sequences for prime signatures. The highest of these densities is 6/Pi^2 = 0.607927... for A005117 ({S} = { }).

Examples

			First rows of table read: 0; 0; 0; 2; 0; 0; 0; 3; 2; 0; 0; 2;...
12 = 2^2*3 has positive exponents 2 and 1 in its canonical prime factorization (1s are often left implicit as exponents). Since only exponents that are 2 or greater appear in a number's second signature, 12's second signature is {2}.
30 = 2*3*5 has no exponents greater than 1 in its prime factorization. The multiset of its exponents >= 2 is { } (the empty multiset), represented in the table with a 0.
72 = 2^3*3^2 has positive exponents 3 and 2 in its prime factorization, as does 108 = 2^2*3^3. Rows 72 and 108 both read {3,2}.
		

Crossrefs

A181800 gives first integer of each second signature. Also see A212171, A212173-A212181, A212642-A212644.
Functions determined by exponents >=2 in the prime factorization of n:
Additive: A046660, A056170.
Other: A007424, A051903 (for n > 1), A056626, A066301, A071325, A072411, A091050, A107078, A185102 (for n > 1), A212180.
Sequences that contain all integers of a specific second signature: A005117 (second signature { }), A060687 ({2}), A048109 ({3}).

Programs

  • Magma
    &cat[IsEmpty(e)select [0]else Reverse(Sort(e))where e is[pe[2]:pe in Factorisation(n)|pe[2]gt 1]:n in[1..102]]; // Jason Kimberley, Jun 13 2012
  • Mathematica
    row[n_] := Select[ FactorInteger[n][[All, 2]], # >= 2 &] /. {} -> 0 /. {k__} -> Sequence[k]; Table[row[n], {n, 1, 100}] (* Jean-François Alcover, Apr 16 2013 *)

Formula

For nonsquarefree n, row n is identical to row A057521(n) of table A212171.

A162511 Multiplicative function with a(p^e) = (-1)^(e-1).

Original entry on oeis.org

1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1
Offset: 1

Views

Author

Gerard P. Michon, Jul 05 2009

Keywords

Crossrefs

Programs

  • Maple
    A162511 := proc(n)
        local a,f;
        a := 1;
        for f in ifactors(n)[2] do
            a := a*(-1)^(op(2,f)-1) ;
        end do:
        return a;
    end proc: # R. J. Mathar, May 20 2017
  • Mathematica
    a[n_] := (-1)^(PrimeOmega[n] - PrimeNu[n]); Array[a, 100] (* Jean-François Alcover, Apr 24 2017, after Reinhard Zumkeller *)
  • PARI
    a(n)=my(f=factor(n)[,2]); prod(i=1,#f,-(-1)^f[i]) \\ Charles R Greathouse IV, Mar 09 2015
    
  • Python
    from sympy import factorint
    from operator import mul
    def a(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [(-1)**(f[i] - 1) for i in f]) # Indranil Ghosh, May 20 2017
    
  • Python
    from functools import reduce
    from sympy import factorint
    def A162511(n): return -1 if reduce(lambda a,b:~(a^b), factorint(n).values(),0)&1 else 1 # Chai Wah Wu, Jan 01 2023

Formula

Multiplicative function with a(p^e)=(-1)^(e-1) for any prime p and any positive exponent e.
a(n) = 1 when n is a squarefree number (A005117).
From Reinhard Zumkeller, Jul 08 2009 (Start)
a(n) = (-1)^(A001222(n)-A001221(n)).
a(A162644(n)) = +1; a(A162645(n)) = -1. (End)
a(n) = A076479(n) * A008836(n). - R. J. Mathar, Mar 30 2011
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A307868. - Amiram Eldar, Sep 18 2022
Dirichlet g.f.: Product_{p prime} ((p^s + 2)/(p^s + 1)). - Amiram Eldar, Oct 26 2023

A245195 a(n) = 2^A014081(n).

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 2, 4, 1, 1, 1, 2, 2, 2, 4, 8, 1, 1, 1, 2, 1, 1, 2, 4, 2, 2, 2, 4, 4, 4, 8, 16, 1, 1, 1, 2, 1, 1, 2, 4, 1, 1, 1, 2, 2, 2, 4, 8, 2, 2, 2, 4, 2, 2, 4, 8, 4, 4, 4, 8, 8, 8, 16, 32, 1, 1, 1, 2, 1, 1, 2, 4, 1, 1, 1, 2, 2, 2, 4, 8, 1, 1, 1, 2, 1, 1, 2, 4, 2, 2, 2, 4, 4, 4, 8, 16, 2, 2, 2, 4, 2
Offset: 0

Views

Author

N. J. A. Sloane, Jul 24 2014

Keywords

Comments

This sequence provides a bridge between A245180 (and, presumably, A160239) and A014081.
See A245196 for more about this class of sequences.
Run length transform of A011782: 1,1,2,4,8,16,32,64,... - Chai Wah Wu, Oct 19 2016

Crossrefs

Programs

  • Maple
    # This Maple program applies more generally to a sequence where the recurrence across a block is as follows. The parameters to be set are the sequence G(0), G(1), G(2), ... (the final terms in the blocks), and the multiplier m.
    # For n in the range 2^(k-1) <= n < 2^k, write n = 2^k-2^r+j, with 0 <= r <= k-1 and 0 <= j < 2^(r-1), and j=0 if r=0. Then
    # (if j=0) a(2^k-2^r) = G(k-r-1),
    # (if j>0) a(2^k-2^r+j) = m*G(k-r-1)*a(j).
    # Since Maple gives its lists an offset of 1, it is necessary to add 1 to the arguments of G.
    # For the present sequence, G(n)=2^n and m=1.
    G:=[seq(2^n,n=0..30)];
    m:=1;
    f:=proc(n) option remember; global m,G; local k,r,j,np;
    if n <= 2 then G[0+1] elif n=3 then G[1+1]
    elif n=4 then G[0+1] elif n=5 then m*G[0+1] elif n=6 then G[1+1] elif n=7 then G[2+1]
    else
       k:=1+floor(log[2](n)); np:=2^k-n;
       if np=1 then r:=0; j:=0; else r:=1+floor(log[2](np-1)); j:=2^r-np; fi;
       if j=0 then G[k-r-1+1]; else m*G[k-r-1+1]*f(j); fi;
    fi;
    end;
    [seq(f(n),n=1..520)]:
    # Setting G(n) = A083424(n) and m = 8 gives A245180. Setting G(n) = 2^n and m = 2 gives A048896.
    A245195:=n->add(binomial(n,2*k)*binomial(n,k) mod 2, k=0..floor(n/2)): seq(A245195(n), n=0..200); # Wesley Ivan Hurt, Nov 01 2016
  • Mathematica
    Table[Sum[Mod[Binomial[n, 2 k] Binomial[n, k], 2], {k, 0, n}], {n, 0, 85}] (* Michael De Vlieger, Oct 21 2016 *)
  • PARI
    a(n) = 2^hammingweight(bitand(n, n>>1)) \\ Charles R Greathouse IV, Jul 16 2016
    
  • PARI
    a(n) = sum(k=0, n, binomial(n, 2*k)*binomial(n,k) % 2); \\ Michel Marcus, Oct 21 2016
    
  • Python
    from _future_ import division
    def A277560(n):
        return sum(int(not (~n & 2*k) | (~n & k)) for k in range(n//2+1))
    
  • Python
    def A245195(n): return 1<<(n&(n>>1)).bit_count() # Chai Wah Wu, Feb 11 2023

Formula

The entries may be arranged into blocks of sizes 1,2,4,8,...:
B_0: 1,
B_1: 1, 2,
B_2: 1, 1, 2, 4,
B_3: 1, 1, 1, 2, 2, 2, 4, 8,
B_4: 1, 1, 1, 2, 1, 1, 2, 4, 2, 2, 2, 4, 4, 4, 8, 16,
B_5: 1, 1, 1, 2, 1, 1, 2, 4, 1, 1, 1, 2, 2, 2, 4, 8, 2, 2, 2, 4, 2, 2, 4, 8, 4, 4, 4, 8, 8, 8, 16, 32,
...
Consider the block B_{k-1} containing terms a(2^(k-1)), a(2^(k-1)+1), ..., a(2^k-1). It is convenient to index the terms working backwards from the next, 2^k-th, term. For n in the range 2^(k-1) <= n < 2^k, write n = 2^k-2^r+j, with 0 <= r <= k-1 and 0 <= j < 2^(r-1), and j=0 if r=0. Then
(if j=0) a(2^k-2^r) = 2^(k-r-1),
(if j>0) a(2^k-2^r+j) = 2^(k-r-1)*a(j).
a(n) = A162510(A005940(1+n)). - Antti Karttunen, Oct 29 2016
From Robert Israel, Nov 02 2016: (Start)
a(2*k) = a(k).
a(4*k+1) = a(k).
a(4*k+3) = 2*a(2*k+1).
G.f. g(x) satisfies g(x) = x + (2*x+1)*g(x^2) - x*g(x^4). (End)
Also, a(n) = Sum_{k=0..floor(n/2)} ((binomial(n,2k)*binomial(n,k)) mod 2). - Chai Wah Wu, Oct 19 2016 and Robert Israel, Nov 04 2016. For proof, see the article by Chai Wah Wu, Sums of products of binomial coefficients mod 2 and run length transforms of sequences, arXiv:1610.06166, or the Robert Israel link.

Extensions

Changed offset to 0, merged former entry A277560 from Chai Wah Wu (Oct 19 2016) with this sequence. - N. J. A. Sloane, Nov 05 2016

A162512 Dirichlet inverse of A162511.

Original entry on oeis.org

1, -1, -1, 2, -1, 1, -1, -4, 2, 1, -1, -2, -1, 1, 1, 8, -1, -2, -1, -2, 1, 1, -1, 4, 2, 1, -4, -2, -1, -1, -1, -16, 1, 1, 1, 4, -1, 1, 1, 4, -1, -1, -1, -2, -2, 1, -1, -8, 2, -2, 1, -2, -1, 4, 1, 4, 1, 1, -1, 2, -1, 1, -2, 32, 1, -1, -1, -2, 1, -1, -1, -8, -1, 1, -2, -2, 1, -1, -1, -8, 8, 1
Offset: 1

Views

Author

Gerard P. Michon, Jul 05 2009, Jul 06 2009

Keywords

Comments

The absolute value of this sequence is A162510.
The Moebius function (A008683) can be defined in terms of this sequence: A008683(n) is equal to a(n) if a(n) is odd and zero otherwise.

Crossrefs

Programs

  • Maple
    A162512 := proc(n)
        local a,f;
        a := 1;
        for f in ifactors(n)[2] do
            a := -a*(-2)^(op(2,f)-1) ;
        end do:
        return a;
    end proc:
    seq(A162512(n),n=1..100) ; # R. J. Mathar, May 20 2017
  • Mathematica
    b[n_] := (-1)^(PrimeOmega[n] - PrimeNu[n]);
    a[n_] := a[n] = If[n == 1, 1, -Sum[b[n/d] a[d], {d, Most@ Divisors[n]}]];
    Array[a, 100] (* Jean-François Alcover, Feb 17 2020 *)
  • PARI
    a(n) = my(f=factor(n)); for(i=1, #f~, f[i,1]=-(-2)^(f[i,2]-1); f[i,2]=1); factorback(f); \\ Michel Marcus, May 20 2017
    
  • Python
    from sympy import factorint
    from operator import mul
    def a(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [-(-2)**(f[i] - 1) for i in f]) # Indranil Ghosh, May 20 2017
    
  • Scheme
    (define (A162512 n) (if (= 1 n) n (* (- (expt -2 (- (A067029 n) 1))) (A162512 (A028234 n))))) ;; Antti Karttunen, May 20 2017, after the given multiplicative formula.

Formula

Multiplicative function with a(p^e)=-(-2)^(e-1) for any prime p and any positive exponent e.
a(n) = n/2 when n is a power of 4 (A000302).
a(n) = A008683(n) when n is a squarefree number (A005117).
Dirichlet g.f.: Product_{p prime} ((p^s + 1)/(p^s + 2)). - Amiram Eldar, Oct 26 2023

A292589 a(n) = A046523(A003557(n)) = A003557(A046523(n)); the least representative of the prime signature of {n divided by largest squarefree divisor of n}.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 4, 2, 1, 1, 2, 1, 1, 1, 8, 1, 2, 1, 2, 1, 1, 1, 4, 2, 1, 4, 2, 1, 1, 1, 16, 1, 1, 1, 6, 1, 1, 1, 4, 1, 1, 1, 2, 2, 1, 1, 8, 2, 2, 1, 2, 1, 4, 1, 4, 1, 1, 1, 2, 1, 1, 2, 32, 1, 1, 1, 2, 1, 1, 1, 12, 1, 1, 2, 2, 1, 1, 1, 8, 8, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 2, 1, 1, 1, 16, 1, 2, 2, 6, 1, 1, 1, 4, 1
Offset: 1

Views

Author

Antti Karttunen, Sep 27 2017

Keywords

Examples

			For n = 18 = 2 * 3^2, A003557(18) = 3^1. The least representative of the same prime signature is 2^1, thus a(18) = 2.
For n = 27 = 3^3, A003557(27) = 9 = 3^2. The least representative of the same prime signature is 2^2, thus a(27) = 4.
		

Crossrefs

Differs from A162510 for the first time at n=36 where a(36) = 6, while A162510(36) = 4.

Formula

a(n) = A046523(A003557(n)) = A003557(A046523(n)).

A335073 a(n) = Sum_{k=1..n} 2^(bigomega(k) - omega(k)).

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 8, 12, 14, 15, 16, 18, 19, 20, 21, 29, 30, 32, 33, 35, 36, 37, 38, 42, 44, 45, 49, 51, 52, 53, 54, 70, 71, 72, 73, 77, 78, 79, 80, 84, 85, 86, 87, 89, 91, 92, 93, 101, 103, 105, 106, 108, 109, 113, 114, 118, 119, 120, 121, 123, 124, 125, 127
Offset: 1

Views

Author

Daniel Suteu, May 22 2020

Keywords

Comments

Partial sums of A162510.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; uses numtheory; `if`(n<1, 0,
          2^(bigomega(n)-nops(factorset(n)))+a(n-1))
        end:
    seq(a(n), n=1..70);  # Alois P. Heinz, May 22 2020
  • Mathematica
    Accumulate[Table[2^(PrimeOmega[n]-PrimeNu[n]),{n,70}]] (* Harvey P. Dale, Aug 14 2020 *)
  • PARI
    a(n) = sum(k=1, n, 2^(bigomega(k) - omega(k)));

Formula

a(n) = Sum_{k=1..n} A008683(k) * A069205(floor(n/k)).
a(n) = Sum_{k=1..n} A061142(k) * A002321(floor(n/k)).

A328892 If n = Product (p_j^k_j) then a(n) = Sum (2^(k_j - 1)).

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 4, 2, 2, 1, 3, 1, 2, 2, 8, 1, 3, 1, 3, 2, 2, 1, 5, 2, 2, 4, 3, 1, 3, 1, 16, 2, 2, 2, 4, 1, 2, 2, 5, 1, 3, 1, 3, 3, 2, 1, 9, 2, 3, 2, 3, 1, 5, 2, 5, 2, 2, 1, 4, 1, 2, 3, 32, 2, 3, 1, 3, 2, 3, 1, 6, 1, 2, 3, 3, 2, 3, 1, 9, 8, 2, 1, 4, 2, 2, 2, 5, 1, 4
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 29 2019

Keywords

Examples

			a(72) = 6 because 72 = 2^3 * 3^2 and 2^(3 - 1) + 2^(2 - 1) = 6.
		

Crossrefs

Cf. A000040 (positions of 1's), A008481, A011782, A162510, A324910.

Programs

  • Maple
    a:= n-> add(2^(i[2]-1), i=ifactors(n)[2]):
    seq(a(n), n=1..100);  # Alois P. Heinz, Oct 29 2019
  • Mathematica
    a[1] = 0; a[n_] := Plus @@ (2^(#[[2]] - 1) & /@ FactorInteger[n]); Table[a[n], {n, 1, 90}]
  • PARI
    a(n)={vecsum([2^(k-1) | k<-factor(n)[,2]])} \\ Andrew Howroyd, Oct 29 2019

Formula

If n = Product (p_j^k_j) then a(n) = Sum ordered partition(k_j).
Additive with a(p^e) = 2^(e-1).
Showing 1-8 of 8 results.