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.

A359754 Positions of first appearances in the sequence of weighted sums of reversed prime indices (A318283).

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 10, 12, 16, 18, 19, 24, 27, 32, 36, 43, 48, 59, 61, 64, 67, 71, 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: 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}
    8: {1,1,1}
   10: {1,3}
   12: {1,1,2}
   16: {1,1,1,1}
   18: {1,2,2}
   19: {8}
   24: {1,1,1,2}
   27: {2,2,2}
   32: {1,1,1,1,1}
   36: {1,1,2,2}
   43: {14}
   48: {1,1,1,1,2}
		

Crossrefs

Positions of first appearances in A318283, unreversed A304818.
This is the sorted version of A359679.
The zero-based version is A359680, unreversed A359675.
The unreversed version is A359755, unsorted A359682.
A053632 counts compositions by weighted sum.
A112798 lists prime indices, length A001222, sum A056239, reverse A296150.
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}]]]];
    ots[y_]:=Sum[i*y[[i]],{i,Length[y]}];
    seq=Table[ots[Reverse[primeMS[n]]],{n,1,nn}];
    Select[Range[nn],FreeQ[seq[[Range[#-1]]],seq[[#]]]&]

A363619 Weighted alternating sum of the multiset of prime indices of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 12 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.
We define the weighted alternating sum of a sequence (y_1,...,y_k) to be Sum_{i=1..k} (-1)^(i-1) i * y_i.

Examples

			The prime indices of 300 are {1,1,2,3,3}, with weighted alternating sum 1*1 - 2*1 + 3*2 - 4*3 + 5*3 = 8, so a(300) = 8.
		

Crossrefs

The non-alternating version is A304818, reverse A318283.
The unweighted version is A316524, reverse A344616.
The reverse version is A363620.
The triangle for this rank statistic is A363622, reverse A363623.
For partitions instead of multisets we have A363624, reverse A363625.
A055396 gives minimum prime index, maximum A061395.
A112798 lists prime indices, length A001222, sum A056239.
A264034 counts partitions by weighted sum, reverse A358194.
A320387 counts multisets by weighted sum, zero-based A359678.
A359677 gives zero-based weighted sum of prime indices, reverse A359674.

Programs

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

A363624 Weighted alternating sum of the integer partition with Heinz number n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 13 2023

Keywords

Comments

The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
We define the weighted alternating sum of a sequence (y_1,...,y_k) to be Sum_{i=1..k} (-1)^(i - 1) * i * y_i.

Examples

			The partition with Heinz number 600 is (3,3,2,1,1,1), with weighted alternating sum 1*3 - 2*3 + 3*2 - 4*1 + 5*1 - 6*1 = -2, so a(600) = -2.
		

Crossrefs

The non-alternating version is A318283, reverse A304818.
The unweighted version is A344616, reverse A316524.
For multisets instead of partitions we have A363619.
Positions of zeros are A363621, counted by A363532.
The triangle for this rank statistic is A363622, reverse A363623.
The reverse version is A363625, for multisets A363620.
A055396 gives minimum prime index, maximum A061395.
A112798 lists prime indices, length A001222, sum A056239.
A264034 counts partitions by weighted sum, reverse A358194.
A320387 counts multisets by weighted sum, reverse A007294.
A359677 gives zero-based weighted sum of prime indices, reverse A359674.
A363626 counts compositions with reverse-weighted alternating sum 0.

Programs

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

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.