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

A359678 Number of multisets (finite weakly increasing sequences of positive integers) with zero-based weighted sum (A359674) equal to n > 0.

Original entry on oeis.org

1, 2, 4, 4, 6, 9, 8, 10, 14, 13, 16, 21, 17, 22, 28, 23, 30, 37, 30, 38, 46, 38, 46, 59, 46, 55, 70, 59, 70, 86, 67, 81, 96, 84, 98, 115, 95, 114, 135, 114, 132, 158, 127, 156, 178, 148, 176, 207, 172, 201, 227, 196, 228, 270, 222, 255, 296, 255, 295, 338, 278
Offset: 1

Views

Author

Gus Wiseman, Jan 15 2023

Keywords

Comments

The zero-based weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} (i-1)*y_i.

Examples

			The a(1) = 1 through a(8) = 10 multisets:
  {1,1}  {1,2}  {1,3}    {1,4}  {1,5}    {1,6}      {1,7}    {1,8}
         {2,2}  {2,3}    {2,4}  {2,5}    {2,6}      {2,7}    {2,8}
                {3,3}    {3,4}  {3,5}    {3,6}      {3,7}    {3,8}
                {1,1,1}  {4,4}  {4,5}    {4,6}      {4,7}    {4,8}
                                {5,5}    {5,6}      {5,7}    {5,8}
                                {1,1,2}  {6,6}      {6,7}    {6,8}
                                         {1,2,2}    {7,7}    {7,8}
                                         {2,2,2}    {1,1,3}  {8,8}
                                         {1,1,1,1}           {1,2,3}
                                                             {2,2,3}
		

Crossrefs

The one-based version is A320387.
Number of appearances of n > 0 in A359674.
The sorted minimal ranks are A359675, reverse A359680.
The minimal ranks are A359676, reverse A359681.
The maximal ranks are A359757.
A053632 counts compositions by zero-based weighted sum.
A124757 gives zero-based weighted sums of standard compositions, rev A231204.

Programs

  • Mathematica
    zz[n_]:=Select[IntegerPartitions[n],UnsameQ@@#&&GreaterEqual @@ Differences[Append[#,0]]&];
    Table[Sum[Append[z,0][[1]]-Append[z,0][[2]],{z,zz[n]}],{n,30}]
  • PARI
    seq(n)={Vec(sum(k=2, (sqrtint(8*n+1)+1)\2, my(t=binomial(k, 2)); x^t/((1-x^t)*prod(j=1, k-1, 1 - x^(t-binomial(j, 2)) + O(x^(n-t+1))))))} \\ Andrew Howroyd, Jan 22 2023

Formula

G.f.: Sum_{k>=2} x^binomial(k,2)/((1 - x^binomial(k,2))*Product_{j=1..k-1} (1 - x^(binomial(k,2)-binomial(j,2)))). - Andrew Howroyd, Jan 22 2023

A359755 Positions of first appearances in the sequence of weighted sums of prime indices (A304818).

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 10, 12, 15, 16, 18, 20, 24, 26, 28, 36, 40, 46, 48, 50, 52, 56, 62, 68, 74, 76, 86, 88, 92, 94, 106, 107, 118, 122, 124, 131, 134, 136, 142, 146, 152, 158, 164, 166, 173, 178, 188, 193, 194, 199, 202, 206, 214, 218, 226, 229, 236, 239, 254
Offset: 1

Views

Author

Gus Wiseman, Jan 15 2023

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.
The weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} i*y_i.

Examples

			The terms together with their prime indices begin:
    1: {}
    2: {1}
    3: {2}
    4: {1,1}
    6: {1,2}
    7: {4}
    8: {1,1,1}
   10: {1,3}
   12: {1,1,2}
   15: {2,3}
   16: {1,1,1,1}
   18: {1,2,2}
   20: {1,1,3}
   24: {1,1,1,2}
		

Crossrefs

