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 2056 results. Next

A060818 a(n) = 2^(n - HammingWeight(n)) = 2^(n - BitCount(n)) = 2^(n - A000120(n)).

Original entry on oeis.org

1, 1, 2, 2, 8, 8, 16, 16, 128, 128, 256, 256, 1024, 1024, 2048, 2048, 32768, 32768, 65536, 65536, 262144, 262144, 524288, 524288, 4194304, 4194304, 8388608, 8388608, 33554432, 33554432, 67108864, 67108864, 2147483648, 2147483648, 4294967296
Offset: 0

Views

Author

Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 29 2001

Keywords

Comments

a(n) is the size of the Sylow 2-subgroup of the symmetric group S_n.
Also largest power of 2 which is a factor of n! and (apart from a(3)) the largest perfect power which is a factor of n!.
Denominator of e(n,n) (see Maple line).
Denominator of the coefficient of x^n in n-th Legendre polynomial; numerators are in A001790. - Benoit Cloitre, Nov 29 2002

Examples

			G.f. = 1 + x + 2*x^2 + 2*x^3 + 8*x^4 + 8*x^5 + 16*x^6 + 16*x^7 + 128*x^8 + ...
e(n,n) sequence begins 1, 1, 3/2, 5/2, 35/8, 63/8, 231/16, 429/16, 6435/128, 12155/128, 46189/256, ... .
		

Crossrefs

a(n) = A046161([n/2]).
Row sums of triangle A100258.

