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 21-27 of 27 results.

A253553 a(1) = 1; for n>1, if A241917(n) = 0 [i.e., n is a term of A070003], a(n) = A052126(n), otherwise a(n) = A252462(n).

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 5, 4, 3, 6, 7, 8, 11, 10, 9, 8, 13, 6, 17, 12, 15, 14, 19, 16, 5, 22, 9, 20, 23, 18, 29, 16, 21, 26, 25, 12, 31, 34, 33, 24, 37, 30, 41, 28, 27, 38, 43, 32, 7, 10, 39, 44, 47, 18, 35, 40, 51, 46, 53, 36, 59, 58, 45, 32, 55, 42, 61, 52, 57, 50, 67, 24, 71, 62, 15, 68, 49, 66, 73, 48, 27
Offset: 1

Views

Author

Antti Karttunen, Jan 12 2015

Keywords

Comments

If the exponent of the largest prime dividing n is larger than one, subtract one from that exponent. Otherwise, shift that "lonely largest prime" one step towards smaller primes.
For any number n >= 2 in binary trees A253563 and A253565, a(n) gives the number which is the parent of n.

Crossrefs

Cf. A252464 (the number of iterations of n -> a(n) needed to reach 1 from n.)

Programs

  • PARI
    A253553(n) = if(n<=2,1,my(f=factor(n), k=#f~); if(f[k,2]>1,f[k,2]--,f[k,1] = precprime(f[k,1]-1)); factorback(f)); \\ Antti Karttunen, Jul 17 2020
    
  • Scheme
    (define (A253553 n) (cond ((<= n 1) n) ((zero? (A241917 n)) (A052126 n)) (else (A252462 n))))

Formula

a(1) = 1; for n>1, if A241917(n) = 0 [i.e., n is a term of A070003], a(n) = A052126(n), otherwise a(n) = A252462(n).
a(n) = A122111(A252463(A122111(n))). - Antti Karttunen, Jul 14 2020

A358195 Heinz number of the partial sums plus one of the reversed first differences of the prime indices of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 4, 2, 5, 1, 9, 1, 7, 3, 8, 1, 6, 1, 25, 5, 11, 1, 27, 2, 13, 4, 49, 1, 15, 1, 16, 7, 17, 3, 18, 1, 19, 11, 125, 1, 35, 1, 121, 9, 23, 1, 81, 2, 10, 13, 169, 1, 12, 5, 343, 17, 29, 1, 75, 1, 31, 25, 32, 7, 77, 1, 289, 19, 21, 1, 54, 1, 37
Offset: 1

Views

Author

Gus Wiseman, Dec 23 2022

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.
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 partial sums of first differences of a sequence telescope to "rest minus first", leading to the formula.

Examples

			The prime indices of 36 are (1,1,2,2), differences (0,1,0), reversed (0,1,0), partial sums (0,1,1), plus one (1,2,2), Heinz number 18, so a(36) = 18.
		

Crossrefs

The even bisection is A241916.
The unreversed version is A246277.
Sum of prime indices of a(n) is A326844(n) + A001222(n) - 1.
A048793 gives partial sums of reversed standard comps, Heinz number A019565.
A112798 list prime indices, sum A056239.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    osq[q_]:=1+Accumulate[Reverse[Differences[q]]];
    Table[Times@@Prime/@osq[primeMS[n]],{n,20}]

Formula

If n = Product_{i=1..k} prime(x_i) then a(n) = Product_{i=1..k-1} prime(x_k-x_{k-i}+1).

A356958 Triangle read by rows: if n has weakly increasing prime indices (a,b,...,y,z) then row n is (b-a+1, ..., y-a+1, z-a+1).

Original entry on oeis.org

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

Views

Author

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

			Triangle begins:
   1:   .
   2:   .
   3:   .
   4:   1
   5:   .
   6:   2
   7:   .
   8:  1 1
   9:   1
  10:   3
  11:   .
  12:  1 2
  13:   .
  14:   4
  15:   2
  16: 1 1 1
For example, the prime indices of 315 are (2,2,3,4), so row 315 is (2,3,4) - 2 + 1 = (1,2,3).
		

Crossrefs

Row lengths are A001222(n) - 1.
Indices of empty rows are A008578.
Even bisection is A112798.
Heinz numbers of rows are A246277.
An opposite version is A358172, Heinz numbers A358195.
Row sums are A359358(n) + A001222(n) - 1.
A112798 list prime indices, sum A056239.
A243055 subtracts the least prime index from the greatest.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[If[n==1,{},1-First[primeMS[n]]+Rest[primeMS[n]]],{n,100}]

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}]

A358172 Triangle read by rows: if n has weakly increasing prime indices (a,b,...,y,z) then row n is (z-a+1, z-b+1, ..., z-y+1).

Original entry on oeis.org

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

Views

Author

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

			Triangle begins:
   1:   .
   2:   .
   3:   .
   4:   1
   5:   .
   6:   2
   7:   .
   8:  1 1
   9:   1
  10:   3
  11:   .
  12:  2 2
  13:   .
  14:   4
  15:   2
  16: 1 1 1
  17:   .
  18:  2 1
  19:   .
  20:  3 3
For example, the prime indices of 900 are (1,1,2,2,3,3), so row 900 is 3 - (1,1,2,2,3) + 1 = (3,3,2,2,1).
		

Crossrefs

