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

A000325 a(n) = 2^n - n.

Original entry on oeis.org

1, 1, 2, 5, 12, 27, 58, 121, 248, 503, 1014, 2037, 4084, 8179, 16370, 32753, 65520, 131055, 262126, 524269, 1048556, 2097131, 4194282, 8388585, 16777192, 33554407, 67108838, 134217701, 268435428, 536870883, 1073741794, 2147483617
Offset: 0

Views

Author

Rosario Salamone (Rosario.Salamone(AT)risc.uni-linz.ac.at)

Keywords

Comments

Number of permutations of degree n with at most one fall; called "Grassmannian permutations" by Lascoux and Schützenberger. - Axel Kohnert (Axel.Kohnert(AT)uni-bayreuth.de)
Number of different permutations of a deck of n cards that can be produced by a single shuffle. [DeSario]
Number of Dyck paths of semilength n having at most one long ascent (i.e., ascent of length at least two). Example: a(4)=12 because among the 14 Dyck paths of semilength 4, the only paths that have more than one long ascent are UUDDUUDD and UUDUUDDD (each with two long ascents). Here U = (1, 1) and D = (1, -1). Also number of ordered trees with n edges having at most one branch node (i.e., vertex of outdegree at least two). - Emeric Deutsch, Feb 22 2004
Number of {12,1*2*,21*}-avoiding signed permutations in the hyperoctahedral group.
Number of 1342-avoiding circular permutations on [n+1].
2^n - n is the number of ways to partition {1, 2, ..., n} into arithmetic progressions, where in each partition all the progressions have the same common difference and have lengths at least 1. - Marty Getz (ffmpg1(AT)uaf.edu) and Dixon Jones (fndjj(AT)uaf.edu), May 21 2005
if b(0) = x and b(n) = b(n-1) + b(n-1)^2*x^(n-2) for n > 0, then b(n) is a polynomial of degree a(n). - Michael Somos, Nov 04 2006
The chromatic invariant of the Mobius ladder graph M_n for n >= 2. - Jonathan Vos Post, Aug 29 2008
Dimension sequence of the dual alternative operad (i.e., associative and satisfying the identity xyz + yxz + zxy + xzy + yzx + zyx = 0) over the field of characteristic 3. - Pasha Zusmanovich, Jun 09 2009
An elephant sequence, see A175654. For the corner squares six A[5] vectors, with decimal values between 26 and 176, lead to this sequence (without the first leading 1). For the central square these vectors lead to the companion sequence A168604. - Johannes W. Meijer, Aug 15 2010
a(n+1) is also the number of order-preserving and order-decreasing partial isometries (of an n-chain). - Abdullahi Umar, Jan 13 2011
A040001(n) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n. - Michael Somos, May 12 2012
A130103(n+1) = p(n+1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n. - Michael Somos, May 12 2012
The number of labeled graphs with n vertices whose vertex set can be partitioned into a clique and a set of isolated points. - Alex J. Best, Nov 20 2012
For n > 0, a(n) is a B_2 sequence. - Thomas Ordowski, Sep 23 2014
See coefficients of the linear terms of the polynomials of the table on p. 10 of the Getzler link. - Tom Copeland, Mar 24 2016
Consider n points lying on a circle, then for n>=2 a(n-1) is the maximum number of ways to connect two points with non-intersecting chords. - Anton Zakharov, Dec 31 2016
Also the number of cliques in the (n-1)-triangular honeycomb rook graph. - Eric W. Weisstein, Jul 14 2017
From Eric M. Schmidt, Jul 17 2017: (Start)
Number of sequences (e(1), ..., e(n)), 0 <= e(i) < i, such that there is no triple i < j < k with e(i) != e(j) < e(k). [Martinez and Savage, 2.7]
Number of sequences (e(1), ..., e(n)), 0 <= e(i) < i, such that there is no triple i < j < k with e(i), e(j), e(k) pairwise distinct. [Martinez and Savage, 2.7]
Number of sequences (e(1), ..., e(n)), 0 <= e(i) < i, such that there is no triple i < j < k with e(j) >= e(k) and e(i) != e(k) pairwise distinct. [Martinez and Savage, 2.7]
(End)
Number of F-equivalence classes of Łukasiewicz paths. Łukasiewicz paths are F-equivalent iff the positions of pattern F are identical in these paths. - Sergey Kirgizov, Apr 08 2018
From Gus Wiseman, Feb 10 2019: (Start)
Also the number of connected partitions of an n-cycle. For example, the a(1) = 1 through a(4) = 12 connected partitions are:
{{1}} {{12}} {{123}} {{1234}}
{{1}{2}} {{1}{23}} {{1}{234}}
{{12}{3}} {{12}{34}}
{{13}{2}} {{123}{4}}
{{1}{2}{3}} {{124}{3}}
{{134}{2}}
{{14}{23}}
{{1}{2}{34}}
{{1}{23}{4}}
{{12}{3}{4}}
{{14}{2}{3}}
{{1}{2}{3}{4}}
(End)
Number of subsets of n-set without the single-element subsets. - Yuchun Ji, Jul 16 2019
For every prime p, there are infinitely many terms of this sequence that are divisible by p (see IMO Compendium link and Doob reference). Corresponding indices n are: for p = 2, even numbers A299174; for p = 3, A047257; for p = 5, A349767. - Bernard Schott, Dec 10 2021
Primes are in A081296 and corresponding indices in A048744. - Bernard Schott, Dec 12 2021

Examples

			G.f. = 1 + x + 2*x^2 + 5*x^3 + 12*x^4 + 27*x^5 + 58*x^6 + 121*x^7 + ...
		

References

  • Michael Doob, The Canadian Mathematical Olympiad & L'Olympiade Mathématique du Canada 1969-1993, Canadian Mathematical Society & Société Mathématique du Canada, Problem 4, 1983, page 158, 1993.

Crossrefs

Column 1 of triangle A008518.
Row sum of triangles A184049 and A184050.

Programs

  • Haskell
    a000325 n = 2 ^ n - n
    a000325_list = zipWith (-) a000079_list [0..]
    -- Reinhard Zumkeller, Jul 17 2012
    
  • Magma
    [2^n - n: n in [0..35]]; // Vincenzo Librandi, May 13 2011
    
  • Maple
    A000325 := proc(n) option remember; if n <=1 then n+1 else 2*A000325(n-1)+n-1; fi; end;
    g:=1/(1-2*z): gser:=series(g, z=0, 43): seq(coeff(gser, z, n)-n, n=0..31); # Zerinvary Lajos, Jan 09 2009
  • Mathematica
    Table[2^n - n, {n, 0, 39}] (* Alonso del Arte, Sep 15 2014 *)
    LinearRecurrence[{4, -5, 2}, {1, 2, 5}, {0, 20}] (* Eric W. Weisstein, Jul 14 2017 *)
  • PARI
    {a(n) = 2^n - n}; /* Michael Somos, Nov 04 2006 */
    
  • Python
    def A000325(n): return (1<Chai Wah Wu, Jan 11 2023

Formula

a(n+1) = 2*a(n) + n - 1, a(0) = 1. - Reinhard Zumkeller, Apr 12 2003
Binomial transform of 1, 0, 1, 1, 1, .... The sequence starting 1, 2, 5, ... has a(n) = 1 + n + 2*Sum_{k=2..n} binomial(n, k) = 2^(n+1) - n - 1. This is the binomial transform of 1, 1, 2, 2, 2, 2, .... a(n) = 1 + Sum_{k=2..n} C(n, k). - Paul Barry, Jun 06 2003
G.f.: (1-3x+3x^2)/((1-2x)*(1-x)^2). - Emeric Deutsch, Feb 22 2004
A107907(a(n+2)) = A000051(n+2) for n > 0. - Reinhard Zumkeller, May 28 2005
a(n+1) = sum of n-th row of the triangle in A109128. - Reinhard Zumkeller, Jun 20 2005
Row sums of triangle A133116. - Gary W. Adamson, Sep 14 2007
G.f.: 1 / (1 - x / (1 - x / ( 1 - x / (1 + x / (1 - 2*x))))). - Michael Somos, May 12 2012
First difference is A000225. PSUM transform is A084634. - Michael Somos, May 12 2012
a(n) = [x^n](B(x)^n-B(x)^(n-1)), n>0, a(0)=1, where B(x) = (1+2*x+sqrt(1+4*x^2))/2. - Vladimir Kruchinin, Mar 07 2014
E.g.f.: (exp(x) - x)*exp(x). - Ilya Gutkovskiy, Aug 07 2016
a(n) = A125128(n) - A000225(n) + 1. - Miquel Cerda, Aug 12 2016
a(n) = 2*A125128(n) - A095151(n) + 1. - Miquel Cerda, Aug 12 2016
a(n) = A079583(n-1) - A000225(n-1). - Miquel Cerda, Aug 15 2016
a(n)^2 - 4*a(n-1)^2 = (n-2)*(a(n)+2*a(n-1)). - Yuchun Ji, Jul 13 2018
a(n) = 2^(-n) * A186947(n) = 2^n * A002064(-n) for all n in Z. - Michael Somos, Jul 18 2018
a(2^n) = (2^a(n) - 1)*2^n. - Lorenzo Sauras Altuzarra, Feb 01 2022

A355741 Number of ways to choose a sequence of prime factors, one of each prime index of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 18 2022

Keywords

Comments

First differs from A355744 at a(169) = 4, A355744(169) = 3.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 1131 are {2,6,10}, and the a(1131) = 4 choices are: {2,2,2}, {2,2,5}, {2,3,2}, {2,3,5}.
		

Crossrefs

Positions of 0's are A299174.
The version for all divisors is A355731, firsts A355732.
Choosing prime-power divisors gives A355742.
Positions of 1's are A355743.
Counting multisets instead of sequences gives A355744.
The weakly increasing case is A355745, all divisors A355735.
A001414 adds up distinct prime factors, counted by A001221.
A003963 multiplies together the prime indices of n.
A056239 adds up prime indices, row sums of A112798, counted by A001222.
A289509 lists numbers with relatively prime prime indices.
A324850 lists numbers divisible by the product of their prime indices.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Times@@PrimeNu/@primeMS[n],{n,100}]

Formula

Totally multiplicative with a(prime(k)) = A001221(k).

A355742 Number of ways to choose a sequence of prime-power divisors, one of each prime index of n. Product of bigomega over the prime indices of n, with multiplicity.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 20 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 49 are {4,4}, and the a(49) = 4 choices are: (2,2), (2,4), (4,2), (4,4).
The prime indices of 777 are {2,4,12}, and the a(777) = 6 choices are: (2,2,2), (2,2,3), (2,2,4), (2,4,2), (2,4,3), (2,4,4).
		

Crossrefs

The unordered version is A001970, row-sums of A061260.
Positions of 1's are A076610, just primes A355743.
Positions of 0's are A299174.
Allowing all divisors (not just primes) gives A355731, firsts A355732.
Choosing only prime factors (not prime-powers) gives A355741.
Counting multisets of primes gives A355744.
The case of weakly increasing primes A355745, all divisors A355735.
A000688 counts factorizations into prime powers.
A001414 adds up distinct prime factors, counted by A001221.
A003963 multiplies together the prime indices of n.
A056239 adds up prime indices, row sums of A112798, counted by A001222.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Times@@PrimeOmega/@primeMS[n],{n,100}]

