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

A253564 Permutation of natural numbers: a(n) = A156552(A122111(n)).

Original entry on oeis.org

0, 1, 3, 2, 7, 5, 15, 4, 6, 11, 31, 9, 63, 23, 13, 8, 127, 10, 255, 19, 27, 47, 511, 17, 14, 95, 12, 39, 1023, 21, 2047, 16, 55, 191, 29, 18, 4095, 383, 111, 35, 8191, 43, 16383, 79, 25, 767, 32767, 33, 30, 22, 223, 159, 65535, 20, 59, 71, 447
Offset: 1

Views

Author

Antti Karttunen, Jan 03 2015

Keywords

Comments

Note the indexing.
a(n) (n>=2) can be obtained by the composition of a bijection between {2,3,4,...} and the set of integer partitions and a bijection between the set of integer partitions and {1,2,3,4,...}. Explanation on the example n=18. Write 18 = 3*3*2 = 2'*2'*1', where m' = m-th prime. Consider the partition p = (2,2,1) and let b denote the southeast border of the Ferrers board of p. Form a binary number by replacing each east step of b by 1 and each north step of b, with the exception of the last one, by 0: 1010. Its value is a(18) = 10. - Emeric Deutsch, Sep 08 2016.

Crossrefs

Programs

  • Maple
    a:= proc(n) local i, l, r; r, l:= 0, [0, sort(map(i->
          numtheory[pi](i[1])$i[2], ifactors(n)[2]))[]];
          for i to nops(l)-1 do
            r:= 2*((x-> 2*x+1)@@(l[i+1]-l[i]))(r)
          od; r/2
        end:
    seq(a(n), n=1..120);  # Alois P. Heinz, Jul 21 2017
  • Mathematica
    Table[Floor@ Total@ Flatten@ MapIndexed[#1 2^(#2 - 1) &, Flatten[ Table[ 2^(PrimePi@ #1 - 1), {#2}] & @@@ FactorInteger@ #]] &[If[n == 1, 1, Module[{l = #, m = 0}, Times @@ Power @@@ Table[l -= m; l = DeleteCases[l, 0]; {Prime@ Length@ l, m = Min@ l}, Length@ Union@ l]] &@ Catenate[ConstantArray[PrimePi[#1], #2] & @@@ FactorInteger@ n]]], {n, 57}] (* Michael De Vlieger, Sep 08 2016, after JungHwan Min at A122111 *)
  • Scheme
    (define (A253564 n) (A156552 (A122111 n)))

Formula

a(n) = A156552(A122111(n)).
As a composition of other permutations:
a(n) = A054429(A253566(n)).

A358170 Heinz number of the partial sums of the n-th composition in standard order (A066099).

Original entry on oeis.org

1, 2, 3, 6, 5, 15, 10, 30, 7, 35, 21, 105, 14, 70, 42, 210, 11, 77, 55, 385, 33, 231, 165, 1155, 22, 154, 110, 770, 66, 462, 330, 2310, 13, 143, 91, 1001, 65, 715, 455, 5005, 39, 429, 273, 3003, 195, 2145, 1365, 15015, 26, 286, 182, 2002, 130, 1430, 910, 10010
Offset: 0

Views

Author

Gus Wiseman, Dec 20 2022

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

Examples

			The terms together with their prime indices begin:
           1: {}
           2: {1}
           3: {2}
           6: {1,2}
           5: {3}
          15: {2,3}
          10: {1,3}
          30: {1,2,3}
           7: {4}
          35: {3,4}
          21: {2,4}
         105: {2,3,4}
          14: {1,4}
          70: {1,3,4}
          42: {1,2,4}
         210: {1,2,3,4}
		

Crossrefs

See link for sequences related to standard compositions.
Applying A001221 or A001222 gives A000120.
The image is A005117 (squarefree numbers).
The reverse version is A019565, triangular version A048793.
Greatest prime index of a(n) is A029837 or A070939.
Least prime index of a(n) is A065120.
The adjusted version is A253565, inverse A253566, reverse A005940.
These are the Heinz numbers of the rows of A358134.
Sum of prime indices of a(n) is A359042.
A066099 lists standard compositions.
A112798 list prime indices, sum A056239.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Times@@Prime/@#&/@Table[Accumulate[stc[n]],{n,0,100}]

A358169 Row n lists the first differences plus one of the prime indices of n with 1 prepended.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 01 2022

Keywords

Comments

Every nonempty composition appears as a row exactly once.
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. Here this multiset is regarded as a sequence in weakly increasing order.
Also the reversed augmented differences of the integer partition with Heinz number n, where the augmented differences aug(q) of a sequence q of length k are given by aug(q)i = q_i - q{i+1} + 1 if i < k and aug(q)_k = q_k, and the Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). The non-reversed version is A355534.

Examples

			Triangle begins:
   2: 1
   3: 2
   4: 1 1
   5: 3
   6: 1 2
   7: 4
   8: 1 1 1
   9: 2 1
  10: 1 3
  11: 5
  12: 1 1 2
  13: 6
  14: 1 4
  15: 2 2
  16: 1 1 1 1
  17: 7
  18: 1 2 1
  19: 8
  20: 1 1 3
		

Crossrefs

Row-lengths are A001222.
The first term of each row is A055396.
Row-sums are A252464.
The rows appear to be ranked by A253566.
Another variation is A287352.
Constant rows have indices A307824.
The Heinz numbers of the rows are A325351.
Strict rows have indices A325366.
Row-minima are A355531, also A355524 and A355525.
Row-maxima are A355532, non-augmented A286470, also A355526.
Reversing rows gives A355534.
The non-augmented version A355536, also A355533.
A112798 lists prime indices, sum A056239.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Differences[Prepend[primeMS[n],1]]+1,{n,30}]