Row lengths are A001222(n) - 1.
Indices of empty rows are A008578.
Even-indexed rows have sums A243503.
Row sums are A326844(n) + A001222(n) - 1.
An opposite version is A356958, Heinz numbers A246277.
Heinz numbers of the rows are A358195, even bisection A241916.
A112798 list prime indices, sum A056239.
A243055 subtracts the least prime index from the greatest.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[If[n==1,{},1+Last[primeMS[n]]-Most[primeMS[n]]],{n,100}]

A356300 Square array read by antidiagonals. A(n,k) is the nearest common ancestor of n and k in the binary tree depicted in A253563.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 03 2022

Keywords

Comments

Array is symmetric and is read by antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ... .
Also the nearest common ancestor of n and k in the tree depicted in A253565 (the mirror image of the A253563-tree).

Examples

			The top left 21x21 corner of the array:
n/k  |  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21
-----+----------------------------------------------------------------------------
   1 |  1, 1, 1, 1, 1, 1, 1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,
   2 |  1, 2, 2, 2, 2, 2, 2, 2, 2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,
   3 |  1, 2, 3, 2, 3, 2, 3, 2, 3,  2,  3,  2,  3,  2,  3,  2,  3,  2,  3,  2,  3,
   4 |  1, 2, 2, 4, 2, 4, 2, 4, 2,  4,  2,  4,  2,  4,  2,  4,  2,  4,  2,  4,  2,
   5 |  1, 2, 3, 2, 5, 2, 5, 2, 3,  2,  5,  2,  5,  2,  3,  2,  5,  2,  5,  2,  3,
   6 |  1, 2, 2, 4, 2, 6, 2, 4, 2,  6,  2,  4,  2,  6,  2,  4,  2,  6,  2,  4,  2,
   7 |  1, 2, 3, 2, 5, 2, 7, 2, 3,  2,  7,  2,  7,  2,  3,  2,  7,  2,  7,  2,  3,
   8 |  1, 2, 2, 4, 2, 4, 2, 8, 2,  4,  2,  8,  2,  4,  2,  8,  2,  4,  2,  8,  2,
   9 |  1, 2, 3, 2, 3, 2, 3, 2, 9,  2,  3,  2,  3,  2,  9,  2,  3,  2,  3,  2,  9,
  10 |  1, 2, 2, 4, 2, 6, 2, 4, 2, 10,  2,  4,  2, 10,  2,  4,  2,  6,  2,  4,  2,
  11 |  1, 2, 3, 2, 5, 2, 7, 2, 3,  2, 11,  2, 11,  2,  3,  2, 11,  2, 11,  2,  3,
  12 |  1, 2, 2, 4, 2, 4, 2, 8, 2,  4,  2, 12,  2,  4,  2,  8,  2,  4,  2, 12,  2,
  13 |  1, 2, 3, 2, 5, 2, 7, 2, 3,  2, 11,  2, 13,  2,  3,  2, 13,  2, 13,  2,  3,
  14 |  1, 2, 2, 4, 2, 6, 2, 4, 2, 10,  2,  4,  2, 14,  2,  4,  2,  6,  2,  4,  2,
  15 |  1, 2, 3, 2, 3, 2, 3, 2, 9,  2,  3,  2,  3,  2, 15,  2,  3,  2,  3,  2, 15,
  16 |  1, 2, 2, 4, 2, 4, 2, 8, 2,  4,  2,  8,  2,  4,  2, 16,  2,  4,  2,  8,  2,
  17 |  1, 2, 3, 2, 5, 2, 7, 2, 3,  2, 11,  2, 13,  2,  3,  2, 17,  2, 17,  2,  3,
  18 |  1, 2, 2, 4, 2, 6, 2, 4, 2,  6,  2,  4,  2,  6,  2,  4,  2, 18,  2,  4,  2,
  19 |  1, 2, 3, 2, 5, 2, 7, 2, 3,  2, 11,  2, 13,  2,  3,  2, 17,  2, 19,  2,  3,
  20 |  1, 2, 2, 4, 2, 4, 2, 8, 2,  4,  2, 12,  2,  4,  2,  8,  2,  4,  2, 20,  2,
  21 |  1, 2, 3, 2, 3, 2, 3, 2, 9,  2,  3,  2,  3,  2, 15,  2,  3,  2,  3,  2, 21,
.
A(3,6) = A(6,3) = 2 because the nearest common ancestor of 3 and 6 in the tree described in A253563 (and in A253565) is 2.
A(4,6) = A(6,4) = 4 because 6 occurs as a descendant of 4 in A253563-tree, thus their nearest common ancestor is 4 itself.
		

Crossrefs

Programs

  • PARI
    up_to = 105;
    A253553(n) = if(n<=2,1,my(f=factor(n), k=#f~); if(f[k,2]>1,f[k,2]--,f[k,1] = precprime(f[k,1]-1)); factorback(f));
    A356300sq(x,y) = if(1==x||1==y,1, my(lista=List([]), i, k=x, stemvec, stemlen, h=y); while(k>1, listput(lista,k); k = A253553(k)); stemvec = Vecrev(Vec(lista)); stemlen = #stemvec; while(1, if((i=vecsearch(stemvec,h))>0, return(stemvec[i])); h = A253553(h)));
    A356300list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A356300sq(col,(a-(col-1))))); (v); };
    v356300 = A356300list(up_to);
    A356300(n) = v356300[n];

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 21-27 of 27 results.