The version for standard compositions is A089633, zero-based A359756.
Positions of first appearances in A304818, reverse A318283.
The zero-based version is A359675, unsorted A359676.
The reverse zero-based version is A359680, unsorted A359681.
This is the sorted version of A359682, reverse A359679.
The reverse version is A359754.
A053632 counts compositions by weighted sum.
A112798 lists prime indices, length A001222, sum A056239.
A320387 counts multisets by weighted sum, zero-based A359678.
A358136 lists partial sums of prime indices, ranked by A358137, rev A359361.

Programs

  • Mathematica
    nn=1000;
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    ots[y_]:=Sum[i*y[[i]],{i,Length[y]}];
    seq=Table[ots[primeMS[n]],{n,1,nn}];
    Select[Range[nn],FreeQ[seq[[Range[#-1]]],seq[[#]]]&]

A359674 Zero-based weighted sum of the prime indices of n in weakly increasing order.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 0, 3, 2, 3, 0, 5, 0, 4, 3, 6, 0, 6, 0, 7, 4, 5, 0, 9, 3, 6, 6, 9, 0, 8, 0, 10, 5, 7, 4, 11, 0, 8, 6, 12, 0, 10, 0, 11, 8, 9, 0, 14, 4, 9, 7, 13, 0, 12, 5, 15, 8, 10, 0, 14, 0, 11, 10, 15, 6, 12, 0, 15, 9, 11, 0, 17, 0, 12, 9, 17, 5, 14, 0, 18
Offset: 1

Views

Author

Gus Wiseman, Jan 13 2023

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.
The zero-based weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} (i-1)*y_i.

Examples

			The prime indices of 12 are {1,1,2}, so a(12) = 0*1 + 1*1 + 2*2 = 5.
		

Crossrefs

Positions of last appearances (except 0) are A001248.
Positions of 0's are A008578.
The version for standard compositions is A124757, reverse A231204.
The one-based version is A304818, reverse A318283.
Positions of first appearances are A359675, reverse A359680.
First position of n is A359676(n), reverse A359681.
The reverse version is A359677, firsts A359679.
Number of appearances of positive n is A359678(n).
A053632 counts compositions by zero-based weighted sum.
A112798 lists prime indices, length A001222, sum A056239.
A358136 lists partial sums of prime indices, ranked by A358137, rev A359361.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    wts[y_]:=Sum[(i-1)*y[[i]],{i,Length[y]}];
    Table[wts[primeMS[n]],{n,100}]

A359676 Least positive integer whose weakly increasing prime indices have zero-based weighted sum n (A359674).

Original entry on oeis.org

1, 4, 6, 8, 14, 12, 16, 20, 30, 24, 32, 36, 40, 52, 48, 56, 100, 72, 80, 92, 96, 104, 112, 124, 136, 148, 176, 152, 214, 172, 184, 188, 262, 212, 272, 236, 248, 244, 304, 268, 346, 284, 328, 292, 386, 316, 398, 332, 376, 356, 458, 388, 478, 404, 472, 412, 526
Offset: 1

Views

Author

Gus Wiseman, Jan 14 2023

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.
The zero-based weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} (i-1)*y_i.

Examples

			The terms together with their prime indices begin:
    1: {}
    4: {1,1}
    6: {1,2}
    8: {1,1,1}
   14: {1,4}
   12: {1,1,2}
   16: {1,1,1,1}
   20: {1,1,3}
   30: {1,2,3}
   24: {1,1,1,2}
   32: {1,1,1,1,1}
   36: {1,1,2,2}
   40: {1,1,1,3}
   52: {1,1,6}
   48: {1,1,1,1,2}
		

Crossrefs

First position of n in A359674, reverse A359677.
The sorted version is A359675, reverse A359680.
The reverse one-based version is A359679, sorted A359754.
The reverse version is A359681.
The one-based version is A359682, sorted A359755.
The version for standard compositions is A359756, one-based A089633.
A053632 counts compositions by zero-based weighted sum.
A112798 lists prime indices, length A001222, sum A056239.
A124757 gives zero-based weighted sum of standard compositions, rev A231204.
A304818 gives weighted sums of prime indices, reverse A318283.
A320387 counts multisets by weighted sum, zero-based A359678.
A358136 lists partial sums of prime indices, ranked by A358137, rev A359361.

Programs

  • Mathematica
    nn=20;
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    wts[y_]:=Sum[(i-1)*y[[i]],{i,Length[y]}];
    seq=Table[wts[primeMS[n]],{n,1,Prime[nn]^2}];
    Table[Position[seq,k][[1,1]],{k,0,nn}]

A359677 Zero-based weighted sum of the reversed (weakly decreasing) prime indices of n.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 3, 2, 1, 0, 3, 0, 1, 2, 6, 0, 4, 0, 3, 2, 1, 0, 6, 3, 1, 6, 3, 0, 4, 0, 10, 2, 1, 3, 7, 0, 1, 2, 6, 0, 4, 0, 3, 6, 1, 0, 10, 4, 5, 2, 3, 0, 9, 3, 6, 2, 1, 0, 7, 0, 1, 6, 15, 3, 4, 0, 3, 2, 5, 0, 11, 0, 1, 7, 3, 4, 4, 0, 10, 12, 1, 0, 7, 3
Offset: 1

Views

Author

Gus Wiseman, Jan 13 2023

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.
The zero-based weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} (i-1)*y_i.

Examples

			The reversed prime indices of 12 are (2,1,1), so a(12) = 0*2 + 1*1 + 2*1 = 3.
		

Crossrefs

Positions of 0's are A008578.
Positions of 1's are A100484.
The version for standard compositions is A231204, reverse of A124757.
The one-based version is A318283, unreversed A304818.
The one-based version for standard compositions is A359042, rev of A029931.
This is the reverse version of A359674.
First position of n is A359679(n), reverse of A359675.
Positions of first appearances are A359680, reverse of A359676.
A053632 counts compositions by weighted sum.
A112798 lists prime indices, length A001222, sum A056239.
A358136 lists partial sums of prime indices, ranked by A358137, rev A359361.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    wts[y_]:=Sum[(i-1)*y[[i]],{i,Length[y]}];
    Table[wts[Reverse[primeMS[n]]],{n,100}]

A359682 Least positive integer whose weakly increasing prime indices have weighted sum (A304818) equal to n.

Original entry on oeis.org

1, 2, 3, 4, 7, 6, 8, 10, 15, 12, 16, 18, 20, 26, 24, 28, 50, 36, 40, 46, 48, 52, 56, 62, 68, 74, 88, 76, 107, 86, 92, 94, 131, 106, 136, 118, 124, 122, 152, 134, 173, 142, 164, 146, 193, 158, 199, 166, 188, 178, 229, 194, 239, 202, 236, 206, 263, 214, 271, 218
Offset: 0

Views

Author

Gus Wiseman, Jan 15 2023

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.
The weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} i*y_i.

Examples

			The 5 numbers with weighted sum of prime indices 12, together with their prime indices:
  20: {1,1,3}
  27: {2,2,2}
  33: {2,5}
  37: {12}
  49: {4,4}
Hence a(12) = 20.
		

Crossrefs

The version for standard compositions is A089633, zero-based A359756.
First position of n in A304818, reverse A318283.
The greatest instead of least is A359497, reverse A359683.
The sorted zero-based version is A359675, reverse A359680.
The zero-based version is A359676, reverse A359681.
The reverse version is A359679.
The sorted version is A359755, reverse A359754.
A112798 lists prime indices, length A001222, sum A056239.
A320387 counts multisets by weighted sum, zero-based A359678.
A358136 lists partial sums of prime indices, ranked by A358137, rev A359361.

Programs

  • Mathematica
    nn=20;
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    ots[y_]:=Sum[i*y[[i]],{i,Length[y]}];
    seq=Table[ots[primeMS[n]],{n,1,Prime[nn]^2}];
    Table[Position[seq,k][[1,1]],{k,0,nn}]

A359497 Greatest positive integer whose weakly increasing prime indices have weighted sum (A304818) equal to n.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 17, 19, 25, 29, 35, 49, 55, 77, 121, 91, 143, 169, 187, 221, 289, 247, 323, 361, 391, 437, 539, 605, 847, 1331, 715, 1001, 1573, 1183, 1859, 2197, 1547, 2431, 2873, 3179, 3757, 4913, 3553, 4199, 5491, 4693, 6137, 6859, 9317, 14641
Offset: 0

Views

Author

Gus Wiseman, Jan 15 2023

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.
The weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} i*y_i.

