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 10 results.

A035470 Number of ways to break {1,2,3,...,n} into sets with equal sums.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 6, 12, 11, 2, 80, 166, 2, 665, 2918, 3309, 9296, 23730, 31875, 301030, 422897, 2, 13716867, 71504980, 100664385, 54148591, 880696662, 498017759, 27450476787, 111911522819, 179459955554, 2144502175214, 59115423983, 45837019664552, 375743493787258, 816118711787493, 2, 9492169507922
Offset: 1

Views

Author

Keywords

Comments

a(n) = 2 <=> |{d|n*(n+1)/2 : d>=n}| = 2. - Alois P. Heinz, Sep 03 2009

Examples

			a(7) = 6 since we have 1234567, 16/25/34/7, 167/2345, 257/1346, 347/1256, 356/1247.
From _Gus Wiseman_, Jul 13 2019: (Start)
The a(6) = 2 through a(9) = 11 set partitions with equal block-sums:
  {123456}      {1234567}        {12345678}        {123456789}
  {16}{25}{34}  {1247}{356}      {12348}{567}      {12345}{69}{78}
                {1256}{347}      {12357}{468}      {1239}{456}{78}
                {1346}{257}      {12456}{378}      {1248}{357}{69}
                {167}{2345}      {1278}{3456}      {1257}{348}{69}
                {16}{25}{34}{7}  {1368}{2457}      {1347}{258}{69}
                                 {1458}{2367}      {1356}{249}{78}
                                 {1467}{2358}      {159}{2346}{78}
                                 {1236}{48}{57}    {159}{267}{348}
                                 {138}{246}{57}    {168}{249}{357}
                                 {156}{237}{48}    {18}{27}{36}{45}{9}
                                 {18}{27}{36}{45}
(End)
		

Crossrefs

