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-10 of 11 results. Next

A000069 Odious numbers: numbers with an odd number of 1's in their binary expansion.

Original entry on oeis.org

1, 2, 4, 7, 8, 11, 13, 14, 16, 19, 21, 22, 25, 26, 28, 31, 32, 35, 37, 38, 41, 42, 44, 47, 49, 50, 52, 55, 56, 59, 61, 62, 64, 67, 69, 70, 73, 74, 76, 79, 81, 82, 84, 87, 88, 91, 93, 94, 97, 98, 100, 103, 104, 107, 109, 110, 112, 115, 117, 118, 121, 122, 124, 127, 128
Offset: 1

Views

Author

Keywords

Comments

This sequence and A001969 give the unique solution to the problem of splitting the nonnegative integers into two classes in such a way that sums of pairs of distinct elements from either class occur with the same multiplicities [Lambek and Moser]. Cf. A000028, A000379.
In French: les nombres impies.
Has asymptotic density 1/2, since exactly 2 of the 4 numbers 4k, 4k+1, 4k+2, 4k+3 have an even sum of bits, while the other 2 have an odd sum. - Jeffrey Shallit, Jun 04 2002
Nim-values for game of mock turtles played with n coins.
A115384(n) = number of odious numbers <= n; A000120(a(n)) = A132680(n). - Reinhard Zumkeller, Aug 26 2007
Indices of 1's in the Thue-Morse sequence A010060. - Tanya Khovanova, Dec 29 2008
For any positive integer m, the partition of the set of the first 2^m positive integers into evil ones E and odious ones O is a fair division for any polynomial sequence p(k) of degree less than m, that is, Sum_{k in E} p(k) = Sum_{k in O} p(k) holds for any polynomial p with deg(p) < m. - Pietro Majer, Mar 15 2009
For n>1 let b(n) = a(n-1). Then b(b(n)) = 2b(n). - Benoit Cloitre, Oct 07 2010
Lexicographically earliest sequence of distinct nonnegative integers with no term being the binary exclusive OR of any terms. The equivalent sequence for addition or for subtraction is A005408 (the odd numbers) and for multiplication is A026424. - Peter Munn, Jan 14 2018
Numbers of the form m XOR (2*m+1) for some m >= 0. - Rémy Sigrist, Apr 14 2022

Examples

			For k=2, x=0 and x=0.2 we respectively have 1^2 + 2^2 + 4^2 + 7^2 = 0^2 + 3^2 + 5^2 + 6^2 = 70;
(1.2)^2 + (2.2)^2 + (4.2)^2 + (7.2)^2 = (0.2)^2 + (3.2)^2 + (5.2)^2 + (6.2)^2 = 75.76;
for k=3, x=1.8, we have (2.8)^3 + (3.8)^3 + (5.8)^3 + (8.8)^3 + (9.8)^3 + (12.8)^3 + (14.8)^3 + (15.8)^3 = (1.8)^3 + (4.8)^3 + (6.8)^3 + (7.8)^3 + (10.8)^3 + (11.8)^3 + (13.8)^3 + (16.8)^3 = 11177.856. - _Vladimir Shevelev_, Jan 16 2012
		