Formula

Totally multiplicative with a(prime(k)) = A001222(k).

A047257 Numbers that are congruent to {4, 5} mod 6.

Original entry on oeis.org

4, 5, 10, 11, 16, 17, 22, 23, 28, 29, 34, 35, 40, 41, 46, 47, 52, 53, 58, 59, 64, 65, 70, 71, 76, 77, 82, 83, 88, 89, 94, 95, 100, 101, 106, 107, 112, 113, 118, 119, 124, 125, 130, 131, 136, 137, 142, 143, 148, 149
Offset: 1

Views

Author

Keywords

Comments

Equivalently, numbers m such that 2^m - m is divisible by 3. Indeed, for every prime p, there are infinitely many numbers m such that 2^m - m (A000325) is divisible by p, here are numbers m corresponding to p = 3. - Bernard Schott, Dec 10 2021
Numbers k for which A276076(k) and A276086(k) are multiples of nine. For a simple proof, consider the penultimate digit in the factorial and primorial base expansions of n, A007623 and A049345. - Antti Karttunen, Feb 08 2024

References

  • Michael Doob, The Canadian Mathematical Olympiad & L'Olympiade Mathématique du Canada 1969-1993, Canadian Mathematical Society & Société Mathématique du Canada, Problem 4, 1983, page 158, 1993.

