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 41-50 of 77 results. Next

A038461 Sums of 10 distinct powers of 2.

Original entry on oeis.org

1023, 1535, 1791, 1919, 1983, 2015, 2031, 2039, 2043, 2045, 2046, 2559, 2815, 2943, 3007, 3039, 3055, 3063, 3067, 3069, 3070, 3327, 3455, 3519, 3551, 3567, 3575, 3579, 3581, 3582, 3711, 3775, 3807, 3823, 3831, 3835, 3837, 3838, 3903
Offset: 1

Views

Author

Keywords

Crossrefs

Base 2 interpretation of A038452.
Cf. A000079, A018900, A014311, A014312, A014313, A023688, A023689, A023690, A023691 (Hamming weight = 1, 2, ..., 9).

Programs

  • Mathematica
    Select[Range[4000], DigitCount[#, 2, 1] == 10 &] (* Amiram Eldar, Feb 14 2022 *)
  • PARI
    isok(n) = hammingweight(n) == 10; \\ Michel Marcus, Feb 29 2016
    
  • Python
    from itertools import islice
    def A038461_gen(): # generator of terms
        yield (n:=1023)
        while True: yield (n:=n^((a:=-n&n+1)|(a>>1)) if n&1 else ((n&~(b:=n+(a:=n&-n)))>>a.bit_length())^b)
    A038461_list = list(islice(A038461_gen(),20)) # Chai Wah Wu, Mar 10 2025

Formula

Sum_{n>=1} 1/a(n) = 1.386312271262110321181505974797071257205562524228381227122302929089588534920... (calculated using Baillie's irwinSums.m, see Links). - Amiram Eldar, Feb 14 2022

Extensions

Offset changed to 1 by Ivan Neretin, Feb 28 2016

A091889 Number of partitions of n into sums of exactly two distinct powers of 2.

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 0, 1, 3, 2, 2, 5, 2, 3, 8, 4, 6, 12, 6, 11, 16, 11, 16, 24, 17, 23, 34, 26, 35, 50, 35, 50, 67, 55, 72, 93, 76, 99, 126, 112, 135, 171, 150, 186, 229, 210, 249, 304, 280, 336, 398, 380, 443, 526, 499, 584, 680, 665, 759, 886, 858, 985, 1136, 1123
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 10 2004

Keywords

Examples

			a(9)=3: 9 = (2^3+2^0) = (2^2+2^1)+(2^1+2^0) = (2^1+2^0)+(2^1+2^0)+(2^1+2^0).
		

Crossrefs

Programs

  • Mathematica
    With[{max = 64}, m = Select[Range[max], DigitCount[#, 2, 1] == 2 &]; a[n_] := Length@ IntegerPartitions[n, n, m]; Array[a, max]] (* Amiram Eldar, Aug 01 2023 *)

A091891 Number of partitions of n into parts which are a sum of exactly as many distinct powers of 2 as n has 1's in its binary representation.

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 2, 1, 10, 3, 2, 1, 5, 1, 2, 1, 36, 6, 12, 1, 11, 3, 2, 1, 24, 3, 3, 1, 5, 1, 2, 1, 202, 67, 55, 9, 93, 4, 5, 1, 112, 8, 13, 1, 10, 3, 2, 1, 304, 22, 18, 1, 20, 3, 3, 1, 34, 3, 3, 1, 5, 1, 2, 1, 1828, 1267, 1456, 71, 1629, 77, 100, 2, 2342, 99, 123, 9, 132, 4, 3, 1
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 10 2004

Keywords

Examples

			a(9) = 3 because there are 3 partitions of 9 into parts of size 3, 5, 6, 9 which are the numbers that have two 1's in their binary representations. The 3 partitions are: 9, 6 + 3 and 3 + 3 + 3. - _Andrew Howroyd_, Apr 20 2021
		

Crossrefs

Programs

  • Maple
    H:= proc(n) option remember; add(i, i=Bits[Split](n)) end:
    v:= proc(n, k) option remember; `if`(n<1, 0,
          `if`(H(n)=k, n, v(n-1, k)))
        end:
    b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, v(i-1, k), k)+b(n-i, v(min(n-i, i), k), k)))
        end:
    a:= n-> b(n$2, H(n)):
    seq(a(n), n=0..80);  # Alois P. Heinz, Dec 12 2021
  • Mathematica
    etr[p_] := Module[{b}, b[n_] := b[n] = If[n == 0, 1, Sum[Sum[d*p[d], {d, Divisors[j]}] b[n - j], {j, 1, n}]/n]; b];
    EulerT[v_List] := With[{q = etr[v[[#]]&]}, q /@ Range[Length[v]]];
    a[n_] := EulerT[Table[DigitCount[k, 2, 1] == DigitCount[n, 2, 1] // Boole, {k, 1, n}]][[n]];
    Array[a, 100] (* Jean-François Alcover, Dec 12 2021, after Andrew Howroyd *)
  • PARI
    EulerT(v)={Vec(exp(x*Ser(dirmul(v,vector(#v,n,1/n))))-1, -#v)}
    a(n) = {EulerT(vector(n,k,hammingweight(k)==hammingweight(n)))[n]} \\ Andrew Howroyd, Apr 20 2021

Formula

a(A000079(n)) = A018819(n);
a(A018900(n)) = A091889(n);
a(A014311(n)) = A091890(n);
a(A091892(n)) = 1.

Extensions

a(0)=1 prepended by Alois P. Heinz, Dec 12 2021

A092429 a(n) = n! * Sum_{i,j,k,l >= 0, i+j+k+l = n} 1/(i!*j!*k!*l!).

Original entry on oeis.org

1, 1, 3, 10, 47, 126, 522, 1821, 8143, 26326, 109958, 396111, 1737122, 5998955, 24949277, 91979985, 397402223, 1418993350, 5881338702, 22010456331, 94022106862, 342803313261, 1416758002487, 5356198979731, 22685035586290, 83911052895151, 345921828889367
Offset: 0

Views

Author

Benoit Cloitre, Mar 22 2004

Keywords

Comments

a(n) is even iff n is a sum of 2 distinct powers of 2.

Crossrefs

Column k=4 of A226873. - Alois P. Heinz, Jun 21 2013

Programs

  • Maple
    b:= proc(n, i, t) option remember;
          `if`(t=1, 1/n!, add(b(n-j, j, t-1)/j!, j=i..n/t))
        end:
    a:= n-> n!*b(n, 0, 4):
    seq(a(n), n=0..30);  # Alois P. Heinz, Sep 21 2017
  • Mathematica
    Table[Sum[Sum[Sum[Sum[If[i+j+k+l==n,n!/i!/j!/k!/l!,0],{l,0,k}],{k,0,j}],{j,0,i}],{i,0,n}],{n,0,20}] (* Vaclav Kotesovec, Jul 01 2013 *)
    CoefficientList[Series[(HypergeometricPFQ[{},{},x]^4 +6*HypergeometricPFQ[{},{},x]^2 *HypergeometricPFQ[{},{1},x^2] +8*HypergeometricPFQ[{},{},x] *HypergeometricPFQ[{},{1,1},x^3] +3*HypergeometricPFQ[{},{1},x^2]^2 +6*HypergeometricPFQ[{},{1,1,1},x^4])/24, {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec after Vladeta Jovovic, Jul 01 2013 *)
  • PARI
    a(n)=sum(i=0,n,sum(j=0,i,sum(k=0,j,sum(l=0,k,if(i+j+k+l-n,0,n!/i!/j!/k!/l!)))))

Formula

E.g.f.: (t(1)^4 + 6*t(1)^2*t(2) + 8*t(1)*t(3) + 3*t(2)^2 + 6*t(4))/24 where t(1) = hypergeom([],[],x), t(2) = hypergeom([],[1],x^2), t(3) = hypergeom([],[1,1],x^3) and t(4) = hypergeom([],[1,1,1],x^4). - Vladeta Jovovic, Sep 22 2007, typo corrected by Vaclav Kotesovec, Jul 01 2013
Conjecture: a(n) ~ 4^n/4!. - Vaclav Kotesovec, Mar 07 2014

A110202 a(n) = sum of squares of numbers < 2^n having exactly 2 ones in their binary representation.

Original entry on oeis.org

0, 9, 70, 395, 1984, 9429, 43434, 196095, 872788, 3842729, 16773118, 72693075, 313158312, 1342144509, 5726557522, 24338016935, 103078952956, 435222828369, 1832518331046, 7696579297275, 32252336887120, 134873417951909
Offset: 1

Views

Author

Paul D. Hanna, Jul 16 2005

Keywords

Comments

Equals column 2 of triangle A110200.

Examples

			For n=4, the sum of the squares of numbers < 2^4
having exactly 2 ones in their binary digits is:
a(4) = 3^2 + 5^2 + 6^2 + 9^2 + 10^2 + 12^2 = 395.
		

Crossrefs

Cf. A110200 (triangle), A110201 (central terms), A002450 (column 1), A110203 (column 3), A110204 (column 4), A018900.

Programs

  • Mathematica
    nn=30;With[{c=Union[FromDigits[#,2]&/@(Flatten[Table[Join[ {1},#]&/@ Permutations[Join[{1},PadRight[{},n,0]]],{n,0,nn}],1])]}, Table[ Total[ Select[c,#<2^n&]^2],{n,nn}]] (* Harvey P. Dale, Jan 27 2013 *)
  • PARI
    a(n)=polcoeff(x^2*(9-38*x+32*x^2)/((1-x)^2*(1-2*x)*(1-4*x)^2+x*O(x^n)),n)

Formula

G.f.: x^2*(9-38*x+32*x^2)/( (1-x)^2*(1-2*x)*(1-4*x)^2 ). a(n) = Sum_{k|A018900(k)<2^n} A018900(k)^2.

A151758 G.f.: Theta^2-Theta, where Theta = Sum_{k>=0} x^(2^k).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jun 22 2009

Keywords

Comments

If we omit the "-x" term and divide by 2, we get the characteristic function of the numbers with binary weight 2 (A018900, A151774).

Crossrefs

Programs

  • Mathematica
    w[n_] := IntegerDigits[n, 2] // Total;
    a[n_] := If[n == 1, -1, 2 Boole[w[n] == 2]];
    a /@ Range[0, 104] (* Jean-François Alcover, Mar 31 2021 *)

A179951 Decimal expansion of Sum_{k has exactly two bits equal to 1 in base 2} 1/k.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Aug 03 2010

Keywords

Comments

Obviously for k > 0 in base 2 having no bit equal to 1 the sum is 0 and for 1 bit equal to 1 the sum is 2.

Examples

			Sum_{k>0} 1/A018900(k) = 1.52899956069688841838263949451...
		

Crossrefs

Programs

  • Maple
     evalf( 2*add( (-1)^(n+1)*((4^n + 1)/(4^n - 1))*(1/2)^(n^2), n = 1..18), 100); # Peter Bala, Jan 28 2022
  • Mathematica
    (* first install irwinSums.m, see either reference, then *) First@ RealDigits@ iSum[1, 2, 2^7, 2]

Formula

Equals Sum_{j>=1} Sum_{i=0..j-1} 1/(2^i + 2^j).
From Amiram Eldar, Jun 30 2020: (Start)
Equals Sum_{k>=0} 1/(2^k + 1/2).
Equals 2 * A323482 - 1. (End)
Equals 2*Sum_{n >= 1} (-1)^(n+1)*((4^n + 1)/(4^n - 1))*(1/2)^(n^2). The first 18 terms of the series gives the constant correct to more than 100 decimal places. - Peter Bala, Jan 28 2022

A038462 Sums of 11 distinct powers of 2.

Original entry on oeis.org

2047, 3071, 3583, 3839, 3967, 4031, 4063, 4079, 4087, 4091, 4093, 4094, 5119, 5631, 5887, 6015, 6079, 6111, 6127, 6135, 6139, 6141, 6142, 6655, 6911, 7039, 7103, 7135, 7151, 7159, 7163, 7165, 7166, 7423, 7551, 7615, 7647, 7663, 7671
Offset: 1

Views

Author

Keywords

Crossrefs

Base 2 interpretation of A038453.
Cf. A000079, A018900, A014311, A014312, A014313, A023688, A023689, A023690, A023691, A038461 (Hamming weight = 1, 2, ..., 10).

Programs

  • Mathematica
    Select[Range[8000], DigitCount[#, 2, 1] == 11 &] (* Amiram Eldar, Feb 14 2022 *)
  • Python
    from itertools import islice
    def A038462_gen(): # generator of terms
        yield (n:=2047)
        while True: yield (n:=n^((a:=-n&n+1)|(a>>1)) if n&1 else ((n&~(b:=n+(a:=n&-n)))>>a.bit_length())^b)
    A038462_list = list(islice(A038462_gen(),20)) # Chai Wah Wu, Mar 10 2025

Formula

Sum_{n>=1} 1/a(n) = 1.386300330514503033229968047555778179200262625510401687087371496738972082061... (calculated using Baillie's irwinSums.m, see Links). - Amiram Eldar, Feb 14 2022

Extensions

Offset changed to 1 by Ivan Neretin, Feb 28 2016

A211362 Inversion sets of finite permutations interpreted as binary numbers.

Original entry on oeis.org

0, 1, 4, 3, 6, 7, 32, 33, 20, 11, 22, 15, 48, 41, 52, 43, 30, 31, 56, 57, 60, 59, 62, 63, 512, 513, 516, 515, 518, 519, 288, 289, 148, 75, 150, 79, 304, 297, 180, 107, 158, 95, 312, 313, 188, 123, 190, 127, 768, 769, 644, 579, 646, 583, 800
Offset: 0

Views

Author

Tilman Piesk, Jun 03 2012

Keywords

Comments

Each finite permutation has a finite inversion set. The possible elements of the inversion sets are 2-element subsets of the integers, which can be ordered in an infinite sequence (compare A018900). Thus the inversion set can be represented by a binary vector, which can be interpreted as a binary number.
This sequence shows these numbers for the finite permutations in reverse colexicographic order (A055089, A195663). The corresponding inversion vectors are found in A007623. The corresponding inversion numbers (A034968) are the digit sums of the inversion vectors and the cardinality of the inversion sets, an thus also the binary digit sums of the numbers in this sequence.
This sequence is not monotonic. The permutation A211363 shows how the elements of this sequence (a) are ordered. a*A211363 gives the elements of a ordered by size.

Examples

			The 4th finite permutation (2,3,1,4,...) has the inversion set {(1,3),(2,3)}. This set represented by a vector is (0,1,1,zeros...). This vector interpreted as a number is 6. So a(4)=6.
The 23rd finite permutation (4,3,2,1,...) has the inversion set {(1,2),(1,3),(2,3),(1,4),(2,4),(3,4)}. This set represented by a vector is (1,1,1,1,1,1,zeros...). This vector interpreted as a number is 63. So a(23)=63.
Beginning of corresponding array:
n    permutation   inversion set    a(n)
00     1 2 3 4     0  0 0  0 0 0     0
01     2 1 3 4     1  0 0  0 0 0     1
02     1 3 2 4     0  0 1  0 0 0     4
03     3 1 2 4     1  1 0  0 0 0     3
04     2 3 1 4     0  1 1  0 0 0     6
05     3 2 1 4     1  1 1  0 0 0     7
06     1 2 4 3     0  0 0  0 0 1    32
07     2 1 4 3     1  0 0  0 0 1    33
08     1 4 2 3     0  0 1  0 1 0    20
09     4 1 2 3     1  1 0  1 0 0    11
10     2 4 1 3     0  1 1  0 1 0    22
11     4 2 1 3     1  1 1  1 0 0    15
12     1 3 4 2     0  0 0  0 1 1    48
13     3 1 4 2     1  0 0  1 0 1    41
14     1 4 3 2     0  0 1  0 1 1    52
15     4 1 3 2     1  1 0  1 0 1    43
16     3 4 1 2     0  1 1  1 1 0    30
17     4 3 1 2     1  1 1  1 1 0    31
18     2 3 4 1     0  0 0  1 1 1    56
19     3 2 4 1     1  0 0  1 1 1    57
20     2 4 3 1     0  0 1  1 1 1    60
21     4 2 3 1     1  1 0  1 1 1    59
22     3 4 2 1     0  1 1  1 1 1    62
23     4 3 2 1     1  1 1  1 1 1    63
		

Crossrefs

A337758 G.f. A(x) satisfies: [x^n] (1 + n*x + n*x^2 - A(x))^(n+1) = 0, for n > 0.

Original entry on oeis.org

1, 3, 8, 41, 284, 2594, 29420, 395845, 6109724, 105714438, 2017696504, 41979555034, 943466064072, 22739452659420, 584304270694436, 15928490898945133, 458761105965272316, 13910124960218668430, 442657291681105692624, 14744175994124292681518, 512800784035081173166088
Offset: 1

Views

Author

Paul D. Hanna, Oct 24 2020

Keywords

Comments

Compare to: [x^n] (1 + n*x - C(x))^(n+1) = 0, for n>0, where C(x) = x + C(x)^2 is a g.f. of the Catalan numbers (A000108).
Compare to: [x^n] (1 + n*x - W(x))^n = 0, for n>0, where W(x) = Sum_{n>=1} (n-1)^(n-1)*x^n/n! = 1 + x/LambertW(-x).

Examples

			G.f.: A(x) = x + 3*x^2 + 8*x^3 + 41*x^4 + 284*x^5 + 2594*x^6 + 29420*x^7 + 395845*x^8 + 6109724*x^9 + 105714438*x^10 + 2017696504*x^11 + ...
ILLUSTRATION OF DEFINITION.
The table of coefficients of x^k in (1 + n*x + n*x^2 - A(x))^(n+1) begins:
n=0: [1, -1, -3, -8, -41, -284, -2594, -29420, -395845, ...];
n=1: [1, 0, -4, -16, -78, -536, -4960, -57048, -775089, ...];
n=2: [1, 3, 0, -29, -171, -1071, -9124, -100590, -1334241, ...];
n=3: [1, 8, 24, 0, -340, -2504, -19032, -189408, -2368430, ...];
n=4: [1, 15, 95, 290, 0, -5327, -46335, -409770, -4606315, ...];
n=5: [1, 24, 252, 1472, 4614, 0, -103528, -1028952, -10296567, ...];
n=6: [1, 35, 546, 4949, 27972, 90244, 0, -2388773, -26537259, ...];
n=7: [1, 48, 1040, 13376, 112344, 627280, 2083504, 0, -63579020, ...];
n=8: [1, 63, 1809, 31260, 360765, 2901258, 16172964, 55276020, 0, ...]; ...
in which the main diagonal is all zeros after the initial term, illustrating that [x^n] (1 + n*x + n*x^2 - A(x))^(n+1) = 0, for n > 0.
ODD TERMS.
The odd terms seem to occur only at positions equal to powers of 2: a(1), a(2), a(4), a(8), a(16), ...; the odd terms begin: [1, 3, 41, 395845, 15928490898945133, 490833755530209698774408313021523960879357, ...].
RELATED SERIES.
B(x) = 1/(1 - A(x)) = 1 + x + 4*x^2 + 15*x^3 + 76*x^4 + 478*x^5 + 3868*x^6 + 39675*x^7 + 498120*x^8 + 7351430*x^9 + 123503516*x^10 + 2309531318*x^11 + ...
where [x^n] (1 + n*(x + x^2)*B(x))^(n+1) / B(x)^(n+1) = 0 for n > 0.
Series_Reversion(A(x)) = x - 3*x^2 + 10*x^3 - 56*x^4 + 268*x^5 - 2104*x^6 + 7636*x^7 - 129976*x^8 - 369988*x^9 - 19147364*x^10 - 279267684*x^11 - ...
		

Crossrefs

Programs

  • PARI
    {a(n) = my(A=[1],m=1); for(i=1,n, A=concat(A,0);
    m=#A; A[#A] = polcoeff( (1 + m*x + m*x^2 - x*Ser(A))^(m+1), m)/(m+1) );A[n]}
    for(n=1,30,print1(a(n),", "))

Formula

a(n) is odd iff n is a power of 2 (conjecture).
a(n) = 2 (mod 4) iff n is twice the sum of two distinct powers of 2 (conjecture).
Previous Showing 41-50 of 77 results. Next