Programs

  • Maple
    with(numtheory): b:= proc() option remember; local i, j, t; `if`(args[1]=0, `if`(nargs=2, 1, b(args[t] $t=2..nargs)), add(`if`(args[j] -args[nargs] <0, 0, b(sort([seq(args[i] -`if`(i=j, args[nargs], 0), i=1..nargs-1)])[], args[nargs]-1)), j=1..nargs-1)) end: a:= proc(n) local i, m, x; m:= n*(n+1)/2; 1+ add(b(i$(m/i), n)/(m/i)!, i=[select(x-> x>=n, divisors(m) minus {m})[]]) end: seq(a(n), n=1..25);  # Alois P. Heinz, Sep 03 2009
  • Mathematica
    b[args_List] := b[args] = If[args[[1]] == 0, If[Length[args] == 2, 1, b[Rest[args]]], Sum[If[args[[j]] - args[[-1]] < 0, 0, b[Sort[Join[Table[ args[[i]] - If[i == j, args[[-1]], 0], {i, 1, Length[args]-1}]]], {args[[-1]]-1}]], {j, 1, Length[args]-1}]]; b[a1_List, a2_List] := b[Join[a1, a2]];
    a[n_] := a[n] = With[{m = n*(n+1)/2}, 1+Sum[b[Append[Array[i&, m/i], n]] / (m/i)!, {i, Select[Divisors[m] ~Complement~ {m}, # >= n &]}]];
    Table[Print["a(", n, ") = ", a[n]]; a[n], {n, 1, 25}] (* Jean-François Alcover, Mar 22 2017, after Alois P. Heinz *)
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Length[Select[sps[Range[n]],SameQ@@Total/@#&]],{n,0,10}] (* Gus Wiseman, Jul 13 2019 *)

Extensions

More terms from John W. Layman, Mar 18 2002
a(19)-a(33) from Alois P. Heinz, Sep 03 2009
a(34) from Alois P. Heinz, May 24 2015
a(35)-a(38) from Max Alekseyev, Feb 15 2024

A068443 Triangular numbers which are the product of two primes.

Original entry on oeis.org

6, 10, 15, 21, 55, 91, 253, 703, 1081, 1711, 1891, 2701, 3403, 5671, 12403, 13861, 15931, 18721, 25651, 34453, 38503, 49141, 60031, 64261, 73153, 79003, 88831, 104653, 108811, 114481, 126253, 146611, 158203, 171991, 188191, 218791, 226801, 258121, 269011
Offset: 1

Views

Author

Stephan Wagler (stephanwagler(AT)aol.com), Mar 09 2002

Keywords

Comments

These triangular numbers are equal to p * (2p +- 1).
All terms belong to A006987. For n>2 all terms are odd and belong to A095147. - Alexander Adamchuk, Oct 31 2006
A156592 is a subsequence. - Reinhard Zumkeller, Feb 10 2009
Triangular numbers with exactly 4 divisors. - Jon E. Schoenfield, Sep 05 2018

Examples

			Triangular numbers begin 0, 1, 3, 6, 10, ...; 6=2*3, and 2 and 3 are two distinct primes; 10=2*5, and 2 and 5 are two distinct primes, etc. - _Vladimir Joseph Stephan Orlovsky_, Feb 27 2009
a(11) = 1891 and 1891 = 31 * 61.
		

Crossrefs

Programs

  • Maple
    q:= n-> is(numtheory[bigomega](n)=2):
    select(q, [i*(i+1)/2$i=0..1000])[];  # Alois P. Heinz, Mar 27 2024
  • Mathematica
    Select[ Table[ n(n + 1)/2, {n, 1000}], Apply[Plus, Transpose[ FactorInteger[ # ]] [[2]]] == 2 &]
    Select[Accumulate[Range[1000]],PrimeOmega[#]==2&] (* Harvey P. Dale, Apr 03 2016 *)
  • PARI
    list(lim)=my(v=List());forprime(p=2,(sqrtint(lim\1*8+1)+1)\4, if(isprime(2*p-1),listput(v,2*p^2-p)); if(isprime(2*p+1), listput(v,2*p^2+p))); Vec(v) \\ Charles R Greathouse IV, Jun 13 2013

Formula

A010054(a(n))*A064911(a(n)) = 1. - Reinhard Zumkeller, Dec 03 2009
a(n) = A000217(A164977(n)). - Zak Seidov, Feb 16 2015

Extensions

Edited by Robert G. Wilson v, Jul 08 2002
Definition corrected by Zak Seidov, Mar 09 2008

A069904 Number of prime factors of n-th triangular number (with multiplicity).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Apr 10 2002

Keywords

Examples

			A000217(8) = 8*(8+1)/2 = 36 = 2*2*3*3, therefore a(8) = 4.
		

Crossrefs

Programs

Formula

a(n) = A001222(A000217(n)).
From Antti Karttunen, Oct 07 2017: (Start)
a(n) = (A001222(n)+A001222(n+1))-1.
a(n) = A001222(A278253(n)). (End)
From Alois P. Heinz, Aug 05 2019: (Start)
a(n) = 2 <=> n in { A164977 }.
a(n) = 3 <=> n in { A108815 }.
a(n) = 4 <=> n in { A114435 }.
a(n) = 5 <=> n in { A114436 }.
a(n) = 6 <=> n in { A114437 }.
a(n) = 7 <=> n in { A240527 }.
a(n) = 8 <=> n in { A240528 }.
a(n) = 9 <=> n in { A240529 }.
a(n) = 10 <=> n im { A101745 }. (End)

A350593 Numbers k such that tau(k) + tau(k+1) = 6, where tau is the number of divisors function A000005.

Original entry on oeis.org

5, 6, 7, 10, 13, 22, 37, 46, 58, 61, 73, 82, 106, 157, 166, 178, 193, 226, 262, 277, 313, 346, 358, 382, 397, 421, 457, 466, 478, 502, 541, 562, 586, 613, 661, 673, 718, 733, 757, 838, 862, 877, 886, 982, 997, 1018, 1093, 1153, 1186, 1201, 1213, 1237, 1282
Offset: 1

Views

Author

Jon E. Schoenfield, Jan 08 2022

Keywords

Comments

Since tau(k) + tau(k+1) = 6, (tau(k), tau(k+1)) must be (1,5), (2,4), (3,3), (4,2), or (5,1); of these, (1,5) and (5,1) are impossible (tau(m) = 1 only for m=1, but then neither m+1 nor m-1 would have 5 divisors), and (3,3) is also impossible (both k and k+1 would have to be squares of primes), so (tau(k), tau(k+1)) must be either (2,4) or (4,2).
For every prime p, tau(p) = 2. For every semiprime s, tau(s) = 4, with the exception of the squares of primes; for p prime, tau(p^2) = 3, since the divisors of p^2 are 1, p, and p^2.
The only numbers that have exactly 4 divisors but are not semiprimes are the cubes of primes; for prime p, the divisors of p^3 are 1, p, p^2, and p^3.
As a result, this sequence consists of:
(1) the primes p such that (p+1)/2 is prime (A005383), with the exception of p=3 (since p+1 = 4 has 3 divisors, not 4),
(2) semiprimes of the form prime - 1 (A077065), with the exception of the semiprime 4 (since it does not have 4 divisors), and
(3) the special case k = 7, since it is the unique prime p such that p+1 has 4 divisors but is not a semiprime.
For all k > 4, tau(k) + tau(k+1) >= 6; for k = 1..4, tau(k) + tau(k+1) = 3, 4, 5, 5.

Examples

			   k  tau(k)  tau(k+1)  tau(k) + tau(k+1)
  --  ------  --------  -----------------
   1     1        2         1 + 2 = 3
   2     2        2         2 + 2 = 4
   3     2        3         2 + 3 = 5
   4     3        2         3 + 2 = 5
   5     2        4         2 + 4 = 6   so   5 = a(1)
   6     4        2         4 + 2 = 6   so   6 = a(2)
   7     2        4         2 + 4 = 6   so   7 = a(3)
   8     4        3         4 + 3 = 7
   9     3        4         3 + 4 = 7
  10     4        2         4 + 2 = 6   so  10 = a(4)
  11     2        6         2 + 6 = 8
  12     6        2         6 + 2 = 8
  13     2        4         2 + 4 = 6   so  13 = a(5)
		

Crossrefs

Numbers k such that Sum_{j=0..N-1} tau(k+j) = 2*Sum_{k=1..N} tau(k): A000040 (N=1), (this sequence) (N=2), A350675 (N=3), A350686 (N=4), A350699 (N=5), A350769 (N=6), A350773 (N=7), A350854 (N=8).

Programs

  • Mathematica
    Select[Range[1300], Plus @@ DivisorSigma[0, # + {0, 1}] == 6 &] (* Amiram Eldar, Jan 08 2022 *)
    Position[Total/@Partition[DivisorSigma[0,Range[1300]],2,1],6]//Flatten (* Harvey P. Dale, Sep 03 2022 *)
  • PARI
    isok(k) = numdiv(k) + numdiv(k+1) == 6; \\ Michel Marcus, Jan 08 2022
    
  • Python
    from itertools import count, islice
    from sympy import divisor_count
    def A350093_gen(): # generator of terms
        a, b = divisor_count(1), divisor_count(2)
        for k in count(1):
            if a + b == 6:
                yield k
            a, b = b, divisor_count(k+2)
    A350093_list = list(islice(A350093_gen(),12)) # Chai Wah Wu, Jan 11 2022

Formula

{ k : tau(k) + tau(k+1) = 6 }.
UNION(A005383 \ {3}, A077065 \ {4}, {7}).
a(n) = A164977(n+1) for n>=4. - Hugo Pfoertner, Jan 08 2022

A164978 Number of divisors of n*(n+1)/2 that are >= n.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 3, 4, 3, 2, 4, 4, 2, 4, 7, 4, 3, 3, 4, 7, 4, 2, 6, 8, 3, 4, 7, 4, 4, 4, 5, 9, 4, 4, 11, 6, 2, 4, 11, 6, 4, 4, 4, 11, 6, 2, 8, 11, 4, 6, 7, 4, 4, 7, 11, 11, 4, 2, 8, 8, 2, 6, 16, 11, 7, 4, 4, 7, 8, 4, 9, 9, 2, 6, 11, 8, 8, 4, 8, 18, 5, 2, 8, 15, 4, 4, 11, 6, 6, 11, 8, 7, 4, 4, 18, 10, 3, 8
Offset: 1

Views

Author

Alois P. Heinz, Sep 03 2009

Keywords

Comments

a(n) = 2 <=> the set S = {1..n} has only one decomposition into smaller subsets with equal element sum.

Examples

			a(6) = 2, because 6*7/2=21 with divisors {1,3,7,21}, but only 7 and 21 are >=6. S={1..6} has only one decomposition into smaller subsets with equal element sum: {1,6}, {2,5}, {3,4}.
a(7) = 3; 7*8/2=28 with divisors {1,2,4,7,14,28}, 3 of which are >=7. S={1..7} has 5 decompositions into smaller subsets with equal element sum.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= n-> nops(select(x-> x>=n, divisors(n*(n+1)/2))):
    seq(a(n), n=1..120);

Formula

a(n) = |{d|n*(n+1)/2 : d>=n}|.

A112956 a(n) = number of ways the set {1,2,...,n} can be split into proper subsets with equal sums.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 5, 11, 10, 1, 79, 165, 1, 664, 2917, 3308, 9295, 23729, 31874, 301029, 422896, 1, 13716866, 71504979, 100664384, 54148590, 880696661, 498017758, 27450476786, 111911522818, 179459955553, 2144502175213, 59115423982, 45837019664551
Offset: 1

Views

Author

Floor van Lamoen, Oct 07 2005

Keywords

Comments

For n=7 we have splittings 761/5432, 752/6431, 743/6521, 7421/653 and 7/61/52/43 so a(7)=5.
a(n) = 1 <=> n*(n+1)/2 is product of two primes. - Alois P. Heinz, Sep 03 2009

Crossrefs

Cf. A035470.
Cf. A164977, A164978. - Alois P. Heinz, Sep 03 2009

Programs

  • Maple
    with(numtheory): b:= proc() option remember; local i, j, t; `if`(args[1]=0, `if`(nargs=2, 1, b(args[t] $t=2..nargs)), add(`if`(args[j] -args[nargs] <0, 0, b(sort([seq(args[i] -`if`(i=j, args[nargs], 0), i=1..nargs-1)])[], args[nargs]-1)), j=1..nargs-1)) end: a:= proc(n) local i, m, x; m:= n*(n+1)/2; add(b(i$(m/i), n)/(m/i)!, i=[select(x-> x>=n, divisors(m) minus {m})[]]) end: seq(a(n), n=1..25);  # Alois P. Heinz, Sep 03 2009
  • Mathematica
    b[args_List] := b[args] = If[args[[1]] == 0, If[Length[args] == 2, 1, b[Rest[args]]], Sum[If[args[[j]] - args[[-1]] < 0, 0, b[Sort[Join[ Table[ args[[i]] - If[i == j, args[[-1]], 0], {i, 1, Length[args] - 1}]]], {args[[-1]] - 1}]], {j, 1, Length[args] - 1}]]; b[a1_List, a2_List] := b[Join[a1, a2]];
    a[n_] := a[n] = With[{m = n*(n + 1)/2}, Sum[b[Append[Array[i&, m/i], n]] / (m/i)!, {i, Select[Divisors[m] ~Complement~ {m}, # >= n&]}]];
    Table[Print["a(", n, ") = ", a[n]]; a[n], {n, 1, 25}] (* Jean-François Alcover, Mar 22 2017, after Alois P. Heinz *)

Formula

a(n) = A035470(n) - 1. - Franklin T. Adams-Watters, Jun 02 2006

Extensions

More terms from Franklin T. Adams-Watters, Jun 02 2006
a(19)-a(33) from Alois P. Heinz, Sep 03 2009
a(34) from Alois P. Heinz, Aug 06 2016

A240527 Indices of 7-almost prime triangular numbers.

Original entry on oeis.org

64, 95, 127, 135, 143, 144, 159, 160, 175, 191, 192, 207, 215, 216, 242, 243, 272, 279, 296, 323, 335, 350, 360, 368, 375, 404, 405, 415, 416, 431, 432, 448, 455, 459, 464, 479, 485, 504, 527, 528, 543, 544, 559, 584, 594, 615, 620, 623, 647, 656, 672, 719
Offset: 1

Views

Author

Vincenzo Librandi, Apr 07 2014

Keywords

Examples

			a(1) = 64 because A000217(64) = 64*(64+1)/2 = 2080 = 2^5 * 5 * 13 is a 7-almost prime.
		

Crossrefs

Programs

  • Mathematica
    Flatten[Position[Accumulate[Range[800]],_?(PrimeOmega[#]==7&)]]

Formula

{ m : A069904(m) = 7 }. - Alois P. Heinz, Aug 05 2019

A240528 Indices of 8-almost prime triangular numbers.

Original entry on oeis.org

63, 80, 128, 256, 287, 288, 319, 320, 324, 383, 399, 440, 447, 480, 495, 539, 560, 567, 576, 608, 640, 648, 671, 675, 703, 720, 729, 799, 831, 863, 927, 935, 972, 975, 1000, 1007, 1055, 1056, 1071, 1079, 1080, 1104, 1119, 1120, 1160, 1175, 1183, 1184
Offset: 1

Views

Author

Vincenzo Librandi, Apr 07 2014

Keywords

Examples

			a(1) = 63 because A000217(63) = 63*(63+1)/2 = 2016 = 2^5 * 3^2 * 7 is an 8-almost prime.
		

Crossrefs

Cf. A046310 (8-almost primes).

Programs

  • GAP
    F:=List([1..1200],n->Length(Factors(n*(n+1)/2)));; a:=Filtered([1..Length(F)],i->F[i]=8); # Muniru A Asiru, Dec 22 2018
    
  • Magma
    [n: n in [2..1200] | &+[d[2]: d in Factorization((n*(n+1)))] eq 9]; // Vincenzo Librandi, Dec 22 2018
  • Mathematica
    Flatten[Position[Accumulate[Range[1500]], _?(PrimeOmega[#]== 8 &)]]

Formula

{ m : A069904(m) = 8 }. - Alois P. Heinz, Aug 05 2019

A240529 Indices of 9-almost prime triangular numbers.

Original entry on oeis.org

224, 351, 624, 704, 735, 768, 783, 800, 832, 864, 895, 944, 959, 960, 999, 1151, 1152, 1224, 1279, 1343, 1344, 1375, 1440, 1520, 1539, 1824, 1855, 1935, 1943, 1944, 1952, 2000, 2144, 2159, 2176, 2187, 2295, 2367, 2430, 2432, 2464, 2495, 2496, 2499, 2511
Offset: 1

Views

Author

Vincenzo Librandi, Apr 07 2014

Keywords

Examples

			a(1) = 224 because A000217(224) = 224*(224+1)/2 = 25200 = 2^4 * 3^2 * 5^2 * 7 is a 9-almost prime.
		

Crossrefs

Programs

  • GAP
    F:=List([1..2600],n->Length(Factors(n*(n+1)/2)));; a:=Filtered([1..Length(F)],i->F[i]=9); # Muniru A Asiru, Dec 22 2018
  • Magma
    [n: n in [2..2600] | &+[d[2]: d in Factorization((n*(n+1)))] eq 10]; // Vincenzo Librandi, Dec 22 2018
    
  • Mathematica
    Flatten[Position[Accumulate[Range[3500]], _?(PrimeOmega[#]== 9 &)]]
    Select[Range[3000], PrimeOmega[(# (# + 1))/2] == 9 &] (* Harvey P. Dale, Jun 22 2017 *)

Formula

{ m : A069904(m) = 9 }. - Alois P. Heinz, Aug 05 2019

A320438 Irregular triangle read by rows where T(n,k) is the number of set partitions of {1,...,n} with all block-sums equal to d, where d is the k-th divisor of n*(n+1)/2 that is >= n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 3, 7, 1, 1, 9, 1, 1, 1, 1, 43, 35, 1, 1, 102, 62, 1, 1, 1, 1, 68, 595, 1, 1, 17, 187, 871, 1480, 361, 1, 1, 2650, 657, 1, 1, 9294, 1, 1, 23728, 1, 1, 27763, 4110, 1, 1, 1850, 25035, 108516, 157991, 7636, 1, 1, 11421, 411474, 1
Offset: 1

Views

Author

Gus Wiseman, Jan 08 2019

Keywords

Examples

			Triangle begins:
    1
    1
    1    1
    1    1
    1    1
    1    1
    1    4    1
    1    3    7    1
    1    9    1
    1    1
    1   43   35    1
    1  102   62    1
    1    1
    1   68  595    1
    1   17  187  871 1480  361    1
    1 2650  657    1
Row 8 counts the following set partitions:
  {{18}{27}{36}{45}}  {{1236}{48}{57}}  {{12348}{567}}  {{12345678}}
                      {{138}{246}{57}}  {{12357}{468}}
                      {{156}{237}{48}}  {{12456}{378}}
                                        {{1278}{3456}}
                                        {{1368}{2457}}
                                        {{1458}{2367}}
                                        {{1467}{2358}}
		

Crossrefs

Programs

  • Mathematica
    spsu[,{}]:={{}};spsu[foo,set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@spsu[Select[foo,Complement[#,Complement[set,s]]=={}&],Complement[set,s]]]/@Cases[foo,{i,_}];
    Table[Length[spsu[Select[Subsets[Range[n]],Total[#]==d&],Range[n]]],{n,12},{d,Select[Divisors[n*(n+1)/2],#>=n&]}]

Extensions

More terms from Jinyuan Wang, Feb 27 2025
Name edited by Peter Munn, Mar 06 2025
Showing 1-10 of 10 results.