Crossrefs

Cf. A000325.
Similar with: A299174 (p = 2), this sequence (p = 3), A349767 (p = 5).

Programs

Formula

a(n) = 4 + 6*floor(n/2) + n mod 2.
a(n) = 6*n-a(n-1)-3, with a(1)=4. - Vincenzo Librandi, Aug 05 2010
G.f.: ( x*(4+x+x^2) ) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011
a(n) = 3*n - (-1)^n. - Wesley Ivan Hurt, Mar 20 2015
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(6*sqrt(3)) - log(2)/3. - Amiram Eldar, Dec 14 2021
E.g.f.: 1 + 3*x*exp(x) - exp(-x). - David Lovler, Aug 25 2022

A326124 a(n) is the sum of all divisors of the first n positive even numbers.

Original entry on oeis.org

3, 10, 22, 37, 55, 83, 107, 138, 177, 219, 255, 315, 357, 413, 485, 548, 602, 693, 753, 843, 939, 1023, 1095, 1219, 1312, 1410, 1530, 1650, 1740, 1908, 2004, 2131, 2275, 2401, 2545, 2740, 2854, 2994, 3162, 3348, 3474, 3698, 3830, 4010, 4244, 4412, 4556, 4808, 4979, 5196, 5412, 5622, 5784, 6064, 6280
Offset: 1