Examples

			The terms together with their prime indices begin:
    1: {}
    2: {1}
    3: {2}
    5: {3}
    7: {4}
   11: {5}
   13: {6}
   17: {7}
   19: {8}
   25: {3,3}
   29: {10}
   35: {3,4}
   49: {4,4}
   55: {3,5}
   77: {4,5}
The 5 numbers with weighted sum of prime indices 12, together with their prime indices:
  20: {1,1,3}
  27: {2,2,2}
  33: {2,5}
  37: {12}
  49: {4,4}
Hence a(12) = 49.
		

Crossrefs

First position of n in A304818, reverse A318283.
The least instead of greatest is given by A359682, reverse A359679.
The reverse version is A359683.
A112798 lists prime indices, length A001222, sum A056239.
A320387 counts multisets by weighted sum, zero-based A359678.
A358136 lists partial sums of prime indices, ranked by A358137, rev A359361.

Programs

  • Mathematica
    nn=10;
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    ots[y_]:=Sum[i*y[[i]],{i,Length[y]}];
    seq=Table[ots[primeMS[n]],{n,1,2^nn}];
    Table[Position[seq,k][[-1,1]],{k,0,nn}]
  • PARI
    a(n)={ my(recurse(r, k, m) = if(k==1, if(m>=r, prime(r)),
      my(z=0); for(j=1, min(m, (r-k*(k-1)/2)\k), z=max(z, self()(r-k*j, k-1, j)*prime(j))); z));
      if(n==0, 1, vecmax(vector((sqrtint(8*n+1)-1)\2, k, recurse(n, k, n))));
    } \\ Andrew Howroyd, Jan 21 2023