A359397 Squarefree numbers with weakly decreasing first differences of 0-prepended prime indices.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 11, 13, 15, 17, 19, 21, 23, 29, 30, 31, 35, 37, 41, 43, 47, 53, 55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 89, 91, 97, 101, 103, 105, 107, 109, 113, 119, 127, 131, 133, 137, 139, 143, 149, 151, 157, 163, 167, 173, 179, 181, 187, 191, 193, 197
Offset: 1

Views

Author

Gus Wiseman, Dec 31 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

			715 has prime indices {3,5,6}, with first differences (2,1), which are weakly decreasing, so 715 is in the sequence.
		

Crossrefs

This is the squarefree case of A325362.
These are the sorted Heinz numbers of rows of A359361.
A005117 lists squarefree numbers.
A112798 lists prime indices, length A001222, sum A056239, reverse A296150.
A355536 lists first differences of prime indices, 0-prepended A287352.
A358136 lists partial sums of prime indices, row sums A318283.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],SquareFreeQ[#]&&GreaterEqual@@Differences[Prepend[primeMS[#],0]]&]

Formula

Intersection of A325362 and A005117.

A358171 The a(n)-th composition in standard order (A066099) is the first differences plus one of the prime indices of n (A112798).

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 0, 3, 1, 4, 0, 6, 0, 8, 2, 7, 0, 5, 0, 12, 4, 16, 0, 14, 1, 32, 3, 24, 0, 10, 0, 15, 8, 64, 2, 13, 0, 128, 16, 28, 0, 20, 0, 48, 6, 256, 0, 30, 1, 9, 32, 96, 0, 11, 4, 56, 64, 512, 0, 26, 0, 1024, 12, 31, 8, 40, 0, 192, 128, 18, 0, 29, 0
Offset: 1

Views

Author

Gus Wiseman, Dec 21 2022

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.
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 36 are {1,1,2,2}, with first differences plus one (1,2,1), which is the 13th composition in standard order, so a(36) = 13.
		

Crossrefs

See link for sequences related to standard compositions.
Prepend 1 to indices: A253566 (cf. A358169), inverse A253565 (cf. A242628).
Taking Heinz number instead of standard composition number gives A325352.
These compositions minus one are listed by A355536, sums A243055.
A001222 counts prime indices, distinct A001221.
A066099 lists standard compositions, lengths A000120, sums A070939.
A112798 lists prime indices, sum A056239.
A355534 = augmented diffs. of rev. prime indices, Heinz numbers A325351.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    stcinv[q_]:=Total[2^(Accumulate[Reverse[q]])]/2;
    Table[stcinv[Differences[primeMS[n]]+1],{n,100}]
Previous Showing 11-15 of 15 results.