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

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[[#]]]&]

A359683 Greatest positive integer whose reversed (weakly decreasing) prime indices have weighted sum (A318283) equal to n.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 14, 22, 26, 34, 44, 55, 68, 85, 110, 130, 170, 190, 242, 290, 374, 418, 506, 638, 748, 836, 1012, 1276, 1364, 1628, 1914, 2090, 2552, 3190, 3410, 4070, 4510, 5060, 6380, 7018, 8140, 9020, 9922, 11396, 14036, 15004, 17908, 19844, 21692, 23452
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}
     14: {1,4}
     22: {1,5}
     26: {1,6}
     34: {1,7}
     44: {1,1,5}
     55: {3,5}
     68: {1,1,7}
     85: {3,7}
    110: {1,3,5}
    130: {1,3,6}
    170: {1,3,7}
    190: {1,3,8}
    242: {1,5,5}
    290: {1,3,10}
The 6 numbers with weighted sum of reversed prime indices 9, together with their prime indices:
  18: {1,2,2}
  23: {9}
  25: {3,3}
  28: {1,1,4}
  33: {2,5}
  34: {1,7}
Hence a(9) = 34.
		

Crossrefs

First position of n in A318283, unreversed A304818.
The unreversed version is A359497.
The least instead of greatest is A359679, unreversed A359682.
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[Reverse[primeMS[n]]],{n,1,2^nn}];
    Table[Position[seq,k][[-1,1]],{k,0,nn}]

Extensions

More terms from Jinyuan Wang, Jan 26 2023

A359756 First position of n in the sequence of zero-based weighted sums of standard compositions (A124757), if we start with position 0.

Original entry on oeis.org

0, 3, 6, 7, 13, 14, 15, 27, 29, 30, 31, 55, 59, 61, 62, 63, 111, 119, 123, 125, 126
Offset: 0

Views

Author

Gus Wiseman, Jan 17 2023

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.
The zero-based weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} (i-1)*y_i.
Is this sequence strictly increasing?

Examples

			The terms together with their standard compositions begin:
    0: ()
    3: (1,1)
    6: (1,2)
    7: (1,1,1)
   13: (1,2,1)
   14: (1,1,2)
   15: (1,1,1,1)
   27: (1,2,1,1)
   29: (1,1,2,1)
   30: (1,1,1,2)
   31: (1,1,1,1,1)
		

Crossrefs

The one-based version is A089633, for prime indices A359682.
First index of n in A124757, reverse A231204.
The version for prime indices is A359676, reverse A359681.
A053632 counts compositions by zero-based weighted sum.
A066099 lists standard compositions.
A304818 gives weighted sums of prime indices, reverse A318283.
A320387 counts multisets by weighted sum, zero-based A359678.

Programs

  • Mathematica
    nn=10;
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    wts[y_]:=Sum[(i-1)*y[[i]],{i,Length[y]}];
    seq=Table[wts[stc[n]],{n,0,2^(nn-1)}];
    Table[Position[seq,k][[1,1]]-1,{k,0,nn}]

Formula

Appears to be the complement of A083329 in A089633.

A359757 Greatest positive integer whose weakly increasing prime indices have zero-based weighted sum (A359674) equal to n.

Original entry on oeis.org

4, 9, 25, 49, 121, 169, 289, 361, 529, 841, 961, 1369, 1681, 1849, 2209, 2809, 3481, 3721, 4489, 5041, 5329, 6241, 6889, 7921, 9409, 10201, 12167, 11449, 15341, 24389, 16399, 26071, 29791, 31117, 35557, 50653, 39401, 56129, 68921, 58867, 72283, 83521, 79007, 86903, 103823
Offset: 1

Views

Author

Gus Wiseman, Jan 16 2023

Keywords

Comments

Appears to first differ from A001248 at a(27) = 12167, A001248(27) = 10609.
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:
    4: {1,1}
    9: {2,2}
   25: {3,3}
   49: {4,4}
  121: {5,5}
  169: {6,6}
  289: {7,7}
  361: {8,8}
  529: {9,9}
  841: {10,10}
		

Crossrefs

The one-based version is A359497, minimum A359682 (sorted A359755).
Last position of n in A359674, reverse A359677.
The minimum instead of maximum is A359676, sorted A359675, reverse A359681.
A053632 counts compositions by zero-based weighted sum.
A112798 lists prime indices, length A001222, sum A056239, reverse A296150.
A124757 = zero-based weighted sum of standard compositions, reverse A231204.
A304818 gives weighted sums of prime indices, reverse A318283.
A320387 counts multisets by weighted sum, zero-based A359678.
A358136 = partial sums of prime indices, ranked by A358137, reverse A359361.

Programs

  • Mathematica
    nn=10;
    prix[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[prix[n]],{n,2^nn}];
    Table[Position[seq,k][[-1,1]],{k,nn}]
  • PARI
    a(n)={ my(recurse(r, k, m) = if(k==1, if(m>=r, prime(r)^2),
        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));
      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
Previous Showing 11-14 of 14 results.