Extensions

Terms a(21) and beyond from Andrew Howroyd, Jan 21 2023

A359679 Least number with weighted sum of reversed (weakly decreasing) prime indices (A318283) equal to n.

Original entry on oeis.org

1, 2, 3, 4, 6, 10, 8, 12, 19, 18, 16, 24, 27, 36, 43, 32, 48, 59, 61, 67, 71, 64, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269
Offset: 0

Views

Author

Gus Wiseman, Jan 14 2023

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.
The weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} i*y_i.

Examples

			12 has reversed prime indices (2,1,1), with weighted sum 7, and no number < 12 has the same weighted sum of reversed prime indices, so a(7) = 12.
		

Crossrefs

The version for standard compositions is A089633, zero-based A359756.
First position of n in A318283, unreversed A304818.
The unreversed zero-based version is A359676.
The sorted zero-based version is A359680, unreversed A359675.
The zero-based version is A359681.
The unreversed version is A359682.
The greatest instead of least is A359683, unreversed A359497.
The sorted version is A359754, unreversed A359755.
A112798 lists prime indices, length A001222, sum A056239.
A320387 counts multisets by weighted sum, zero-based A359678.
A358136 lists partial sums of prime indices, ranked by A358137, rev A359361.

Programs

  • Mathematica
    nn=20;
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    ots[y_]:=Sum[i*y[[i]],{i,Length[y]}];
    seq=Table[ots[Reverse[primeMS[n]]],{n,1,Prime[nn]^2}];
    Table[Position[seq,k][[1,1]],{k,0,nn}]

A359675 Positions of first appearances in the sequence of zero-based weighted sums of prime indices (A359674).

Original entry on oeis.org

1, 4, 6, 8, 12, 14, 16, 20, 24, 30, 32, 36, 40, 48, 52, 56, 72, 80, 92, 96, 100, 104, 112, 124, 136, 148, 152, 172, 176, 184, 188, 212, 214, 236, 244, 248, 262, 268, 272, 284, 292, 304, 316, 328, 332, 346, 356, 376, 386, 388, 398, 404, 412, 428, 436, 452, 458
Offset: 1

