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

A005009 a(n) = 7*2^n.

Original entry on oeis.org

7, 14, 28, 56, 112, 224, 448, 896, 1792, 3584, 7168, 14336, 28672, 57344, 114688, 229376, 458752, 917504, 1835008, 3670016, 7340032, 14680064, 29360128, 58720256, 117440512, 234881024, 469762048, 939524096, 1879048192, 3758096384
Offset: 0

Views

Author

Keywords

Comments

The first differences are the sequence itself. - Alexandre Wajnberg & Eric Angelini, Sep 07 2005

Crossrefs

Sequences of the form (2*m+1)*2^n: A000079 (m=0), A007283 (m=1), A020714 (m=2), this sequence (m=3), A005010 (m=4), A005015 (m=5), A005029 (m=6), A110286 (m=7), A110287 (m=8), A110288 (m=9), A175805 (m=10), A248646 (m=11), A164161 (m=12), A175806 (m=13), A257548 (m=15).
Row sums of (6, 1)-Pascal triangle A093563 and of (1, 6)-Pascal triangle A096956, n>=1.

Programs

Formula

G.f.: 7/(1-2*x).
a(n) = A118416(n+1,4) for n > 3. - Reinhard Zumkeller, Apr 27 2006
a(n) = 2*a(n-1), for n > 0, with a(0)=7 . - Philippe Deléham, Nov 23 2008
a(n) = 7 * A000079(n). - Omar E. Pol, Dec 16 2008
a(n) = A173787(n+3,n). - Reinhard Zumkeller, Feb 28 2010
Intersection of A014311 and A212191: all terms and their squares are the sum of exactly three distinct powers of 2, A000120(a(n)) = A000120(a(n)^2) = 3. - Reinhard Zumkeller, May 03 2012
G.f.: 2/x/G(0) - 1/x + 9, where G(k)= 1 + 1/(1 - x*(7*k+2)/(x*(7*k+9) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 03 2013
E.g.f.: 7*exp(2*x). - Stefano Spezia, May 15 2021

A052217 Numbers whose sum of digits is 3.

Original entry on oeis.org

3, 12, 21, 30, 102, 111, 120, 201, 210, 300, 1002, 1011, 1020, 1101, 1110, 1200, 2001, 2010, 2100, 3000, 10002, 10011, 10020, 10101, 10110, 10200, 11001, 11010, 11100, 12000, 20001, 20010, 20100, 21000, 30000, 100002, 100011, 100020, 100101
Offset: 1

Views

Author

Henry Bottomley, Feb 01 2000

Keywords

Comments

From Joshua S.M. Weiner, Oct 19 2012: (Start)
Sequence is a representation of the "energy states" of "multiplex" notation of 3 quantum of objects in a juggling pattern.
0 = an empty site, or empty hand. 1 = one object resides in the site. 2 = two objects reside in the site. 3 = three objects reside in the site. (See A038447.) (End)
A007953(a(n)) = 3; number of repdigits = #{3,111} = A242627(3) = 2. - Reinhard Zumkeller, Jul 17 2014
Can be seen as a table whose n-th row holds the n-digit terms {10^(n-1) + 10^m + 10^k, 0 <= k <= m < n}, n >= 1. Row lengths are then (1, 3, 6, 10, ...) = n*(n+1)/2 = A000217(n). The first and the n last terms of row n are 10^(n-1) + 2 resp. 2*10^(n-1) + 10^k, 0 <= k < n. - M. F. Hasler, Feb 19 2020

Crossrefs

Cf. A007953, A218043 (subsequence).
Row n=3 of A245062.
Other digit sums: A011557 (1), A052216 (2), A052218 (4), A052219 (5), A052220 (6), A052221 (7), A052222 (8), A052223 (9), A052224 (10), A166311 (11), A235151 (12), A143164 (13), A235225(14), A235226 (15), A235227 (16), A166370 (17), A235228 (18), A166459 (19), A235229 (20).
Other bases: A014311 (binary), A226636 (ternary), A179243 (Zeckendorf).
Cf. A003056, A002262 (triangular coordinates), A056556, A056557, A056558 (tetrahedral coordinates).

Programs

  • Haskell
    a052217 n = a052217_list !! (n-1)
    a052217_list = filter ((== 3) . a007953) [0..]
    -- Reinhard Zumkeller, Jul 17 2014
    
  • Magma
    [n: n in [1..100101] | &+Intseq(n) eq 3 ]; // Vincenzo Librandi, Mar 07 2013
    
  • Mathematica
    Union[FromDigits/@Select[Flatten[Table[Tuples[Range[0,3],n],{n,6}],1],Total[#]==3&]] (* Harvey P. Dale, Oct 20 2012 *)
    Select[Range[10^6], Total[IntegerDigits[#]] == 3 &] (* Vincenzo Librandi, Mar 07 2013 *)
    Union[Flatten[Table[FromDigits /@ Permutations[PadRight[s, 18]], {s, IntegerPartitions[3]}]]] (* T. D. Noe, Mar 08 2013 *)
  • PARI
    isok(n) = sumdigits(n) == 3; \\ Michel Marcus, Dec 28 2015
    
  • PARI
    apply( {A052217_row(n,s,t=-1)=vector(n*(n+1)\2,k,t++>s&&t=!s++;10^(n-1)+10^s+10^t)}, [1..5]) \\ M. F. Hasler, Feb 19 2020
    
  • Python
    from itertools import count, islice
    def agen(): yield from (10**i + 10**j + 10**k for i in count(0) for j in range(i+1) for k in range(j+1))
    print(list(islice(agen(), 40))) # Michael S. Branicky, May 14 2022
    
  • Python
    from math import comb, isqrt
    from sympy import integer_nthroot
    def A052217(n): return 10**((m:=integer_nthroot(6*n,3)[0])-(a:=n<=comb(m+2,3)))+10**((k:=isqrt(b:=(c:=n-comb(m-a+2,3))<<1))-((b<<2)<=(k<<2)*(k+1)+1))+10**(c-1-comb(k+(b>k*(k+1)),2)) # Chai Wah Wu, Dec 11 2024

Formula

T(n,k) = 10^(n-1) + 10^A003056(k) + 10^A002262(k) when read as a table with row lengths n*(n+1)/2, n >= 1, 0 <= k < n*(n+1)/2. - M. F. Hasler, Feb 19 2020
a(n) = 10^A056556(n-1) + 10^A056557(n-1) + 10^A056558(n-1). - Kevin Ryde, Apr 17 2021

Extensions

Offset changed from 0 to 1 by Vincenzo Librandi, Mar 07 2013

A337461 Number of pairwise coprime ordered triples of positive integers summing to n.

Original entry on oeis.org

0, 0, 0, 1, 3, 3, 9, 3, 15, 9, 21, 9, 39, 9, 45, 21, 45, 21, 87, 21, 93, 39, 87, 39, 153, 39, 135, 63, 153, 57, 255, 51, 207, 93, 225, 93, 321, 81, 291, 135, 321, 105, 471, 105, 393, 183, 381, 147, 597, 147, 531, 213, 507, 183, 759, 207, 621, 273, 621, 231
Offset: 0

Views

Author

Gus Wiseman, Sep 02 2020

Keywords

Examples

			The a(3) = 1 through a(9) = 9 triples:
  (1,1,1)  (1,1,2)  (1,1,3)  (1,1,4)  (1,1,5)  (1,1,6)  (1,1,7)
           (1,2,1)  (1,3,1)  (1,2,3)  (1,5,1)  (1,2,5)  (1,3,5)
           (2,1,1)  (3,1,1)  (1,3,2)  (5,1,1)  (1,3,4)  (1,5,3)
                             (1,4,1)           (1,4,3)  (1,7,1)
                             (2,1,3)           (1,5,2)  (3,1,5)
                             (2,3,1)           (1,6,1)  (3,5,1)
                             (3,1,2)           (2,1,5)  (5,1,3)
                             (3,2,1)           (2,5,1)  (5,3,1)
                             (4,1,1)           (3,1,4)  (7,1,1)
                                               (3,4,1)
                                               (4,1,3)
                                               (4,3,1)
                                               (5,1,2)
                                               (5,2,1)
                                               (6,1,1)
		

Crossrefs

A000212 counts the unimodal instead of coprime version.
A220377*6 is the strict case.
A307719 is the unordered version.
A337462 counts these compositions of any length.
A337563 counts the case of partitions with no 1's.
A337603 only requires the *distinct* parts to be pairwise coprime.
A337604 is the intersecting instead of coprime version.
A014612 ranks 3-part partitions.
A302696 ranks pairwise coprime partitions.
A327516 counts pairwise coprime partitions.
A333228 ranks compositions whose distinct parts are pairwise coprime.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n,{3}],CoprimeQ@@#&]],{n,0,30}]

A057168 Next larger integer with same binary weight (number of 1 bits) as n.

Original entry on oeis.org

2, 4, 5, 8, 6, 9, 11, 16, 10, 12, 13, 17, 14, 19, 23, 32, 18, 20, 21, 24, 22, 25, 27, 33, 26, 28, 29, 35, 30, 39, 47, 64, 34, 36, 37, 40, 38, 41, 43, 48, 42, 44, 45, 49, 46, 51, 55, 65, 50, 52, 53, 56, 54, 57, 59, 67, 58, 60, 61, 71, 62, 79, 95, 128, 66, 68, 69, 72, 70, 73, 75
Offset: 1

Views

Author

Marc LeBrun, Sep 14 2000

Keywords

Comments

Binary weight is given by A000120.

Examples

			a(6)=9 since 6 has two one-bits (i.e., 6=2+4) and 9 is the next higher integer of binary weight two (7 is weight three and 8 is weight one).
		

References

  • Donald Knuth, The Art of Computer Programming, Vol. 4A, section 7.1.3, exercises 20-21.

Crossrefs

Programs

  • Haskell
    a057168 n = a057168_list !! (n-1)
    a057168_list = f 2 $ tail a000120_list where
       f x (z:zs) = (x + length (takeWhile (/= z) zs)) : f (x + 1) zs
    -- Reinhard Zumkeller, Aug 26 2012
    
  • Mathematica
    a[n_] := (bw = DigitCount[n, 2, 1]; k = n+1; While[ DigitCount[k, 2, 1] != bw, k++]; k); Table[a[n], {n, 1, 71}](* Jean-François Alcover, Nov 28 2011 *)
  • PARI
    a(n)=my(u=bitand(n,-n),v=u+n);(bitxor(v,n)/u)>>2+v \\ Charles R Greathouse IV, Oct 28 2009
    
  • PARI
    A057168(n)=n+bitxor(n,n+n=bitand(n,-n))\n\4+n \\ M. F. Hasler, Aug 27 2014
    
  • Python
    def a(n): u = n&-n; v = u+n; return (((v^n)//u)>>2)+v
    print([a(n) for n in range(1, 72)]) # Michael S. Branicky, Jul 10 2022 after Charles R Greathouse IV
    
  • Python
    def A057168(n): return ((n&~(b:=n+(a:=n&-n)))>>a.bit_length())^b # Chai Wah Wu, Mar 06 2025

Formula

From Reinhard Zumkeller, Aug 18 2008: (Start)
a(A000079(n)) = A000079(n+1);
a(A000051(n)) = A052548(n);
a(A052548(n)) = A140504(n);
a(A000225(n)) = A055010(n);
a(A007283(n)) = A000051(n+2). (End)
a(n) = MIN{m: A000120(m)=A000120(n) and m>n}. - Reinhard Zumkeller, Aug 15 2009
For k,m>0, a((2^k-1)*2^m) = 2^(k+m)+2^(k-1)-1. - Chai Wah Wu, Mar 07 2025
If n is odd, then a(n) = XOR(n,OR(a,a/2)) where a = AND(-n,n+1). - Chai Wah Wu, Mar 08 2025

A007997 a(n) = ceiling((n-3)(n-4)/6).

Original entry on oeis.org

0, 0, 1, 1, 2, 4, 5, 7, 10, 12, 15, 19, 22, 26, 31, 35, 40, 46, 51, 57, 64, 70, 77, 85, 92, 100, 109, 117, 126, 136, 145, 155, 166, 176, 187, 199, 210, 222, 235, 247, 260, 274, 287, 301, 316, 330, 345, 361, 376, 392, 409, 425, 442, 460, 477, 495, 514, 532, 551, 571, 590, 610
Offset: 3

Views

Author

Keywords

Comments

Number of solutions to x+y+z=0 (mod m) with 0<=x<=y<=z
Nonorientable genus of complete graph on n nodes.
Also (with different offset) Molien series for alternating group A_3.
(1+x^3 ) / ((1-x)*(1-x^2)*(1-x^3)) is the Poincaré series [or Poincare series] (or Molien series) for H^*(S_6, F_2).
a(n+5) is the number of necklaces with 3 black beads and n white beads.
The g.f./x^5 is Z(C_3,x), the 3-variate cycle index polynomial for the cyclic group C_3, with substitution x[i]->1/(1-x^i), i=1,2,3. Therefore by Polya enumeration a(n+5) is the number of cyclically inequivalent 3-necklaces whose 3 beads are labeled with nonnegative integers such that the sum of labels is n, for n=0,1,2,... . See A102190 for Z(C_3,x). - Wolfdieter Lang, Feb 15 2005
a(n+1) is the number of pairs (x,y) with x and y in {0,...,n}, x = (y mod 3), and x+y < n. - Clark Kimberling, Jul 02 2012
From Gus Wiseman, Oct 17 2020: (Start)
Also the number of 3-part integer compositions of n - 2 that are either weakly increasing or strictly decreasing. For example, the a(5) = 1 through a(13) = 15 compositions are:
(111) (112) (113) (114) (115) (116) (117) (118) (119)
(122) (123) (124) (125) (126) (127) (128)
(222) (133) (134) (135) (136) (137)
(321) (223) (224) (144) (145) (146)
(421) (233) (225) (226) (155)
(431) (234) (235) (227)
(521) (333) (244) (236)
(432) (334) (245)
(531) (532) (335)
(621) (541) (344)
(631) (542)
(721) (632)
(641)
(731)
(821)
(End)

Examples

			For m=7 (n=12), the 12 solutions are xyz = 000 610 520 511 430 421 331 322 662 653 644 554.
		

References

  • A. Adem and R. J. Milgram, Cohomology of Finite Groups, Springer-Verlag, 2nd. ed., 2004, p. 204.
  • D. J. Benson, Polynomial Invariants of Finite Groups, Cambridge, 1993, p. 105.
  • J. L. Gross and T. W. Tucker, Topological Graph Theory, Wiley, 1987; see \bar{I}(n) p. 221.
  • J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 740.
  • E. V. McLaughlin, Numbers of factorizations in non-unique factorial domains, Senior Thesis, Allegeny College, Meadville, PA, 2004.

Crossrefs

Apart from initial term, same as A058212.
A001399(n-6)*2 = A069905(n-3)*2 = A211540(n-1)*2 counts the strict case.
A014311 intersected with A225620 U A333256 ranks these compositions.
A218004 counts these compositions of any length.
A000009 counts strictly decreasing compositions.
A000041 counts weakly increasing compositions.
A001523 counts unimodal compositions, with complement counted by A115981.
A007318 and A097805 count compositions by length.
A032020 counts strict compositions, ranked by A233564.
A333149 counts neither increasing nor decreasing strict compositions.

Programs

  • Haskell
    a007997 n = ceiling $ (fromIntegral $ (n - 3) * (n - 4)) / 6
    a007997_list = 0 : 0 : 1 : zipWith (+) a007997_list [1..]
    -- Reinhard Zumkeller, Dec 18 2013
    
  • Maple
    x^5*(1+x^3)/((1-x)*(1-x^2)*(1-x^3));
    seq(ceil(binomial(n,2)/3), n=0..63); # Zerinvary Lajos, Jan 12 2009
    a := n -> (n*(n-7)-2*([1,1,-1][n mod 3 +1]-7))/6;
    seq(a(n), n=3..64); # Peter Luschny, Jan 13 2015
  • Mathematica
    k = 3; Table[Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n, {n, k, 30}] (* Robert A. Russell, Sep 27 2004 *)
    Table[Ceiling[((n-3)(n-4))/6],{n,3,100}] (* or *) LinearRecurrence[ {2,-1,1,-2,1},{0,0,1,1,2},100] (* Harvey P. Dale, Jan 21 2014 *)
  • PARI
    a(n)=(n^2-7*n+16)\6 \\ Charles R Greathouse IV, Sep 24 2015

Formula

a(n) = a(n-3) + n - 2, a(0)=0, a(1)=0, a(2)=1 [Offset 0]. - Paul Barry, Jul 14 2004
G.f.: x^5*(1+x^3)/((1-x)*(1-x^2)*(1-x^3)) = x^5*(1-x+x^2)/((1-x)^2*(1-x^3)).
a(n+5) = Sum_{k=0..floor(n/2)} C(n-k,L(k/3)), where L(j/p) is the Legendre symbol of j and p. - Paul Barry, Mar 16 2006
a(3)=0, a(4)=0, a(5)=1, a(6)=1, a(7)=2, a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5). - Harvey P. Dale, Jan 21 2014
a(n) = (n^2 - 7*n + 14 - 2*(-1)^(2^(n + 1 - 3*floor((n+1)/3))))/6. - Luce ETIENNE, Dec 27 2014
a(n) = A001399(n-3) + A001399(n-6). Compare to A140106(n) = A001399(n-3) - A001399(n-6). - Gus Wiseman, Oct 17 2020
a(n) = (40 + 3*(n - 7)*n - 4*cos(2*n*Pi/3) - 4*sqrt(3)*sin(2*n*Pi/3))/18. - Stefano Spezia, Dec 14 2021
Sum_{n>=5} 1/a(n) = 6 - 2*Pi/sqrt(3) + 2*Pi*tanh(sqrt(5/3)*Pi/2)/sqrt(15). - Amiram Eldar, Oct 01 2022

A014312 Numbers with exactly 4 ones in binary expansion.

Original entry on oeis.org

15, 23, 27, 29, 30, 39, 43, 45, 46, 51, 53, 54, 57, 58, 60, 71, 75, 77, 78, 83, 85, 86, 89, 90, 92, 99, 101, 102, 105, 106, 108, 113, 114, 116, 120, 135, 139, 141, 142, 147, 149, 150, 153, 154, 156, 163, 165, 166, 169, 170, 172, 177, 178, 180, 184, 195, 197
Offset: 1

Author

Al Black (gblack(AT)nol.net)

Keywords

Crossrefs

Cf. A090706.
Cf. A000079, A018900, A014311, A014313, A023688, A023689, A023690, A023691 (Hamming weight = 1, 2, ..., 9), A057168.

Programs

  • Mathematica
    Select[ Range[ 180 ], (Count[ IntegerDigits[ #, 2 ], 1 ]==4)& ] (* Olivier Gérard *)
  • PARI
    for(n=0,10^3,if(hammingweight(n)==4,print1(n,", "))); \\ Joerg Arndt, Mar 04 2014
    
  • PARI
    print1(t=15); for(i=2, 50, print1(", "t=A057168(t))) \\ M. F. Hasler, Aug 27 2014
    
  • Perl
    $N = 4;
    my $vector = 2 ** $N - 1;  # first key (15)
    for (1..100) {
      print "$vector, ";
      my ($v, $d) = ($vector, 0);
      until ($v & 1 or !$v) { $d = ($d << 1)|1; $v >>= 1 }
      $vector += $d + 1 + (($v ^ ($v + 1)) >> 2);  # next key
    } # Ruud H.G. van Tol, Mar 02 2014
    
  • Python
    A014312_list = [2**a+2**b+2**c+2**d for a in range(3,6) for b in range(2,a) for c in range(1,b) for d in range(c)] # Chai Wah Wu, Jan 24 2021
    
  • Python
    from itertools import islice
    def A014312_gen(): # generator of terms
        yield (n:=15)
        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)
    A014312_list = list(islice(A014312_gen(),20)) # Chai Wah Wu, Mar 10 2025
    
  • Rust
    pub const fn next_choice(value: usize) -> usize {
      // Passing a term will return the next number in the sequence
      let zeros = value.trailing_zeros();
      let ones = (value >> zeros).trailing_ones();
      value + (1 << zeros) + (1 << (ones - 1)) - 1
    } // Andrew Bennett, Jan 07 2022

Formula

a(n+1) = A057168(a(n)). - M. F. Hasler, Aug 27 2014
a(n) = 2^A194882(n-1) + 2^A194883(n-1) + 2^A194884(n-1) + 2^A127324(n-1). - Ridouane Oudra, Sep 06 2020
Sum_{n>=1} 1/a(n) = 1.399770961748474333075618147113153558623203796657745865012742162098738541849... (calculated using Baillie's irwinSums.m, see Links). - Amiram Eldar, Feb 14 2022

Extensions

Extension by Olivier Gérard

A014313 Numbers with exactly 5 ones in binary expansion.

Original entry on oeis.org

31, 47, 55, 59, 61, 62, 79, 87, 91, 93, 94, 103, 107, 109, 110, 115, 117, 118, 121, 122, 124, 143, 151, 155, 157, 158, 167, 171, 173, 174, 179, 181, 182, 185, 186, 188, 199, 203, 205, 206, 211, 213, 214, 217, 218, 220, 227, 229, 230, 233, 234, 236, 241, 242
Offset: 1

Author

Al Black (gblack(AT)nol.net)

Keywords

Comments

Appears to give all n such that 4096 is the highest power of 2 dividing A005148(n). - Benoit Cloitre, Jun 22 2002

Crossrefs

Cf. A000079, A018900, A014311, A014312, A023688, A023689, A023690, A023691 (Hamming weight = 1, 2, ..., 9).

Programs

  • Haskell
    a014313 = f . a038447 where
       f x = if x == 0 then 0 else 2 * f x' + b  where (x', b) = divMod x 10
    -- Reinhard Zumkeller, Jan 06 2015
    
  • Mathematica
    Select[ Range[31, 240], Total[IntegerDigits[#, 2]] == 5&]
  • PARI
    sum_of_bits(n) = if(n<1, 0, sum_of_bits(floor(n/2))+n%2)
    isA014313(n) = (sum_of_bits(n) == 5); \\ Michael B. Porter, Oct 21 2009
    
  • PARI
    is(n)=hammingweight(n)==5 \\ Charles R Greathouse IV, Nov 17 2013
    
  • PARI
    print1(t=2^5-1); for(i=2, 50, print1(", "t=A057168(t))) \\ M. F. Hasler, Aug 27 2014
    
  • Python
    from itertools import islice
    def A014313_gen(): # generator of terms
        yield (n:=31)
        while True: yield (n:=((n&~(b:=n+(a:=n&-n)))>>a.bit_length())^b)
    A014313_list = list(islice(A014313_gen(),30)) # Chai Wah Wu, Mar 06 2025

Formula

a(n+1) = A057168(a(n)). - M. F. Hasler, Aug 27 2014
A038447(n) = A007088(a(n)). - Reinhard Zumkeller, Jan 06 2015
Sum_{n>=1} 1/a(n) = 1.390704528210321982529622080740025763242354253694629591331835888395977392151... (calculated using Baillie's irwinSums.m, see Links). - Amiram Eldar, Feb 14 2022

Extensions

Extension and program by Olivier Gérard

A337604 Number of ordered triples of positive integers summing to n, any two of which have a common divisor > 1.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 3, 1, 6, 0, 13, 0, 15, 7, 21, 0, 37, 0, 39, 16, 45, 0, 73, 6, 66, 28, 81, 0, 130, 6, 105, 46, 120, 21, 181, 6, 153, 67, 189, 12, 262, 6, 213, 118, 231, 12, 337, 21, 306, 121, 303, 12, 433, 57, 369, 154, 378, 18, 583, 30, 435, 217, 465
Offset: 0

Author

Gus Wiseman, Sep 20 2020

Keywords

Comments

The first relatively prime triple (15,10,6) is counted under a(31).

Examples

			The a(6) = 1 through a(15) = 7 triples (empty columns indicated by dots, A = 10):
  222  .  224  333  226  .  228  .  22A  339
          242       244     246     248  366
          422       262     264     266  393
                    424     282     284  555
                    442     336     2A2  636
                    622     363     428  663
                            426     446  933
                            444     464
                            462     482
                            624     626
                            633     644
                            642     662
                            822     824
                                    842
                                    A22
		

Crossrefs

A014311 intersected with A337666 ranks these compositions.
A337667 counts these compositions of any length.
A335402 lists the positions of zeros.
A337461 is the coprime instead of non-coprime version.
A337599 is the unordered version, with strict case A337605.
A337605*6 is the strict version.
A000741 counts relatively prime 3-part compositions.
A101268 counts pairwise coprime or singleton compositions.
A200976 and A328673 count pairwise non-relatively prime partitions.
A307719 counts pairwise coprime 3-part partitions.
A318717 counts pairwise non-coprime strict partitions.
A333227 ranks pairwise coprime compositions.

Programs

  • Mathematica
    stabQ[u_,Q_]:=Array[#1==#2||!Q[u[[#1]],u[[#2]]]&,{Length[u],Length[u]},1,And];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n,{3}],stabQ[#,CoprimeQ]&]],{n,0,100}]

A023689 Numbers with exactly 7 ones in binary expansion.

Original entry on oeis.org

127, 191, 223, 239, 247, 251, 253, 254, 319, 351, 367, 375, 379, 381, 382, 415, 431, 439, 443, 445, 446, 463, 471, 475, 477, 478, 487, 491, 493, 494, 499, 501, 502, 505, 506, 508, 575, 607, 623, 631, 635, 637, 638, 671, 687
Offset: 1

Keywords

Crossrefs

Cf. A000079, A018900, A014311, A014312, A014313, A023688, A023690, A023691 (Hamming weight = 1, 2, ..., 9), A057168.

Programs

  • Mathematica
    Select[ Range[ 127, 704 ], (Count[ IntegerDigits[ #, 2 ], 1 ]==7)& ]
  • PARI
    is_A023689(n)=hammingweight(n)==7 \\ M. F. Hasler, Aug 27 2014
    
  • PARI
    print1(t=2^7-1); for(i=2, 50, print1(", "t=A057168(t))) \\ M. F. Hasler, Aug 27 2014
    
  • Python
    from itertools import islice
    def A023689_gen(): # generator of terms
        yield (n:=127)
        while True: yield (n:=((n&~(b:=n+(a:=n&-n)))>>a.bit_length())^b)
    A023689_list =  list(islice(A023689_gen(),30)) # Chai Wah Wu, Mar 06 2025

Formula

a(n+1) = A057168(a(n)). - M. F. Hasler, Aug 27 2014
Sum_{n>=1} 1/a(n) = 1.386779022721502147026318489565477811900220906277367947393004721391094590038... (calculated using Baillie's irwinSums.m, see Links). - Amiram Eldar, Feb 14 2022

A023690 Numbers with exactly 8 ones in binary expansion.

Original entry on oeis.org

255, 383, 447, 479, 495, 503, 507, 509, 510, 639, 703, 735, 751, 759, 763, 765, 766, 831, 863, 879, 887, 891, 893, 894, 927, 943, 951, 955, 957, 958, 975, 983, 987, 989, 990, 999, 1003, 1005, 1006, 1011, 1013, 1014, 1017
Offset: 1

Keywords

Crossrefs

Cf. A000079, A018900, A014311, A014312, A014313, A023688, A023689, A023691 (Hamming weight = 1, 2, ..., 9), A057168.

Programs

  • Mathematica
    Select[ Range[ 255, 1024 ], (Count[ IntegerDigits[ #, 2 ], 1 ]==8)& ]
  • PARI
    is_A023690(n)=hammingweight(n)==8 \\ M. F. Hasler, Aug 27 2014
    
  • PARI
    print1(t=2^8-1); for(i=2, 50, print1(", "t=A057168(t))) \\ M. F. Hasler, Aug 27 2014
    
  • Python
    from itertools import count, islice
    def A023690_gen(): # generator of terms
        n = 255
        while True:
            yield n
            n = ((n&~(b:=n+(a:=n&-n)))>>a.bit_length())^b
    A023690_list = list(islice(A023690_gen(),30)) # Chai Wah Wu, Mar 06 2025

Formula

a(n+1) = A057168(a(n)). - M. F. Hasler, Aug 27 2014
Sum_{n>=1} 1/a(n) = 1.386455689748809038407077281583569975813437283445124123432573411446506561062... (calculated using Baillie's irwinSums.m, see Links). - Amiram Eldar, Feb 14 2022
Previous Showing 11-20 of 64 results. Next