References

  • E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982, see p. 433.
  • J. Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 22.
  • Vladimir S. Shevelev, On some identities connected with the partition of the positive integers with respect to the Morse sequence, Izv. Vuzov of the North-Caucasus region, Nature sciences 4 (1997), 21-23 (in Russian).
  • N. J. A. Sloane, A handbook of Integer Sequences, Academic Press, 1973 (including this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

The basic sequences concerning the binary expansion of n are A000120, A000788, A000069, A001969, A023416, A059015.
Complement of A001969 (the evil numbers). Cf. A133009.
a(n) = 2*n + 1 - A010060(n) = A001969(n) + (-1)^A010060(n).
First differences give A007413.
Note that A000079, A083420, A002042, A002089, A132679 are subsequences.
See A027697 for primes, also A230095.
Cf. A005408 (odd numbers), A006068, A026424.

Programs

  • Haskell
    a000069 n = a000069_list !! (n-1)
    a000069_list = [x | x <- [0..], odd $ a000120 x]
    -- Reinhard Zumkeller, Feb 01 2012
    
  • Magma
    [ n: n in [1..130] | IsOdd(&+Intseq(n, 2)) ]; // Klaus Brockhaus, Oct 07 2010
    
  • Maple
    s := proc(n) local i,j,k,b,sum,ans; ans := [ ]; j := 0; for i while jA000069 := n->t1[n]; # s(k) gives first k terms.
    is_A000069 := n -> type(add(i,i=convert(n,base,2)),odd):
    seq(`if`(is_A000069(i),i,NULL),i=0..40); # Peter Luschny, Feb 03 2011
  • Mathematica
    Select[Range[300], OddQ[DigitCount[ #, 2][[1]]] &] (* Stefan Steinerberger, Mar 31 2006 *)
    a[ n_] := If[ n < 1, 0, 2 n - 1 - Mod[ Total @ IntegerDigits[ n - 1, 2], 2]]; (* Michael Somos, Jun 01 2013 *)
  • PARI
    {a(n) = if( n<1, 0, 2*n - 1 - subst( Pol(binary( n-1)), x, 1) % 2)}; /* Michael Somos, Jun 01 2013 */
    
  • PARI
    {a(n) = if( n<2, n==1, if( n%2, a((n+1)/2) + n-1, -a(n/2) + 3*(n-1)))}; /* Michael Somos, Jun 01 2013 */
    
  • PARI
    a(n)=2*n-1-hammingweight(n-1)%2 \\ Charles R Greathouse IV, Mar 22 2013
    
  • Python
    [n for n in range(1, 201) if bin(n)[2:].count("1") % 2] # Indranil Ghosh, May 03 2017
    
  • Python
    def A000069(n): return ((m:=n-1)<<1)+(m.bit_count()&1^1) # Chai Wah Wu, Mar 03 2023

Formula

G.f.: 1 + Sum_{k>=0} (t*(2+2t+5t^2-t^4)/(1-t^2)^2) * Product_{j=0..k-1} (1-x^(2^j)), t=x^2^k. - Ralf Stephan, Mar 25 2004
a(n+1) = (1/2) * (4*n + 1 + (-1)^A000120(n)). - Ralf Stephan, Sep 14 2003
Numbers n such that A010060(n) = 1. - Benoit Cloitre, Nov 15 2003
a(2*n+1) + a(2*n) = A017101(n) = 8*n+3. a(2*n+1) - a(2*n) gives the Thue-Morse sequence (1, 3 version): 1, 3, 3, 1, 3, 1, 1, 3, 3, 1, 1, 3, 1, ... A001969(n) + A000069(n) = A016813(n) = 4*n+1. - Philippe Deléham, Feb 04 2004
(-1)^a(n) = 2*A010060(n)-1. - Benoit Cloitre, Mar 08 2004
a(1) = 1; for n > 1: a(2*n) = 6*n-3 -a(n), a(2*n+1) = a(n+1) + 2*n. - Corrected by Vladimir Shevelev, Sep 25 2011
For k >= 1 and for every real (or complex) x, we have Sum_{i=1..2^k} (a(i)+x)^s = Sum_{i=1..2^k} (A001969(i)+x)^s, s=0..k.
For x=0, s <= k-1, this is known as Prouhet theorem (see J.-P. Allouche and Jeffrey Shallit, The Ubiquitous Prouhet-Thue-Morse Sequence). - Vladimir Shevelev, Jan 16 2012
a(n+1) mod 2 = 1 - A010060(n) = A010059(n). - Robert G. Wilson v, Jan 18 2012
A005590(a(n)) > 0. - Reinhard Zumkeller, Apr 11 2012
A106400(a(n)) = -1. - Reinhard Zumkeller, Apr 29 2012
a(n+1) = A006068(n) XOR (2*A006068(n) + 1). - Rémy Sigrist, Apr 14 2022

A063865 Number of solutions to +- 1 +- 2 +- 3 +- ... +- n = 0.

Original entry on oeis.org

1, 0, 0, 2, 2, 0, 0, 8, 14, 0, 0, 70, 124, 0, 0, 722, 1314, 0, 0, 8220, 15272, 0, 0, 99820, 187692, 0, 0, 1265204, 2399784, 0, 0, 16547220, 31592878, 0, 0, 221653776, 425363952, 0, 0, 3025553180, 5830034720, 0, 0, 41931984034, 81072032060, 0, 0
Offset: 0

Views

Author

N. J. A. Sloane, suggested by J. H. Conway, Aug 27 2001

Keywords

Comments

Number of sum partitions of the half of the n-th-triangular number by distinct numbers in the range 1 to n. Example: a(7)=8 since triangular(7)=28 and 14 = 2+3+4+5 = 1+3+4+6 = 1+2+5+6 = 3+5+6 = 7+1+2+4 = 7+3+4 = 7+2+5 = 7+1+6. - Hieronymus Fischer, Oct 20 2010
The asymptotic formula below was stated as a conjecture by Andrica & Tomescu in 2002 and proved by B. D. Sullivan in 2013. See his paper and H.-K. Hwang's review MR 2003j:05005 of the JIS paper. - Jonathan Sondow, Nov 11 2013
a(n) is the number of subsets of {1..n} whose sum is equal to the sum of their complement. See example below. - Gus Wiseman, Jul 04 2019

Examples

			From _Gus Wiseman_, Jul 04 2019: (Start)
For example, the a(0) = 1 through a(8) = 14 subsets (empty columns not shown) are:
  {}  {3}    {1,4}  {1,6,7}    {3,7,8}
      {1,2}  {2,3}  {2,5,7}    {4,6,8}
                    {3,4,7}    {5,6,7}
                    {3,5,6}    {1,2,7,8}
                    {1,2,4,7}  {1,3,6,8}
                    {1,2,5,6}  {1,4,5,8}
                    {1,3,4,6}  {1,4,6,7}
                    {2,3,4,5}  {2,3,5,8}
                               {2,3,6,7}
                               {2,4,5,7}
                               {3,4,5,6}
                               {1,2,3,4,8}
                               {1,2,3,5,7}
                               {1,2,4,5,6}
(End)
		

Crossrefs

"Decimations": A060468 = 2*A060005, A123117 = 2*A104456.
Analogous sequences for sums of squares and cubes are A158092, A158118, see also A019568. - Pietro Majer, Mar 15 2009

Programs

  • Maple
    M:=400; t1:=1; lprint(0,1); for n from 1 to M do t1:=expand(t1*(x^n+1/x^n)); lprint(n, coeff(t1,x,0)); od: # N. J. A. Sloane, Jul 07 2008
  • Mathematica
    f[n_, s_] := f[n, s]=Which[n==0, If[s==0, 1, 0], Abs[s]>(n*(n+1))/2, 0, True, f[ n-1, s-n]+f[n-1, s+n]]; a[n_] := f[n, 0]
    nmax = 50; d = {1}; a1 = {};
    Do[
      i = Ceiling[Length[d]/2];
      AppendTo[a1, If[i > Length[d], 0, d[[i]]]];
      d = PadLeft[d, Length[d] + 2 n] + PadRight[d, Length[d] + 2 n];
      , {n, nmax}];
    a1 (* Ray Chandler, Mar 13 2014 *)
  • PARI
    a(n)=my(x='x); polcoeff(prod(k=1,n,x^k+x^-k)+O(x),0) \\ Charles R Greathouse IV, May 18 2015
    
  • PARI
    a(n)=0^n+floor(prod(k=1,n,2^(n*k)+2^(-n*k)))%(2^n) \\ Tani Akinari, Mar 09 2016

Formula

Asymptotic formula: a(n) ~ sqrt(6/Pi)*n^(-3/2)*2^n for n = 0 or 3 (mod 4) as n approaches infinity.
a(n) = 0 unless n == 0 or 3 (mod 4).
a(n) = constant term in expansion of Product_{ k = 1..n } (x^k + 1/x^k). - N. J. A. Sloane, Jul 07 2008
If n = 0 or 3 (mod 4) then a(n) = coefficient of x^(n(n+1)/4) in Product_{k=1..n} (1+x^k). - D. Andrica and I. Tomescu.
a(n) = 2*A058377(n) for any n > 0. - Rémy Sigrist, Oct 11 2017

Extensions

More terms from Dean Hickerson, Aug 28 2001
Corrected and edited by Steven Finch, Feb 01 2009

A158092 Number of solutions to +- 1 +- 2^2 +- 3^2 +- 4^2 +- ... +- n^2 = 0.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 2, 10, 0, 0, 86, 114, 0, 0, 478, 860, 0, 0, 5808, 10838, 0, 0, 55626, 100426, 0, 0, 696164, 1298600, 0, 0, 7826992, 14574366, 0, 0, 100061106, 187392994, 0, 0, 1223587084, 2322159814, 0, 0, 16019866270, 30353305134, 0, 0
Offset: 1

Views

Author

Pietro Majer, Mar 12 2009

Keywords

Comments

Twice A083527.
Number of partitions of the half of the n-th-square-pyramidal number into parts that are distinct square numbers in the range 1 to n^2. Example: a(7)=2 since, squarePyramidal(7)=140 and 70=1+4+16+49=9+25+36. - Hieronymus Fischer, Oct 20 2010
Erdős & Surányi prove that this sequence is unbounded. More generally, there are infinitely many ways to write a given number k as such a sum. - Charles R Greathouse IV, Nov 05 2012
The expansion and integral representation formulas below are due to Andrica & Tomescu. The asymptotic formula is a conjecture; see Andrica & Ionascu. - Jonathan Sondow, Nov 11 2013

Examples

			For n=8 the a(8)=2 solutions are: +1-4-9+16-25+36+49-64=0 and -1+4+9-16+25-36-49+64=0.
		

Crossrefs

Programs

  • Maple
    From Pietro Majer, Mar 15 2009: (Start)
    N:=60: p:=1: a:=[]: for n from 1 to N do p:=expand(p*(x^(n^2)+x^(-n^2))):
    a:=[op(a), coeff(p, x, 0)]: od:a; (End)
    # second Maple program:
    b:= proc(n, i) option remember; local m; m:= (1+(3+2*i)*i)*i/6;
          `if`(n>m, 0, `if`(n=m, 1, b(abs(n-i^2), i-1) +b(n+i^2, i-1)))
        end:
    a:= n-> `if`(irem(n-1, 4)<2, 0, 2*b(n^2, n-1)):
    seq(a(n), n=1..60);  # Alois P. Heinz, Nov 05 2012
  • Mathematica
    b[n_, i_] := b[n, i] = With[{m = (1+(3+2*i)*i)*i/6}, If[n>m, 0, If[n == m, 1, b[ Abs[n-i^2], i-1] + b[n+i^2, i-1]]]]; a[n_] := If[Mod[n-1, 4]<2, 0, 2*b[n^2, n-1]]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Mar 13 2015, after Alois P. Heinz *)
  • PARI
    a(n)=2*sum(i=0,2^(n-1)-1,sum(j=1,n-1,(-1)^bittest(i,j-1)*j^2)==n^2) \\ Charles R Greathouse IV, Nov 05 2012
    
  • Python
    from itertools import count, islice
    from collections import Counter
    def A158092_gen(): # generator of terms
        ccount = Counter({0:1})
        for i in count(1):
            bcount = Counter()
            for a in ccount:
                bcount[a+(j:=i**2)] += ccount[a]
                bcount[a-j] += ccount[a]
            ccount = bcount
            yield(ccount[0])
    A158092_list = list(islice(A158092_gen(),20)) # Chai Wah Wu, Jan 29 2024

Formula

Constant term in the expansion of (x + 1/x)(x^4 + 1/x^4)..(x^n^2 + 1/x^n^2).
a(n)=0 for any n == 1 or 2 (mod 4).
Integral representation: a(n)=((2^n)/pi)*int_0^pi prod_{k=1}^n cos(x*k^2) dx
Asymptotic formula: a(n) = (2^n)*sqrt(10/(pi*n^5))*(1+o(1)) as n-->infty; n == -1 or 0 (mod 4).
a(n) = 2 * A083527(n). - T. D. Noe, Mar 12 2009
min{n : a(n) > 0} = A231015(0) = 7. - Jonathan Sondow, Nov 06 2013

Extensions

a(51)-a(56) from R. H. Hardin, Mar 12 2009
Edited by N. J. A. Sloane, Sep 15 2009

A158118 Number of solutions of +-1+-2^3+-3^3..+-n^3=0.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 4, 2, 0, 0, 4, 124, 0, 0, 536, 712, 0, 0, 4574, 2260, 0, 0, 10634, 73758, 0, 0, 406032, 638830, 0, 0, 4249160, 3263500, 0, 0, 21907736, 82561050, 0, 0, 485798436, 945916970, 0, 0, 5968541478, 6839493576, 0, 0
Offset: 1

Views

Author

Pietro Majer, Mar 12 2009

Keywords

Comments

Constant term in the expansion of (x + 1/x)(x^8 + 1/x^8)..(x^n^3 + 1/x^n^3).
a(n) = 0 for any n=1 (mod 4) or n=2 (mod 4).
The expansion above and the integral representation formula below are due to Andrica & Tomescu. The asymptotic formula is a conjecture; see Andrica & Ionascu. - Jonathan Sondow, Nov 06 2013

Examples

			Example: For n=12 the a(12) = 2 solutions are:
+1+8-27+64-125-216-343+512+729-1000-1331+1728=0,
-1-8+27-64+125+216+343-512-729+1000+1331-1728=0.
		

Crossrefs

Equals twice A113263.
Cf. A063865, A158092, A019568. - Pietro Majer, Mar 15 2009

Programs

  • Maple
    N:=60: p:=1: a:=[]: for n from 1 to N do p:=expand(p*( x^(n^3) + x^(-n^3) )): a:=[op(a), coeff(p,x,0)]: od:a;

Formula

a(n) = 2 * A113263(n).
Integral representation: a(n)=((2^n)/Pi)*int_0^Pi prod_{k=1}^n cos(x*k^3) dx.
Asymptotic formula: a(n)=(2^n)*sqrt(14/(Pi*n^7))*(1+o(1)) as n-->infty; n=-1 or 0 (mod 4).

A158465 Number of solutions to +-1+-2^4+-3^4+-4^4...+-n^4=0.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 16, 18, 0, 0, 32, 100, 0, 0, 424, 510, 0, 0, 2792, 5988, 0, 0, 29058, 45106, 0, 0, 276828, 473854, 0, 0, 2455340, 4777436, 0, 0, 27466324, 46429640, 0, 0, 280395282, 526489336, 0, 0, 3193589950, 5661226928, 0, 0
Offset: 1

Views

Author

Pietro Majer, Mar 19 2009

Keywords

Comments

Constant term in the expansion of (x + 1/x)(x^16 + 1/x^16)..(x^n^4 + 1/x^n^4).
a(n)=0 for any n=1 (mod 4) or n=2 (mod 4).
Andrica & Tomescu give a more general integral formula than the one below. The asymptotic formula below is a conjecture by Andrica & Ionascu; it remains unproven. - Jonathan Sondow, Nov 11 2013

Examples

			For n=16 the a(16) = 2 solutions are +1 +16 +81 +256 -625 -1296 -2401 +4096 +6561 +10000 +14641 +20736 -28561 -38416 -50625 +65536 = 0 and the opposite.
		

Crossrefs

A111253(n) = a(n)/2. - Alois P. Heinz, Oct 31 2011

Programs

  • Maple
    N:=32: p:=1 a:=[]: for n from 32 to N do p:=expand
    (p*(x^(n^4)+x^(-n^4))): a:=[op(a), coeff(p,x,0)]: od:a;

Formula

Integral representation: a(n) = ((2^n)/Pi)*int_0^pi prod_{k=1}^n cos(x*k^4) dx.
Asymptotic formula: a(n) = (2^n)*sqrt(18/(Pi*n^9))*(1+o(1)) as n->infinity; n=-1 or 0 (mod 4).

Extensions

a(35)-a(58) from Alois P. Heinz, Oct 31 2011

A240070 a(n) is the least k such that {1^n, 2^n, 3^n, ..., k^n} can be partitioned into 3 sets whose sums are equal.

Original entry on oeis.org

3, 5, 13, 23, 35, 30, 45, 53, 71, 71
Offset: 0

Views

Author

T. D. Noe, Apr 02 2014

Keywords

Examples

			For n = 0, the 3 numbers are partitioned as {1}, {2}, {3}.
For n = 1, the 5 numbers are partitioned as {1,4}, {2,3}, {5}.
For n = 2, the 13 numbers are partitioned as {2,10,13}, {4,7,8,12}, {1,3,5,6,9,11}.
For n = 3, the 23 numbers are partitioned as {3,6,10,13,18,19,21}, {1,4,7,8,12,16,20,22}, {2,5,9,11,14,15,17,23}.
From _Alois P. Heinz_, Apr 04 2014: (Start)
One partition for n=4 is {1,2,12,17,18,20,21,22,23,24,25,27,28,30}, {3,4,5,6,9,13,14,16,26,31,32,33}, {7,8,10,11,15,19,29,34,35}.
One partition for n=5 is {1,2,3,6,13,14,15,17,19,20,22,23,30}, {4,7,8,10,12,16,18,25,27,28}, {5,9,11,21,24,26,29}. (End)
One partition for n=6 is {1,3,5,9,11,14,15,19,20,21,27,29,34,35,43,45}, {4,6,7,10,12,13,16,17,24,28,33,36,38,41,44}, {2,8,18,22,23,25,26,30,31,32,37,39,40,42}.
One partition for n=7 is {2,4,5,6,8,12,16,20,21,22,25,27,29,30,32,35,36,40,46,50,53}, {1,3,10,13,14,18,24,28,33,34,37,38,39,41,42,45,47,52}, {7,9,11,15,17,19,23,26,31,43,44,48,49,51}.
From _Michael S. Branicky_, Jul 02 2020: (Start)
One partition for n=8 is {1,2,5,7,11,13,18,24,25,26,27,29,32,34,35,36,41,52,66,67,68,69}, {4,8,9,15,17,20,21,23,30,43,47,50,53,54,55,57,60,61,62,63,70}, {3,6,10,12,14,16,19,22,28,31,33,37,38,39,40,42,44,45,46,48,49,51,56,58,59,64,65,71}.
One partition for n=9 is
  {2,4,5,6,10,12,13,19,20,35,37,44,50,61,63,70,71},
  {1,7,22,24,26,27,29,31,33,36,38,39,40,41,42,46,47,49,52,54,56,59,66,68,69}, {3,8,9,11,14,15,16,17,18,21,23,25,28,30,32,34,43,45,48,51,53,55,57,58,60,62,64,65,67}. (End)
		

Crossrefs

Cf. A019568 (partitioned into 2 sets).

Programs

  • Mathematica
    goodQ[set_, n_] :=
    Module[{found = False},
      Do[If[Union[set[[i]], set[[j]], set[[k]]] == Range[n] &&
         Length[set[[i]]] + Length[set[[j]]] + Length[set[[k]]] == n,
        Print[{set[[i]], set[[j]], set[[k]]}]; found = True; Break[]], {i,
         Length[set]}, {j, i, Length[set]}, {k, j, Length[set]}]; found];
    Join[{3}, Table[k = 1; found = False;
    While[s = Range[k]^n; sm = Total[s]/3;
      If[IntegerQ[sm],
       t3 = Select[Subsets[s], Total[#] == sm &]^(1/n);
       found = goodQ[t3, k]]; ! found, k++]; k, {n, 3}]]

Extensions

a(4)-a(5) from Alois P. Heinz, Apr 03 2014
a(6)-a(7) from Dean D. Ballard, Jun 09 2020
a(8)-a(9) from Michael S. Branicky, Jul 02 2020

A173209 Partial sums of A000069.

Original entry on oeis.org

1, 3, 7, 14, 22, 33, 46, 60, 76, 95, 116, 138, 163, 189, 217, 248, 280, 315, 352, 390, 431, 473, 517, 564, 613, 663, 715, 770, 826, 885, 946, 1008, 1072, 1139, 1208, 1278, 1351, 1425, 1501, 1580, 1661, 1743, 1827, 1914, 2002, 2093, 2186, 2280, 2377, 2475, 2575
Offset: 1

Views

Author

Jonathan Vos Post, Feb 12 2010

Keywords

Comments

Partial sums of odious numbers. Second differences give A007413. The subsequence of prime partial sums of odious numbers begins: 3, 7, 163, 431, 613, 2377, 3691, which is a subsequence of A027697. The subsequence of odious partial sums of odious numbers begins: 1, 7, 14, 22, 76, 138, 217, 280, 352, 431, 517, 613, 770, 885.

Examples

			a(65) = 1 + 2 + 4 + 7 + 8 + 11 + 13 + 14 + 16 + 19 + 21 + 22 + 25 + 26 + 28 + 31 + 32 + 35 + 37 + 38 + 41 + 42 + 44 + 47 + 49 + 50 + 52 + 55 + 56 + 59 + 61 + 62 + 64 + 67 + 69 + 70 + 73 + 74 + 76 + 79 + 81 + 82 + 84 + 87 + 88 + 91 + 93 + 94 + 97 + 98 + 100 + 103 + 104 + 107 + 109 + 110 + 112 + 115 + 117 + 118 + 121 + 122 + 124 + 127 + 128.
		

Crossrefs

Programs

Formula

a(n) = SUM[i=1..n] A000069(i) = SUM[i=1..n] {i such that A010060(i)=1}.
a(n) = n^2 - n/2 + O(1). - Charles R Greathouse IV, Mar 22 2013

A292510 a(n) = smallest k >= 1 such that {1, p(n,2), p(n,3), ..., p(n,k)} can be partitioned into two sets with equal sums, where p(n,m) is m-th n-gonal number.

Original entry on oeis.org

4, 7, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
Offset: 3

Views

Author

Seiichi Manyama, Sep 17 2017

Keywords

Comments

Conjecture: a(n) = 7 for n > 5.

Examples

			n = 3
1+3+6 = 10
n = 4
1+4+16+49 = 9+25+36 (= 70 = 28*4-42)
n = 5
1+5+22+35 = 12+51 (=63)
n = 6
1+6+28+91 = 15+45+66 (= 126 = 28*6-42)
		

Crossrefs

Programs

  • Ruby
    def f(k, n)
      n * ((k - 2) * n - k + 4) / 2
    end
    def A(k, n)
      ary = [1]
      s_ary = [0]
      (1..n).each{|i| s_ary << s_ary[-1] + f(k, i)}
      m = s_ary[-1]
      a = Array.new(m + 1){0}
      a[0] = 1
      (1..n).each{|i|
        b = a.clone
        (0..[s_ary[i - 1], m - f(k, i)].min).each{|j| b[j + f(k, i)] += a[j]}
        a = b
        s_ary[i] % 2 == 0 ? ary << a[s_ary[i] / 2] : ary << 0
      }
      ary
    end
    def B(n)
      i = 1
      while A(n, i)[-1] == 0
        i += 1
      end
      i
    end
    def A292510(n)
      (3..n).map{|i| B(i)}
    end
    p A292510(100)

Formula

p(n,1) + p(n,2) + p(n,4) + p(n,7) = p(n,3) + p(n,5) + p(n,6) (= 28*n-42). So a(n) <= 7.

A330212 a(n) is the smallest k such that {1^3, 2^3, 3^3, ..., k^3} can be partitioned into n sets of equal sums.

Original entry on oeis.org

1, 12, 23, 24, 24, 35, 41, 47, 53, 59, 65, 63
Offset: 1

Views

Author

Dean D. Ballard, Jun 08 2020

Keywords

Examples

			For n = 1 the set is {1}.
For n = 2 the sets are {1,2,4,8,9,12}, {3,5,6,7,10,11}.
For n = 3, the sets are {2,5,9,11,14,15,17,23}, {1,4,7,8,12,16,20,22}, {3,6,10,13,18,19,21}.
For n = 4, the sets are (all 3 of them):
{1,2,3,4,14,18,24}, {7,9,21,23}, {8,10,11,16,17,22}, {5,6,12,13,15,19,20}
OR
{1,8,10,11,18,24}, {7,9,21,23}, {2,3,4,14,16,17,22}, {5,6,12,13,15,19,20}
OR
{1,2,3,4,14,18,24}, {7,9,21,23}, {5,6,8,11,13,15,16,22}, {10,12,17,19,20}.
For n = 5 the sets are {2,4,9,15,24}, {1,18,23}, {8,14,16,22}, {3,5,12,19,21}, {6,7,10,11,13,17,20}.
For n = 6 the sets are {4,11,13,27,35}, {9,12,29,34}, {1,5,7,14,30,33}, {6,15,31,32}, {2,3,8,10,19,20,23,25,28}, {16,17,18,21,22,24,26}.
		

Crossrefs

Extensions

a(11)-a(12) from Jork Loeser, Jun 27 2020

A330431 a(n) is the smallest k such that {1^2, 2^2, 3^2, ..., k^2} can be partitioned into n sets of equal sums.

Original entry on oeis.org

1, 7, 13, 15, 19, 31, 27, 32, 53, 39, 43, 63, 52, 55
Offset: 1

Views

Author

Dean D. Ballard, Jun 08 2020

Keywords

Examples

			For n = 1 the set is {1}
For n = 2 the sets are {1,2,4,7}, {3,5,6}.
For n = 3 the sets are {2,10,13}, {4,7,8,12}, {1,3,5,6,9,11}.
For n = 4 the sets are {2,9,15}, {1,7,8,14}, {4,5,10,13}, {3,6,11,12}.
For n = 5 the sets are {4,6,9,19}, {1,13,18}, {3,14,17}, {2,7,8,11,16}, {5,10,12,15}.
For n = 6 the sets are {1,3,6,27,31}, {4,12,26,30}, {5,7,14,25,29}, {2,8,20,22,28}, {9,13,15,18,19,24}, {10,11,16,17,21,23}.
		

Crossrefs

Extensions

a(12) from Giovanni Resta, Jun 08 2020
a(13)-a(14) from Dean D. Ballard, Jun 12 2020
Showing 1-10 of 11 results. Next