Views

Author

Gus Wiseman, Jan 13 2023

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.
The zero-based weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} (i-1)*y_i.

Examples

			The terms together with their prime indices begin:
   1: {}
   4: {1,1}
   6: {1,2}
   8: {1,1,1}
  12: {1,1,2}
  14: {1,4}
  16: {1,1,1,1}
  20: {1,1,3}
  24: {1,1,1,2}
  30: {1,2,3}
  32: {1,1,1,1,1}
  36: {1,1,2,2}
  40: {1,1,1,3}
  48: {1,1,1,1,2}
		

Crossrefs

Positions of first appearances in A359674.
The unsorted version A359676.
The reverse version is A359680, unsorted A359681.
The reverse one-based version is A359754, unsorted A359679.
The one-based version is A359755, unsorted A359682.
The version for standard compositions is A359756, one-based A089633.
A053632 counts compositions by zero-based weighted sum.
A112798 lists prime indices, length A001222, sum A056239.
A124757 gives zero-based weighted sum of standard compositions, rev A231204.
A304818 gives weighted sum of prime indices, reverse A318283.
A320387 counts multisets by weighted sum, zero-based A359678.
A358136 lists partial sums of prime indices, ranked by A358137, rev A359361.

Programs

  • Mathematica
    nn=100;
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    wts[y_]:=Sum[(i-1)*y[[i]],{i,Length[y]}];
    seq=Table[wts[primeMS[n]],{n,1,nn}];
    Select[Range[nn],FreeQ[seq[[Range[#-1]]],seq[[#]]]&]

A359680 Positions of first appearances in the sequence of zero-based weighted sums of reversed prime indices (A359677).

Original entry on oeis.org

1, 4, 8, 9, 16, 18, 32, 36, 50, 54, 64, 72, 81, 100, 108, 128, 144, 216, 243, 256, 288, 300, 400, 432, 486, 512, 576, 600, 648, 729, 800, 864, 1024, 1152, 1296, 1350, 1728, 1944, 2048, 2187, 2304, 2400, 2916, 3375, 3456, 3600, 4096, 4374, 4608, 4800, 5184
Offset: 1

Views

Author

Gus Wiseman, Jan 15 2023

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.
The zero-based weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} (i-1)*y_i.

Examples

			The terms together with their prime indices begin:
     1: {}
     4: {1,1}
     8: {1,1,1}
     9: {2,2}
    16: {1,1,1,1}
    18: {1,2,2}
    32: {1,1,1,1,1}
    36: {1,1,2,2}
    50: {1,3,3}
    54: {1,2,2,2}
    64: {1,1,1,1,1,1}
    72: {1,1,1,2,2}
    81: {2,2,2,2}
   100: {1,1,3,3}
   108: {1,1,2,2,2}
   128: {1,1,1,1,1,1,1}
		

Crossrefs

The unreversed version is A359675, unsorted A359676.
Positions of first appearances in A359677, unreversed A359674.
This is the sorted version of A359681.
The one-based version is A359754, unsorted A359679.
The unreversed one-based version is A359755, unsorted A359682.
The version for standard compositions is A359756, one-based A089633.
A053632 counts compositions by zero-based weighted sum.
A112798 lists prime indices, length A001222, sum A056239, reverse A296150.
A124757 gives zero-based weighted sums of standard compositions, rev A231204.
A304818 gives weighted sum of prime indices, reverse A318283.
A320387 counts multisets by weighted sum, zero-based A359678.
A358136 lists partial sums of prime indices, ranked by A358137, rev A359361.

Programs

  • Mathematica
    nn=1000;
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    wts[y_]:=Sum[(i-1)*y[[i]],{i,Length[y]}];
    seq=Table[wts[Reverse[primeMS[n]]],{n,1,nn}];
    Select[Range[nn],FreeQ[seq[[Range[#-1]]],seq[[#]]]&]
Showing 1-10 of 14 results. Next