Views

Author

Omar E. Pol, Jun 07 2019

Keywords

Comments

A326123(n)/a(n) converges to 3/5.
a(n) is also the total area of the terraces of the first n even-indexed levels of the stepped pyramid described in A245092.

Examples

			For n = 3 the first three positive even numbers are [2, 4, 6] and their divisors are [1, 2], [1, 2, 4], [1, 2, 3, 6] respectively, and the sum of these divisors is 1 + 2 + 1 + 2 + 4 + 1 + 2 + 3 + 6 = 22, so a(3) = 22.
		

Crossrefs

Programs

  • Maple
    ListTools:-PartialSums(map(numtheory:-sigma, [seq(i,i=2..200,2)])); # Robert Israel, Jun 12 2019
  • Mathematica
    Accumulate@ DivisorSigma[1, Range[2, 110, 2]] (* Michael De Vlieger, Jun 09 2019 *)
  • PARI
    terms(n) = my(s=0, i=0); for(k=1, n-1, if(i>=n, break); s+=sigma(2*k); print1(s, ", "); i++)
    /* Print initial 50 terms as follows: */
    terms(50) \\ Felix Fröhlich, Jun 08 2019
    
  • PARI
    a(n) = sum(k=1, 2*n, if (!(k%2), sigma(k))); \\ Michel Marcus, Jun 08 2019
    
  • Python
    from math import isqrt
    def A326124(n): return (t:=isqrt(m:=n>>1))**2*(t+1) - sum((q:=m//k)*((k<<1)+q+1) for k in range(1,t+1))-3*((s:=isqrt(n))**2*(s+1) - sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1))>>1) # Chai Wah Wu, Oct 21 2023

Formula

a(n) = A024916(2n) - A326123(n).
a(n) ~ 5 * Pi^2 * n^2 / 24. - Vaclav Kotesovec, Aug 18 2021

A355200 Numbers k that can be written as the sum of 3 divisors of k (not necessarily distinct).

Original entry on oeis.org

3, 4, 6, 8, 9, 12, 15, 16, 18, 20, 21, 24, 27, 28, 30, 32, 33, 36, 39, 40, 42, 44, 45, 48, 51, 52, 54, 56, 57, 60, 63, 64, 66, 68, 69, 72, 75, 76, 78, 80, 81, 84, 87, 88, 90, 92, 93, 96, 99, 100, 102, 104, 105, 108, 111, 112, 114, 116, 117, 120, 123, 124, 126, 128, 129, 132, 135
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 23 2022

Keywords

Comments

From Bernard Schott, Aug 06 2023: (Start)
Equivalently: positive numbers that are divisible by 3 or by 4.
Proof (similar to the proof proposed by Robert Israel in A355641).
If k is divisible by 3, then k is in the sequence because k = k/3 + k/3 + k/3.
If k is divisible by 4, then k is in the sequence because k = k/2 + k/4 + k/4.
Moreover, if k is positive and divisible by 6 (A008588), then k = k/3 + k/3 + k/3, but k is also in the sequence because k = k/2 + k/3 + k/6.
Conversely, to show that every term of this sequence is divisible by 3 or by 4, we consider all positive integer solutions of the equation 1 = 1/a + 1/b + 1/c. Without loss of generality, we may assume a <= b <= c, then 3/a >= 1/a + 1/b + 1/c = 1. So a <= 3. Similarly, given a, we have 2/b >= 1/b + 1/c = 1 - 1/a, so b <= 2/(1 - 1/a).
-> if a = 1, then 1 = 1 + 1/b + 1/c; this equation has clearly no solution.
-> if a = 2, then 1/2 = 1/b + 1/c with b <= 2/(1 - 1/2) = 4; in this case, there are two solutions: (a,b,c) = (2,3,6) or (a,b,c) = (2,4,4).
-> if a = 3, then 2/3 = 1/b + 1/c with b <= 2/(1 - 1/3) = 3; in this case, there is one solution: (a,b,c) = (3,3,3).
It turns out that there are only 3 solutions with a <= b <= c. Each corresponds to a possible pattern k = k/a + k/b + k/c for writing k as the sum of 3 of its divisors, which works when k is divisible by 3 or by 4. (End)
From David A. Corneth, Aug 07 2023: (Start)
Proof that a(n + 6) = a(n) + 12.
As k is in the sequence, k = k/d1 + k/d2 + k/d3 where d1, d2 and d3 | k and they are not necessarily distinct. By discussion above from Bernard Schott, Aug 06 2023, (d1, d2, d3) are in {(2, 3, 6), (2, 4, 4), (3, 3, 3)}. The lcm of these tuples are 6, 4 and 3 respectively. So any number k in the sequence is divisible by 3, 4 or 6.
This tells us that if k is in the sequence then k + 12 is in the sequence since k + 12 is divisible by one of 3, 4 or 6 since lcm(3, 4, 6) = 12.
So we can write a(n + m) = a(n) + 12 for some m. Inspection gives m = 6 so a(n + 6) = a(n) + 12. (End)

Examples

			6 is in the sequence since it can be written as the sum of 3 of its (not necessarily distinct) divisors: 6 = 1+2+3 = 2+2+2 with 1|6, 2|6, and 3|6.
		

Crossrefs

Numbers k that can be written as the sum of j divisors of k (not necessarily distinct) for j=1..10: A000027 (j=1), A299174 (j=2), this sequence (j=3), A354591 (j=4), A355641 (j=5), A356609 (j=6), A356635 (j=7), A356657 (j=8), A356659 (j=9), A356660 (j=10).
Equals positive terms of A008585 union A008586.

Programs

  • Mathematica
    q[n_, k_] := AnyTrue[Tuples[Divisors[n], k], Total[#] == n &]; Select[Range[135], q[#, 3] &] (* Amiram Eldar, Aug 21 2022 *)
    Table[2n + (Sin[Pi*n/3] + Sin[2*Pi*n/3])/Sqrt[3], {n, 100}] (* Wesley Ivan Hurt, Oct 30 2023 *)
    CoefficientList[Series[(3 - 2*x + 4*x^2 - 2*x^3 + 3*x^4)/((x - 1)^2*(1 + x^2 + x^4)), {x, 0, 80}], x] (* Wesley Ivan Hurt, Jul 17 2025 *)
  • PARI
    isok(k) = my(d=divisors(k)); forpart(p=k, if (setintersect(d, Set(p)) == Set(p), return(1)), , [3,3]); \\ Michel Marcus, Aug 21 2022
    
  • PARI
    is(n) = my(v = [3,4,6]); sum(i = 1, 3, n%v[i] == 0) > 0 \\ David A. Corneth, Oct 08 2022

Formula

a(n + 6) = a(n) + 12. - David A. Corneth, Oct 08 2022
Sum_{n>=1} (-1)^(n+1)/a(n) = 2*log(2)/3 - log(3)/4. - Amiram Eldar, Sep 10 2023
From Wesley Ivan Hurt, Oct 30 2023: (Start)
a(n) = 2*n + (sin(Pi*n/3) + sin(2*Pi*n/3))/sqrt(3).
a(n) = A005843(n) + A134667(n). (End)
From Wesley Ivan Hurt, Jul 17 2025: (Start)
G.f.: x*(3-2*x+4*x^2-2*x^3+3*x^4)/((x-1)^2*(1+x^2+x^4)).
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - 2*a(n-4) + 2*a(n-5) - a(n-6). (End)

A354591 Numbers k that can be written as the sum of 4 divisors of k (not necessarily distinct).

Original entry on oeis.org

4, 6, 8, 10, 12, 16, 18, 20, 24, 28, 30, 32, 36, 40, 42, 44, 48, 50, 52, 54, 56, 60, 64, 66, 68, 70, 72, 76, 78, 80, 84, 88, 90, 92, 96, 100, 102, 104, 108, 110, 112, 114, 116, 120, 124, 126, 128, 130, 132, 136, 138, 140, 144, 148, 150, 152, 156, 160, 162, 164, 168, 170, 172
Offset: 1

Views

Author

Wesley Ivan Hurt, Aug 18 2022

Keywords

Comments

All terms are even. - Robert Israel, Aug 31 2022
Is it true that a(n) = 2*A080671(n)? - Michel Marcus, Sep 01 2022 (True for n <= 10000. - N. J. A. Sloane, Sep 01 2022)
This is true. In other words, k is in the sequence if and only if k is even and divisible by 3, 4 or 5. Proof: the positive integer solutions of 1/a + 1/b + 1/c + 1/d = 1 can be enumerated explicitly, and each contains at least one even number and at least one divisible by 3, 4 or 5. Of course k = k/a + k/b + k/c + k/d if and only if 1 = 1/a + 1/b + 1/c + 1/d, and this writes k as the sum of 4 divisors of k if k is divisible by a,b,c, and d. If k is even and divisible by 3, we can use 1 = 1/3 + 1/3 + 1/6 + 1/6; if divisible by 4, 1 = 1/4 + 1/4 + 1/4 + 1/4; if even and divisible by 5, 1 = 1/2 + 1/5 + 1/5 + 1/10. - Robert Israel, Sep 01 2022
The asymptotic density of this sequence is 11/30. - Amiram Eldar, Aug 08 2023

Examples

			20 is in the sequence since 20 = 10+5+4+1 = 5+5+5+5 where each summand divides 20.
		

Crossrefs

Numbers k that can be written as the sum of j divisors of k (not necessarily distinct) for j=1..10: A000027 (j=1), A299174 (j=2), A355200 (j=3), this sequence (j=4), A355641 (j=5), A356609 (j=6), A356635 (j=7), A356657 (j=8), A356659 (j=9), A356660 (j=10).
Cf. A080671.

Programs

  • Maple
    F:= proc(x,S,j) option remember;
          local s,k;
          if j = 0  then return(x = 0) fi;
          if S = [] or x > j*S[-1] then return false fi;
          s:= S[-1];
          for k from 0 to min(j,floor(x/s)) do
            if procname(x-k*s, S[1..-2],j-k) then return true fi
          od;
          false
    end proc:
    select(t -> F(t, sort(convert(numtheory:-divisors(t),list)),4), [$1..200]); # Robert Israel, Aug 31 2022
  • Mathematica
    q[n_, k_] := AnyTrue[Tuples[Divisors[n], k], Total[#] == n &]; Select[Range[200], q[#, 4] &] (* Amiram Eldar, Aug 19 2022 *)
    CoefficientList[Series[2 (2 - x + 2*x^2 - x^3 + 2*x^4 + x^6 + 2*x^8 + x^10 + 2*x^12 + x^14 + 2*x^16 - x^17 + 2*x^18 - x^19 + 2*x^20)/((x^10 - x^9 + x^8 - x^7 + x^6 - x^5 + x^4 - x^3 + x^2 - x + 1)*(1 + x + x^5 + x^6 + x^7 + x^8 + x^9 + x^2 + x^4 + x^3 + x^10)*(x - 1)^2), {x, 0, 50}], x] (* Wesley Ivan Hurt, Jul 17 2025 *)
  • PARI
    isok(k) = my(d=divisors(k)); forpart(p=k, if (setintersect(d, Set(p)) == Set(p), return(1)), , [4,4]); \\ Michel Marcus, Aug 19 2022

Formula

a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - 2*a(n-4) + 2*a(n-5) - 2*a(n-6) + 2*a(n-7) - 2*a(n-8) + 2*a(n-9) - 2*a(n-10) + 2*a(n-11) - 2*a(n-12) + 2*a(n-13) - 2*a(n-14) + 2*a(n-15) - 2*a(n-16) + 2*a(n-17) - 2*a(n-18) + 2*a(n-19) - 2*a(n-20) + 2*a(n-21) - a(n-22). - Wesley Ivan Hurt, Jun 29 2024
G.f.: 2*x*(2 - x + 2*x^2 - x^3 + 2*x^4 + x^6 + 2*x^8 + x^10 + 2*x^12 + x^14 + 2*x^16 - x^17 + 2*x^18 - x^19 + 2*x^20)/((x^10 - x^9 + x^8 - x^7 + x^6 - x^5 + x^4 - x^3 + x^2 - x + 1)*(1 + x + x^5 + x^6 + x^7 + x^8 + x^9 + x^2 + x^4 + x^3 + x^10)*(x - 1)^2). - Wesley Ivan Hurt, Jul 17 2025

A355641 Numbers k that can be written as the sum of 5 divisors of k (not necessarily distinct).

Original entry on oeis.org

5, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, 28, 30, 32, 35, 36, 40, 42, 45, 48, 50, 54, 55, 56, 60, 63, 64, 65, 66, 70, 72, 75, 78, 80, 81, 84, 85, 88, 90, 95, 96, 98, 99, 100, 102, 104, 105, 108, 110, 112, 114, 115, 117, 120, 125, 126, 128, 130, 132, 135, 136, 138
Offset: 1

Views

Author

Wesley Ivan Hurt, Aug 18 2022

Keywords

Comments

Numbers that are divisible by at least one of 5, 6, 8, 9, 14 and 21. For proof see link. - Robert Israel, Sep 01 2022
The asymptotic density of this sequence is 17/35. - Amiram Eldar, Aug 08 2023

Examples

			9 is in the sequence since 9 = 3+3+1+1+1, where each summand divides 9.
		

Crossrefs

Numbers k that can be written as the sum of j divisors of k (not necessarily distinct) for j=1..10: A000027 (j=1), A299174 (j=2), A355200 (j=3), A354591 (j=4), this sequence (j=5), A356609 (j=6), A356635 (j=7), A356657 (j=8), A356659 (j=9), A356660 (j=10).

Programs

  • Maple
    F:= proc(x,S,j) option remember;
          local s,k;
          if j = 0  then return(x = 0) fi;
          if S = [] or x > j*S[-1]  or x < j*S[1] then return false fi;
          s:= S[-1];
          for k from 0 to min(j,floor(x/s)) do
            if procname(x-k*s, S[1..-2],j-k) then return true fi
          od;
          false
    end proc:
    select(t -> F(t, sort(convert(numtheory:-divisors(t),list)),5), [$1..200]); # Robert Israel, Aug 31 2022
  • Mathematica
    q[n_, k_] := AnyTrue[Tuples[Divisors[n], k], Total[#] == n &]; Select[Range[140], q[#, 5] &] (* Amiram Eldar, Aug 19 2022 *)
  • PARI
    isok(k) = my(d=divisors(k)); forpart(p=k, if (setintersect(d, Set(p)) == Set(p), return(1)), , [5,5]); \\ Michel Marcus, Aug 19 2022

A356609 Numbers k that can be written as the sum of 6 divisors of k (not necessarily distinct).

Original entry on oeis.org

6, 8, 10, 12, 14, 16, 18, 20, 24, 28, 30, 32, 36, 40, 42, 44, 48, 50, 52, 54, 56, 60, 64, 66, 70, 72, 78, 80, 84, 88, 90, 96, 98, 100, 102, 104, 108, 110, 112, 114, 120, 126, 128, 130, 132, 136, 138, 140, 144, 150, 152, 154, 156, 160, 162, 168, 170, 174, 176, 180, 182, 184, 186, 190
Offset: 1

Views

Author

Wesley Ivan Hurt, Aug 18 2022

Keywords

Comments

Numbers divisible by at least one of 6, 8, 10, 14, 44, 52. For proof see link. - Robert Israel, Sep 02 2022
The asymptotic density of this sequence is 483/1430. - Amiram Eldar, Aug 08 2023

Examples

			18 is in the sequence since 18 = 9+2+2+2+2+1, where each summand divides 18.
		

Crossrefs

Numbers k that can be written as the sum of j divisors of k (not necessarily distinct) for j=1..10: A000027 (j=1), A299174 (j=2), A355200 (j=3), A354591 (j=4), A355641 (j=5), this sequence (j=6), A356635 (j=7), A356657 (j=8), A356659 (j=9), A356660 (j=10).

Programs

  • Maple
    filter:= n-> ormap(t -> n mod t = 0, [6,8,10,14,44,52]):
    select(filter, [$1..200]); # Robert Israel, Sep 02 2022
  • Mathematica
    q[n_, k_] := AnyTrue[Tuples[Divisors[n], k], Total[#] == n &]; Select[Range[200], q[#, 6] &] (* Amiram Eldar, Aug 19 2022 *)
  • PARI
    isok(k) = my(d=divisors(k)); forpart(p=k, if (setintersect(d, Set(p)) == Set(p), return(1)), , [6,6]); \\ Michel Marcus, Aug 19 2022

A353889 Lexicographically earliest sequence of distinct positive integers with no finite subset summing to a power of 2.

Original entry on oeis.org

3, 6, 9, 11, 19, 24, 43, 69, 77, 123, 192, 261, 507, 699, 1029, 1536, 2043, 4101, 5637, 8187, 12288, 16389, 32763, 45051, 65541, 98304, 131067, 262149, 360453, 524283, 786432, 1048581, 2097147, 2883579, 4194309, 6291456, 8388603, 16777221, 23068677, 33554427
Offset: 1

Views

Author

Rémy Sigrist, May 09 2022

Keywords

Comments

The sequence is well defined:
- a(1) = 3,
- for n > 0, let k be such that 2^k + 1 + a(1) + ... + a(n) < 2^(k+1),
- then a(n+1) <= 2^k + 1.
The variant where we avoid powers of 3 corresponds to the positive even numbers (A299174).

Examples

			- 1 = 2^0, so 1 is not a term,
- 2 = 2^1, so 2 is not a term,
- a(1) = 3 (as 3 is not a power of 2),
- 4 = 2^2, so 4 is not a term,
- 3 + 5 = 2^3, so 5 is not a term,
- a(2) = 6 (as neither 6 nor 3 + 6 is a power of 2),
- 3 + 6 + 7 = 2^4, so 7 is not a term,
- 8 = 2^3, so 8 is not a term,
- a(3) = 9 (as none of 9, 3 + 9, 6 + 9, 3 + 6 + 9 is a power of 2).
		

Crossrefs

Cf. similar sequences: A052349 (prime numbers), A133662 (square numbers), A353966 (Fibonacci numbers), A353969 (factorial numbers), A353980 (primorial numbers), A353983 (Catalan numbers), A354005 (Pell numbers).

Programs

  • Python
    from math import gcd
    from itertools import count, islice
    def agen(): # generator of terms
        a, ss, pows2, m = [], set(), {1, 2}, 2
        for k in count(1):
            if k in pows2: continue
            elif k > m: m <<= 1; pows2.add(m)
            if any(p2-k in ss for p2 in pows2): continue
            a.append(k); yield k
            ss |= {k} | {k+si for si in ss if k+si not in ss}
            while m < max(ss): m <<= 1; pows2.add(m)
    print(list(islice(agen(), 32))) # Michael S. Branicky, Jun 09 2023
Showing 1-10 of 29 results. Next