Programs

  • Magma
    [1] cat [Denominator(Catalan(n)/2^n): n in [0..50]]; // Vincenzo Librandi, Sep 01 2014
    (Python 3.10+)
    def A060818(n): return 1<Chai Wah Wu, Jul 11 2022
  • Maple
    e := proc(l,m) local k; add(2^(k-2*m) * binomial(2*m-2*k,m-k) * binomial(m+k,m) * binomial(k,l), k=l..m); end;
    A060818 := proc(n) option remember; `if`(n=0,1,2^(padic[ordp](n,2))*A060818(n-1)) end: seq(A060818(i), i=0..34); # Peter Luschny, Nov 16 2012
    HammingWeight := n -> add(convert(n, base, 2)):
    seq(2^(n - HammingWeight(n)), n = 0..34); # Peter Luschny, Mar 23 2024
  • Mathematica
    Table[GCD[w!, 2^w], {w, 100}]
    (* Second program, more efficient *)
    Array[2^(# - DigitCount[#, 2, 1]) &, 35, 0] (* Michael De Vlieger, Mar 23 2024 *)
  • PARI
    {a(n) = denominator( polcoeff( pollegendre(n), n))};
    
  • PARI
    {a(n) = if( n<0, 0, 2^sum(k=1, n, n\2^k))};
    
  • PARI
    { for (n=0, 200, s=0; d=2; while (n>=d, s+=n\d; d*=2); write("b060818.txt", n, " ", 2^s); ) } \\ Harry J. Smith, Jul 12 2009
    
  • Sage
    def A060818(n):
        A005187 = lambda n: A005187(n//2) + n if n > 0 else 0
        return 2^A005187(n//2)
    [A060818(i) for i in (0..34)]  # Peter Luschny, Nov 16 2012
    

Formula

a(n) = 2^(floor(n/2) + floor(n/4) + floor(n/8) + floor(n/16) + ...).
a(n) = 2^(A011371(n)).
a(n) = gcd(n!, 2^n). - Labos Elemer, Apr 22 2003
a(n) = denominator(L(n)) with rational L(n):=binomial(2*n,n)/2^n. L(n) is the leading coefficient of the Legendre polynomial P_n(x).
L(n) = (2*n-1)!!/n!, with the double factorial (2*n-1)!! = A001147(n), n>=0.
a(n) = Product_{i=1..n} A006519(i). - Tom Edgar, Apr 30 2014
a(n) = (n! XOR floor(n!/2)) XOR (n!-1 XOR floor((n!-1)/2)). - Gary Detlefs, Jun 13 2014
a(n) = denominator(Catalan(n-1)/2^(n-1)) for n>0. - Vincenzo Librandi, Sep 01 2014
a(2*n) = a(2*n+1) = 2^n*a(n). - Robert Israel, Sep 01 2014
a(n) = n!*A063079(n+1)/A334907(n). - Petros Hadjicostas, May 16 2020

Extensions

Additional comments from Henry Bottomley, May 01 2001
New name from Peter Luschny, Mar 23 2024

A130665 a(n) = Sum_{k=0..n} 3^wt(k), where wt() = A000120().

Original entry on oeis.org

1, 4, 7, 16, 19, 28, 37, 64, 67, 76, 85, 112, 121, 148, 175, 256, 259, 268, 277, 304, 313, 340, 367, 448, 457, 484, 511, 592, 619, 700, 781, 1024, 1027, 1036, 1045, 1072, 1081, 1108, 1135, 1216, 1225, 1252, 1279, 1360, 1387, 1468, 1549, 1792, 1801, 1828, 1855
Offset: 0

Views

Author

N. J. A. Sloane, based on a message from Don Knuth, Jun 23 2007

Keywords

Comments

Partial sums of A048883. - David Applegate, Jun 11 2009
From Gary W. Adamson, Aug 26 2016: (Start)
The formula of Mar 26 2010 is equivalent to the left-shifted vector of matrix powers (lim_{k->infinity} M^k), of the production matrix M:
1, 0, 0, 0, 0, 0, ...
4, 0, 0, 0, 0, 0, ...
3, 1, 0, 0, 0, 0, ...
0, 4, 0, 0, 0, 0, ...
0, 3, 1, 0, 0, 0, ...
0, 0, 4, 0, 0, 0, ...
0, 0, 3, 1, 0, 0, ...
...
The sequence divided by its aerated variant is (1, 4, 3, 0, 0, 0, ...). (End)

Crossrefs

Programs

  • Haskell
    a130665 = sum . map (3 ^) . (`take` a000120_list) . (+ 1)
    -- Reinhard Zumkeller, Apr 18 2012
    
  • Maple
    u:=3; a[1]:=1; M:=30; for n from 1 to M do a[2*n] := (u+1)*a[n]; a[2*n+1] := u*a[n] + a[n+1]; od; t1:=[seq( a[n], n=1..2*M )]; # Gives sequence with a different offset
  • Mathematica
    f[n_] := Sum[3^Count[ IntegerDigits[k, 2], 1], {k, 0, n}]; Array[f, 51, 0] (* Robert G. Wilson v, Jun 28 2010 *)
  • Python
    def a(n):  # formula version, n=10^10000 takes ~1 second
        if n == 0:
            return 1
        msb = 1 << (n.bit_length() - 1)
        return msb**2 + 3 * a(n-msb) # Stefan Pochmann, Mar 15 2023
    
  • Python
    def a(n):  # optimized, n=10^50000 takes ~1 second
        n += 1
        total = 0
        power3 = 1
        while n:
            log = n.bit_length() - 1
            total += power3 << (2*log)
            n -= 1 << log
            power3 *= 3
        return total # Stefan Pochmann, Mar 15 2023

Formula

With a different offset: a(1) = 1; a(n) = max { 3*a(k)+a(n-k) | 1 <= k <= n/2 }, for n>1.
a(2n+1) = 4*a(n) and a(2n) = 3*a(n-1) + a(n).
a(n) = (A147562(n+1) - 1)*3/4 + 1. - Omar E. Pol, Nov 08 2009
a(n) = A160410(n+1)/4. - Omar E. Pol, Nov 12 2009
Let r(x) = (1 + 4x + 3x^2), then (1 + 4x + 7x^2 + 16x^3 + ...) =
r(x)* r(x^2) * r(x^4) * r(x^8) * ... - Gary W. Adamson, Mar 26 2010
For asymptotics see the discussion in the comments in A006046. - N. J. A. Sloane, Mar 11 2021
a(n) = Sum_{k=0..floor(log_2(n+1))} 3^k * A360189(n,k). - Alois P. Heinz, Mar 06 2023
a(n) = msb^2 + 3*a(n-msb), where msb = A053644(n). - Stefan Pochmann, Mar 15 2023

Extensions

Simpler definition (and new offset) from David Applegate, Jun 11 2009
Lower limit of sum in definition changed from 1 to 0 by Robert G. Wilson v, Jun 28 2010

A175522 A000120-perfect numbers.

Original entry on oeis.org

2, 25, 95, 111, 119, 123, 125, 169, 187, 219, 221, 247, 289, 335, 365, 411, 415, 445, 485, 493, 505, 629, 655, 685, 695, 697, 731, 767, 815, 841, 871, 943, 949, 965, 985, 1003, 1139, 1207, 1241, 1261, 1263, 1273, 1343, 1387, 1465, 1469, 1507, 1513, 1529, 1563
Offset: 1

Views

Author

Vladimir Shevelev, Dec 03 2010

Keywords

Comments

Let A(n), n>=1, be an infinite positive sequence.
We call a number n:
A-deficient if Sum{d|n, d
A-abundant if Sum{d|n, d A(n),
and
A-perfect if Sum{d|n, d
depending on the sum over the proper divisors of n.
The definition generalizes the standard nomenclature of deficient (A005100), abundant (A005101) and perfect numbers (A000396), which is recovered by setting A(n) = n = A000027(n).
Conjecture: if there exist infinitely many A-deficient numbers and infinitely many A-abundant numbers, then there exist infinitely many A-perfect numbers.
Note that the sequence contains squares of all Fermat primes larger than 3 (see A019434). [This would also hold for squares of any hypothetical Fermat primes after the fifth one, 65537. Comment clarified by Antti Karttunen, May 14 2015]
A192895(a(n)) = 0. - Reinhard Zumkeller, Jul 12 2011

Examples

			Proper divisors of 119 are 1,7,17. Since A000120(1)+A000120(7)+A000120(17)=A000120(119), then 119 is in the sequence.
		

Crossrefs

Cf. A175524 (deficient version), A175526 (abundant version), A000120, A000396.
Subsequence of A257691 (non-abundant version).
Positions of zeros in A192895.

Programs

  • Haskell
    import Data.List (elemIndices)
    a175522 n = a175522_list !! (n-1)
    a175522_list = map (+ 1) $ elemIndices 0 a192895_list
    -- Reinhard Zumkeller, Jul 12 2011
    
  • Mathematica
    binw[n_] := DigitCount[n, 2, 1]; Select[Range[1500], binw[#] == DivisorSum[#, binw[#1] &]/2 &] (* Amiram Eldar, Dec 14 2020 *)
  • PARI
    is(n)=sumdiv(n,d,hammingweight(d))==2*hammingweight(n) \\ Charles R Greathouse IV, Jan 28 2016
    
  • Python
    from sympy import divisors
    def A000120(n): return bin(n).count('1')
    def aupto(limit):
      alst = []
      for m in range(1, limit+1):
        if A000120(m) == sum(A000120(d) for d in divisors(m)[:-1]): alst += [m]
      return alst
    print(aupto(1563)) # Michael S. Branicky, Feb 25 2021
  • Sage
    A000120 = lambda x: x.digits(base=2).count(1)
    is_A175522 = lambda x: sum(A000120(d) for d in divisors(x)) == 2*A000120(x)
    A175522 = filter(is_A175522, IntegerRange(1, 10**4))
    # D. S. McNeil, Dec 04 2010
    

Extensions

More terms from Amiram Eldar, Feb 18 2019

A057335 a(0) = 1, and for n > 0, a(n) = A000040(A000120(n)) * a(floor(n/2)); essentially sequence A055932 generated using A000120, hence sorted by number of factors.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 18, 30, 16, 24, 36, 60, 54, 90, 150, 210, 32, 48, 72, 120, 108, 180, 300, 420, 162, 270, 450, 630, 750, 1050, 1470, 2310, 64, 96, 144, 240, 216, 360, 600, 840, 324, 540, 900, 1260, 1500, 2100, 2940, 4620, 486, 810, 1350, 1890, 2250, 3150, 4410
Offset: 0

Author

Alford Arnold, Aug 27 2000

Keywords

Comments

Note that for n>0 the prime divisors of a(n) are consecutive primes starting with 2. All of the least prime signatures (A025487) are included; with the other values forming A056808.
Using the formula, terms of b(n)= a(n)/A057334(n) are: 1, 1, 2, 2, 4, 4, 6, 6, 8, ..., indeed a(n) repeated. - Michel Marcus, Feb 09 2014
a(n) is the unique normal number whose unsorted prime signature is the k-th composition in standard order (graded reverse-lexicographic). This composition (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. A number is normal if its prime indices cover an initial interval of positive integers. Unsorted prime signature is the sequence of exponents in a number's prime factorization. - Gus Wiseman, Apr 19 2020

Examples

			From _Gus Wiseman_, Apr 19 2020: (Start)
The sequence of terms together with their prime indices begins:
      1: {}
      2: {1}
      4: {1,1}
      6: {1,2}
      8: {1,1,1}
     12: {1,1,2}
     18: {1,2,2}
     30: {1,2,3}
     16: {1,1,1,1}
     24: {1,1,1,2}
     36: {1,1,2,2}
     60: {1,1,2,3}
     54: {1,2,2,2}
     90: {1,2,2,3}
    150: {1,2,3,3}
    210: {1,2,3,4}
     32: {1,1,1,1,1}
     48: {1,1,1,1,2}
For example, the 27th composition in standard order is (1,2,1,1), and the normal number with prime signature (1,2,1,1) is 630 = 2*3*3*5*7, so a(27) = 630.
(End)
		

Crossrefs

Cf. A324939.
Unsorted prime signature is A124010.
Numbers whose prime signature is aperiodic are A329139.
The reversed version is A334031.
A partial inverse is A334032.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Sum is A070939.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Aperiodic compositions are A328594.
- Normal compositions are A333217.
- Permutations are A333218.
- Heinz number is A333219.
Related to A019565 via A122111 and to A000079 via A336321.

Programs

  • Mathematica
    Table[Times @@ Map[If[# == 0, 1, Prime@ #] &, Accumulate@ IntegerDigits[n, 2]], {n, 0, 54}] (* Michael De Vlieger, May 23 2017 *)
  • PARI
    mg(n) = if (n==0, 1, prime(hammingweight(n))); \\ A057334
    lista(nn) = {my(v = vector(nn)); v[1] = 1; for (i=2, nn, v[i] = mg(i-1)*v[(i+1)\2];); v;} \\ Michel Marcus, Feb 09 2014
    
  • PARI
    A057335(n) = if(0==n,1,prime(hammingweight(n))*A057335(n\2)); \\ Antti Karttunen, Jul 20 2020

Formula

a(n) = A057334(n) * a (repeated).
A334032(a(n)) = n; a(A334032(n)) = A071364(n). - Gus Wiseman, Apr 19 2020
a(n) = A122111(A019565(n)); A019565(n) = A122111(a(n)). - Peter Munn, Jul 18 2020
a(n) = A336321(2^n). - Peter Munn, Mar 04 2022
Sum_{n>=0} 1/a(n) = Sum_{n>=0} 1/A005867(n) = 2.648101... (A345974). - Amiram Eldar, Jun 26 2025

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 29 2003
New primary name from Antti Karttunen, Jul 20 2020

A228085 a(n) = number of distinct k which satisfy n = k + wt(k), where wt(k) (A000120) gives the number of 1's in binary representation of a nonnegative integer k.

Original entry on oeis.org

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

Author

Antti Karttunen, Aug 09 2013

Keywords

Comments

wt(k) is also called bitcount(k).
a(n) = number of times n occurs in A092391.
The first 2 occurs at n = A230303(2) = 5 (as we have two solutions A092391(3) = A092391(4) = 5).
The first 3 occurs at n = A230303(3) = 129 (as we have three solutions A092391(123) = A092391(124) = A092391(128) = 129).
The first 4 occurs at n = A230303(4) = 4102, where we have solutions A092391(4091) = A092391(4092) = A092391(4099) = A092391(4100) = 4102.
For n>=1, a(2^n) = a(n-1) since an integer k = m is a solution to n-1 = m + wt(m) if and only if k = 2^n - 1 - m is a solution to 2^n = k + wt(k). - Max Alekseyev, Feb 23 2021

Crossrefs

A010061 gives the position of zeros, A228082 the positions of nonzeros, A228088 the positions of ones.
Cf. A000120, A010062, A092391, A228086, A228087, A228091 (positions of 2's), A227643, A230058, A230092 (positions of 3's), A230093, A227915 (positions of 4's), A070939, A230303.

Programs

  • Haskell
    a228085 n = length $ filter ((== n) . a092391) [n - a070939 n .. n]
    -- Reinhard Zumkeller, Oct 13 2013
  • Maple
    For Maple code see A230091. - N. J. A. Sloane, Oct 10 2013
    # Find all inverses of m under x -> x + wt(x) - N. J. A. Sloane, Oct 19 2013
    A000120 := proc(n) local w, m, i; w := 0; m := n; while m > 0 do i := m mod 2; w := w+i; m := (m-i)/2; od; w; end: wt := A000120;
    F:=proc(m) local ans,lb,n,i;
    lb:=m-ceil(log(m+1)/log(2)); ans:=[];
    for n from max(1,lb) to m do if (n+wt(n)) = m then ans:=[op(ans),n]; fi; od:
    [seq(ans[i],i=1..nops(ans))];
    end;
  • Mathematica
    nmax = 8191; Clear[a]; a[_] = 0;
    Scan[Set[a[#[[1]]], #[[2]]]&, Tally[Table[n + DigitCount[n, 2, 1], {n, 0, nmax}]]];
    a /@ Range[0, nmax] (* Jean-François Alcover, Oct 29 2019 *)
    a[n_] := Module[{k, cnt = 0}, For[k = n - Floor[Log[2, n]] - 1, k < n, k++, If[n == k + DigitCount[k, 2, 1], cnt++]]; cnt];
    a /@ Range[0, 100] (* Jean-François Alcover, Nov 28 2020 *)

A284005 a(0) = 1, and for n > 1, a(n) = (1 + A000120(n))*a(floor(n/2)); also a(n) = A000005(A283477(n)).

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 18, 24, 16, 24, 36, 48, 54, 72, 96, 120, 32, 48, 72, 96, 108, 144, 192, 240, 162, 216, 288, 360, 384, 480, 600, 720, 64, 96, 144, 192, 216, 288, 384, 480, 324, 432, 576, 720, 768, 960, 1200, 1440, 486, 648, 864, 1080, 1152, 1440, 1800, 2160, 1536, 1920, 2400, 2880, 3000
Offset: 0

Author

Antti Karttunen, Mar 18 2017

Keywords

Crossrefs

Similar recurrences: A124758, A243499, A329369, A341392.

Programs

  • Mathematica
    Table[DivisorSigma[0, #] &@ Apply[Times, Map[#1^#2 & @@ # &, FactorInteger[#] /. {p_, e_} /; e == 1 :> {Times @@ Prime@ Range@ PrimePi@ p, e}]] &[Times @@ Prime@ Flatten@ Position[#, 1] &@ Reverse@ IntegerDigits[n, 2]], {n, 0, 71}] (* Michael De Vlieger, Mar 18 2017 *)
  • PARI
    A284005(n) = numdiv(A283477(n)); \\ edited by Michel Marcus, May 01 2019, M. F. Hasler, Nov 10 2019
    
  • PARI
    a(n) = my(k=if(n,logint(n,2)),s=1); prod(i=0,k, s+=bittest(n,k-i)); \\ Kevin Ryde, Jan 20 2021
  • Scheme
    (define (A284005 n) (A000005 (A283477 n)))
    

Formula

a(n) = A000005(A283477(n)).
Conjecture: a(n) = 2*a(f(n)) + Sum_{k=0..floor(log_2(n))-1} a(f(n) + 2^k*(1 - T(n,k))) for n > 1 with a(0) = 1, a(1) = 2, f(n) = A053645(n), T(n,k) = floor(n/2^k) mod 2. - Mikhail Kurkov, Nov 10 2019
From Mikhail Kurkov, Aug 23 2021: (Start)
a(2n+1) = a(n) + a(2n) for n >= 0.
a(2n) = a(n) + a(2n - 2^A007814(n)) for n > 0 with a(0) = 1. (End)
Conjecture: a(n) = Sum_{k=0..n} (binomial(n, k) mod 2)*A329369(k). In other words, this sequence is modulo 2 binomial transform of A329369. - Mikhail Kurkov, Mar 10 2023
Conjecture: a(2^m*(2n+1)) = Sum_{k=0..m+1} binomial(m+1, k)*a(2^k*n) for m >= 0, n >= 0 with a(0) = 1. - Mikhail Kurkov, Apr 24 2023

Extensions

Made Mikhail Kurkov's Nov 10 2019 formula the new primary name of this sequence - Antti Karttunen, Dec 30 2020

A175526 A000120-abundant numbers.

Original entry on oeis.org

4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 26, 27, 28, 30, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 81, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 96, 98, 99, 100, 102, 104, 105, 106, 108, 110, 112, 114, 115, 116, 117, 118, 120
Offset: 1

Author

Vladimir Shevelev, Dec 03 2010

Keywords

Comments

Definition see in A175522. All even numbers > 2 are in the sequence.
A192895(a(n)) > 0. Reinhard Zumkeller, Jul 12 2011

Crossrefs

Cf. A175522 (perfect version), A175524 (deficient version), A257691 (complement, non-abundant version).
Cf. also A005100, A005101.
a(n) differs from A091212(n) and from A205783(n+1) for the first time at n=37, where a(37) = 55, while 55 is missing from both A091212 and A205783.
Differs from A192506 for the first time at n=54, where a(54) = 77, while 77 is missing from A192506.

Programs

  • Haskell
    import Data.List (findIndices)
    a175526 n = a175526_list !! (n-1)
    a175526_list = map (+ 1) $ findIndices (> 0) a192895_list
    -- Reinhard Zumkeller, Jul 12 2011
    
  • Maple
    isA175526 := proc(n) s := 0 ; for d in (numtheory[divisors](n) minus {n}) do s := s+A000120(d) ; end do: evalb(s> A000120(n)) ; end proc:
    for n from 1 to 120 do if isA175526(n) then printf("%d,",n); end if; end do: # R. J. Mathar, Jul 11 2011
  • Mathematica
    okQ[n_] := DivisorSum[n, Total[IntegerDigits[#, 2]]*(-1)^Boole[#==n]&]>0; Select[Range[120], okQ] (* Jean-François Alcover, Dec 06 2015 *)
  • PARI
    A192895(n) = sumdiv(n, d, hammingweight(d)*(-1)^(d==n)); \\ Charles R Greathouse IV, Feb 07 2013
    isA175526(n) = (A192895(n) > 0);
    n = 0; i = 0; while(i < 10000, n++; if(isA175526(n), i++; write("b175526.txt", i, " ", n)));
    \\ Antti Karttunen, May 11 2015
    
  • PARI
    is(n)=sumdiv(n,d,hammingweight(d))>2*hammingweight(n) \\ Charles R Greathouse IV, Jan 28 2016
  • Sage
    is_A175526 = lambda x: sum(A000120(d) for d in divisors(x)) > 2*A000120(x)
    A175526 = filter(is_A175526, IntegerRange(1, 10**4))
    # D. S. McNeil, Dec 04 2010
    

A341392 a(n) = A284005(n) / (1 + A000120(n))!.

Original entry on oeis.org

1, 1, 2, 1, 4, 2, 3, 1, 8, 4, 6, 2, 9, 3, 4, 1, 16, 8, 12, 4, 18, 6, 8, 2, 27, 9, 12, 3, 16, 4, 5, 1, 32, 16, 24, 8, 36, 12, 16, 4, 54, 18, 24, 6, 32, 8, 10, 2, 81, 27, 36, 9, 48, 12, 15, 3, 64, 16, 20, 4, 25, 5, 6, 1, 64, 32, 48, 16, 72, 24, 32, 8, 108, 36, 48, 12, 64, 16, 20, 4, 162, 54, 72, 18, 96, 24, 30, 6, 128
Offset: 0

Author

Mikhail Kurkov, Feb 10 2021 [verification needed]

Keywords

Comments

From Antti Karttunen, Feb 10 2021: (Start)
This sequence can be represented as a binary tree. Each child to the left is obtained by multiplying its parent with (1+{binary weight of its breadth-first-wise index in the tree}), while each child to the right is just a clone of its parent:
1
|
...................1...................
2 1
4......../ \........2 3......../ \........1
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
8 4 6 2 9 3 4 1
16 8 12 4 18 6 8 2 27 9 12 3 16 4 5 1
etc.
(End)
This sequence and A243499 have the same set of values on intervals from 2^m to 2^(m+1) - 1 for m >= 0. - Mikhail Kurkov, Jun 18 2021 [verification needed]
FindStat provides a sequence of mappings between this sequence and A000110 starting from collection [Set partitions] (see Links section for illustration). - Mikhail Kurkov, May 20 2023 [verification needed]

Crossrefs

Cf. A000120, A000142, A007814, A036987, A053645, A243499, A284005, A329369 (similar recurrence).

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1,
          a(iquo(n, 2, 'd'))*`if`(d=1, 1, add(i, i=Bits[Split](n+1))))
        end:
    seq(a(n), n=0..120);  # Alois P. Heinz, Jun 23 2021
  • Mathematica
    Array[DivisorSigma[0, Apply[Times, Map[#1^#2 & @@ # &, FactorInteger[#1] /. {p_, e_} /; e == 1 :> {Times @@ Prime@ Range@ PrimePi@ p, e}]]]/#2 & @@ {Times @@ Prime@ Flatten@ Position[#, 1] &@ Reverse@ #, (1 + Count[#, 1])!} &@ IntegerDigits[#, 2] &, 89, 0] (* Michael De Vlieger, Feb 24 2021 *)
  • PARI
    A284005(n) = { my(k=if(n, logint(n, 2)), s=1); prod(i=0, k, s+=bittest(n, k-i)); }; \\ From A284005
    A341392(n) = (A284005(n)/((1 + hammingweight(n))!)); \\ Antti Karttunen, Feb 10 2021
    
  • PARI
    A341392(n) = if(!n,1,if(n%2, A341392((n-1)/2), (1+hammingweight(n))*A341392(n/2))); \\ Antti Karttunen, Feb 10 2021

Formula

a(n) = A284005(n) / (1 + A000120(n))! = A284005(n) / A000142(1 + A000120(n)).
a(2n+1) = a(n) for n >= 0.
a(2n) = (1 + A000120(n))*a(n) = A243499(2*A059894(n)) = a(n) + a(2n - 2^A007814(n)) for n > 0 with a(0) = 1.
[2*a(n) - 1 = A329369(n)] = A036987(A053645(n)).
From Mikhail Kurkov, Apr 24 2023: (Start)
a(2^m*(2n+1)) = Sum_{k=0..m} binomial(m, k)*a(2^k*n) for m >= 0, n >= 0 with a(0) = 1.
a(n) = a(f(n)) + Sum_{k=0..floor(log_2(n))-1} (1 - T(n, k))*a(f(n) + 2^k*(1 - T(n, k))) for n > 1 with a(0) = 1, a(1) = 1, where f(n) = A053645(n) and where T(n, k) = floor(n/2^k) mod 2. (End) [verification needed]

A192895 A000120-deficiency of n.

Original entry on oeis.org

-1, 0, -1, 1, -1, 2, -2, 2, 1, 2, -2, 5, -2, 2, 1, 3, -1, 6, -2, 5, 3, 2, -3, 8, 0, 2, 1, 6, -3, 10, -4, 4, 4, 2, 3, 11, -2, 2, 2, 8, -2, 12, -3, 6, 7, 2, -4, 11, 1, 6, 1, 6, -3, 10, 1, 10, 2, 2, -4, 19, -4, 2, 5, 5, 4, 12, -2, 5, 4, 12, -3, 16, -2, 2, 8, 6
Offset: 1

Author

Reinhard Zumkeller, Jul 12 2011

Keywords

Crossrefs

Cf. A257691 (positions where a(n) <= 0), A294905 (and its char.fun).

Programs

  • Haskell
    a192895 n =
       sum (map a000120 $ filter ((== 0) . (mod n)) [1..n-1]) - a000120 n
    a192895_list = map a192895 [1..]
    
  • Mathematica
    a[n_] := DivisorSum[n, Total[IntegerDigits[#, 2]]*(-1)^Boole[# == n]&]; Array[a, 80] (* Jean-François Alcover, Dec 05 2015, adapted from PARI *)
  • PARI
    a(n)=sumdiv(n,d,hammingweight(d)*(-1)^(d==n)) \\ Charles R Greathouse IV, Feb 07 2013
    
  • Python
    from sympy import divisors
    def A192895(n): return sum((d.bit_count() if dChai Wah Wu, Jul 25 2023

Formula

a(n) = Sum(A000120(d): 1 <= d < n and n mod d = 0) - A000120(n); see A175522 for motivation and more information;
a(A175524(n)) < 0; a(A175522(n)) = 0; a(A175526(n)) > 0.
a(n) = A292257(n) - A000120(n). - Antti Karttunen, Nov 10 2017

A213723 a(n) = smallest natural number x such that x=n+A000120(x), otherwise zero.

Original entry on oeis.org

0, 2, 0, 4, 6, 0, 0, 8, 10, 0, 12, 14, 0, 0, 0, 16, 18, 0, 20, 22, 0, 0, 24, 26, 0, 28, 30, 0, 0, 0, 0, 32, 34, 0, 36, 38, 0, 0, 40, 42, 0, 44, 46, 0, 0, 0, 48, 50, 0, 52, 54, 0, 0, 56, 58, 0, 60, 62, 0, 0, 0, 0, 0, 64, 66, 0, 68, 70, 0, 0, 72, 74, 0, 76, 78
Offset: 0

Author

Antti Karttunen, Nov 01 2012

Keywords

Examples

			a(1) = 2, as 2 is the smallest natural number such that x such that x=1+A000120(x) (as 2=1+A000120(2)=1+1).
a(2) = 0, as there are no solutions for 2, because it belongs to A055938.
a(11) = 14, as 14 is the smallest natural number x such that x=11+A000120(x) (as 14=11+A000120(14)=11+3).
		

Crossrefs

a(A055938(n)) = 0. a(A005187(n)) = A005843(n) = 2n.
Cf. A213724. Used for computing A213725-A213727. Cf. A179016.

Programs

Formula

a(n) = 2*A213714(n).
Also, by partitioning into sums of distinct nonzero terms of A000225: if n can be formed as a sum of (2^a)-1 + (2^b)-1 + (2^c)-1, etc. where the exponents a, b, c are distinct and all > 0, then a(n) = 2^a + 2^b + 2^c, etc. If this is not possible, then n is one of the terms of A055938, and a(n)=0.
Previous Showing 11-20 of 2056 results. Next