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-20 of 28 results. Next

A357980 Replace prime(k) with prime(A000720(k)) in the prime factorization of n, assuming prime(0) = 1.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Oct 24 2022

Keywords

Comments

In the definition, taking A000720(k) in place of prime(A000720(k)) gives A357984.

Examples

			We have 90 = prime(1) * prime(2)^2 * prime(3), so a(90) = prime(0) * prime(1)^2 * prime(2) = 12.
		

Crossrefs

Other multiplicative sequences: A003961, A357852, A064988, A064989, A357980.
The version for p instead of pi is A357977, strict A357978.
The triangular version is A357984.
A000040 lists the prime numbers.
A000720 = PrimePi.
A056239 adds up prime indices, row-sums of A112798.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    mtf[f_][n_]:=Product[If[f[i]==0,1,Prime[f[i]]],{i,primeMS[n]}];
    Array[mtf[PrimePi],100]
  • PARI
    myprime(n) = if (n==0, 1, prime(n));
    a(n) = my(f=factor(n)); for (k=1, #f~, f[k,1] = myprime(primepi(primepi(f[k,1])))); factorback(f); \\ Michel Marcus, Oct 25 2022

A357852 Replace prime(k) with prime(k+2) in the prime factorization of n.

Original entry on oeis.org

1, 5, 7, 25, 11, 35, 13, 125, 49, 55, 17, 175, 19, 65, 77, 625, 23, 245, 29, 275, 91, 85, 31, 875, 121, 95, 343, 325, 37, 385, 41, 3125, 119, 115, 143, 1225, 43, 145, 133, 1375, 47, 455, 53, 425, 539, 155, 59, 4375, 169, 605, 161, 475, 61, 1715, 187, 1625, 203
Offset: 1

Views

Author

Gus Wiseman, Oct 28 2022

Keywords

Comments

This is the same as A045966 except the first term is 1 instead of 3.

Examples

			The terms together with their prime indices begin:
    1: {}
    5: {3}
    7: {4}
   25: {3,3}
   11: {5}
   35: {3,4}
   13: {6}
  125: {3,3,3}
   49: {4,4}
   55: {3,5}
   17: {7}
  175: {3,3,4}
   19: {8}
   65: {3,6}
   77: {4,5}
  625: {3,3,3,3}
		

Crossrefs

Applying the transformation only once gives A003961.
A permutation of A007310.
Other multiplicative sequences: A064988, A064989, A357977, A357980, A357983.
A000040 lists the primes.
A056239 adds up prime indices, row-sums of A112798.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Product[Prime[i+2],{i,primeMS[n]}],{n,30}]
  • PARI
    a(n) = my(f=factor(n)); for (k=1, #f~, f[k,1] = nextprime(nextprime(f[k,1]+1)+1)); factorback(f); \\ Michel Marcus, Oct 28 2022
    
  • Python
    from math import prod
    from sympy import nextprime, factorint
    def A357852(n): return prod(nextprime(p,ith=2)**e for p, e in factorint(n).items()) # Chai Wah Wu, Oct 29 2022

Formula

a(n) = A003961(A003961(n)).

A357975 Divide all prime indices by 2, round down, and take the number with those prime indices, assuming prime(0) = 1.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 3, 1, 4, 2, 3, 2, 5, 3, 4, 1, 5, 4, 7, 2, 6, 3, 7, 2, 4, 5, 8, 3, 11, 4, 11, 1, 6, 5, 6, 4, 13, 7, 10, 2, 13, 6, 17, 3, 8, 7, 17, 2, 9, 4, 10, 5, 19, 8, 6, 3, 14, 11, 19, 4, 23, 11, 12, 1, 10, 6, 23, 5, 14, 6, 29, 4, 29, 13, 8, 7, 9, 10, 31
Offset: 1

Views

Author

Gus Wiseman, Oct 23 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.
Also the Heinz number of the part-wise half (rounded down) of the partition with Heinz number n, where the Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
Each n appears A000005(n) times at odd positions (infinitely many at even). To see this, note that our transformation does not distinguish between A066207 and A066208.

Examples

			The prime indices of n = 1501500 are {1,1,2,3,3,3,4,5,6}, so the prime indices of a(n) are {1,1,1,1,2,2,3}; hence we have a(1501500) = 720.
The 6 odd positions of 2124 are: 63, 99, 105, 165, 175, 275, with prime indices:
   63: {2,2,4}
   99: {2,2,5}
  105: {2,3,4}
  165: {2,3,5}
  175: {3,3,4}
  275: {3,3,5}
		

Crossrefs

Positions of 1's are A000079.
Positions of 2's are 3 and A164095.
Positions of first appearances are A297002, sorted A066207.
A004526 is floor(n/2), with an extra first zero.
A056239 adds up prime indices, row-sums of A112798.
A109763 lists primes of index floor(n/2).

Programs

  • Mathematica
    Table[Times@@(If[#1<=2,1,Prime[Floor[PrimePi[#1]/2]]^#2]&@@@FactorInteger[n]),{n,100}]

Formula

Completely multiplicative with a(prime(2k)) = prime(k) and a(prime(2k+1)) = prime(k). Cf. A297002.
a(prime(n)) = A109763(n-1).

A357978 Replace prime(k) with prime(A000009(k)) in the prime factorization of n.

Original entry on oeis.org

1, 2, 2, 4, 3, 4, 3, 8, 4, 6, 5, 8, 7, 6, 6, 16, 11, 8, 13, 12, 6, 10, 19, 16, 9, 14, 8, 12, 29, 12, 37, 32, 10, 22, 9, 16, 47, 26, 14, 24, 61, 12, 79, 20, 12, 38, 103, 32, 9, 18, 22, 28, 131, 16, 15, 24, 26, 58, 163, 24, 199, 74, 12, 64, 21, 20, 251, 44, 38
Offset: 1

Views

Author

Gus Wiseman, Oct 24 2022

Keywords

Comments

In the definition, taking A000009(k) instead of prime(A000009(k)) gives A357982.

Examples

			We have 90 = prime(1) * prime(2)^2 * prime(3), so a(90) = prime(1) * prime(1)^2 * prime(2) = 24.
		

Crossrefs

The non-strict version is A357977.
Other multiplicative sequences: A003961, A357852, A064988, A064989, A357980.
A000040 lists the primes.
A056239 adds up prime indices, row-sums of A112798.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    mtf[f_][n_]:=Product[If[f[i]==0,1,Prime[f[i]]],{i,primeMS[n]}];
    Array[mtf[PartitionsQ],100]
  • PARI
    f9(n) = polcoeff( prod( k=1, n, 1 + x^k, 1 + x * O(x^n)), n); \\ A000009
    a(n) = my(f=factor(n)); for (k=1, #f~, f[k,1] = prime(f9(primepi(f[k,1])))); factorback(f); \\ Michel Marcus, Oct 25 2022

A357979 Second MTF-transform of A000041. Replace prime(k) with prime(A357977(k)) in the prime factorization of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 31, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 59, 32, 33, 62, 35, 36, 37, 38, 39, 40, 127, 42, 79, 44, 45, 46, 47, 48, 49, 50, 93, 52, 53, 54, 55, 56, 57, 58, 211, 60, 61, 118, 63, 64, 65, 66
Offset: 1

Views

Author

Gus Wiseman, Oct 24 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. We define the MTF-transform as applying a function horizontally along a number's prime indices; see the Mathematica program.

Examples

			We have:
- 51 = prime(2) * prime(7),
- A357977(2) = 2,
- A357977(7) = 11,
- a(51) = prime(2) * prime(11) = 93.
		

Crossrefs

Other multiplicative sequences: A003961, A357852, A064988, A064989, A357980.
Applying the transformation only once gives A357977, strict A357978.
For primes instead of partition numbers we have A357983.
A000040 lists the primes.
A056239 adds up prime indices, row-sums of A112798.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    mtf[f_][n_]:=Product[If[f[i]==0,1,Prime[f[i]]],{i,primeMS[n]}];
    Array[mtf[mtf[PartitionsP]],100]

A321874 If n = Product (p_j^k_j) then a(n) = Product (prime(p_j)^prime(k_j)).

Original entry on oeis.org

1, 9, 25, 27, 121, 225, 289, 243, 125, 1089, 961, 675, 1681, 2601, 3025, 2187, 3481, 1125, 4489, 3267, 7225, 8649, 6889, 6075, 1331, 15129, 3125, 7803, 11881, 27225, 16129, 177147, 24025, 31329, 34969, 3375, 24649, 40401, 42025, 29403, 32041, 65025, 36481, 25947, 15125
Offset: 1

Views

Author

Ilya Gutkovskiy, Nov 20 2018

Keywords

Examples

			a(12) = a(2^2 * 3^1) = prime(2)^prime(2) * prime(3)^prime(1) = 3^3 * 5^2 = 675.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Times @@ (Prime[#[[1]]]^Prime[#[[2]]] & /@ FactorInteger[n]); a[1] = 1; Table[a[n], {n, 45}]
  • PARI
    a(n) = my(f=factor(n)); prod(k=1, #f~, prime(f[k,1])^prime(f[k,2])); \\ Michel Marcus, Nov 20 2018
    
  • PARI
    apply( A321874(n)=factorback(apply(prime,factor(n))), [1..49]) \\ M. F. Hasler, Nov 20 2018

Formula

Multiplicative with a(p^e) = prime(p)^prime(e). - M. F. Hasler, Nov 20 2018
Sum_{n>=1} 1/a(n) = Product_{m>=1} (1 + Sum_{k>=1} 1/prime(m)^prime(k)) = 1.22718741... . - Amiram Eldar, Jan 20 2024

A340323 Multiplicative with a(p^e) = (p + 1) * (p - 1)^(e - 1).

Original entry on oeis.org

1, 3, 4, 3, 6, 12, 8, 3, 8, 18, 12, 12, 14, 24, 24, 3, 18, 24, 20, 18, 32, 36, 24, 12, 24, 42, 16, 24, 30, 72, 32, 3, 48, 54, 48, 24, 38, 60, 56, 18, 42, 96, 44, 36, 48, 72, 48, 12, 48, 72, 72, 42, 54, 48, 72, 24, 80, 90, 60, 72, 62, 96, 64, 3, 84, 144, 68, 54
Offset: 1

Views

Author

Keywords

Comments

Starting with any integer and repeatedly applying the map x -> a(x) reaches the fixed point 12 or the loop {3, 4}.

Examples

			a(2^s) = 3 for all s>0.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local  t;
      mul((t[1]+1)*(t[1]-1)^(t[2]-1),t=ifactors(n)[2])
    end proc:
    map(f, [$1..100]); # Robert Israel, Jan 07 2021
  • Mathematica
    fa[n_]:=fa[n]=FactorInteger[n];
    phi[1]=1; phi[p_, s_]:= (p + 1)*( p - 1)^(s - 1)
    phi[n_]:=Product[phi[fa[n][[i, 1]], fa[n][[i, 2]]], {i,Length[fa[n]]}];
    Array[phi, 245]
  • PARI
    A340323(n) = if(1==n,n,my(f=factor(n)); prod(i=1,#f~,(f[i,1]+1)*((f[i,1]-1)^(f[i,2]-1)))); \\ Antti Karttunen, Jan 06 2021

Formula

a(n) = A167344(n) / A340368(n) = A048250(n) * A326297(n). - Antti Karttunen, Jan 06 2021
Sum_{k=1..n} a(k) ~ c * n^2, where c = (zeta(6)/(2*zeta(2)*zeta(3))) * Product_{p prime} (1 + 2/p^2) = 0.56361239505... . - Amiram Eldar, Nov 12 2022

A378175 Triangle T(n,k) read by rows in which n-th row lists in increasing order all multiplicative partitions mu of n (with factors > 1) encoded as Product_{j in mu} prime(j); n>=1, 1<=k<=A001055(n).

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 27, 23, 25, 29, 33, 31, 35, 37, 39, 45, 41, 43, 51, 47, 55, 49, 53, 57, 63, 81, 59, 61, 65, 69, 75, 67, 71, 77, 87, 99, 73, 85, 79, 93, 83, 89, 91, 95, 105, 111, 117, 135, 97, 121, 101, 123, 103, 115, 125, 107, 119, 129, 153
Offset: 1

Views

Author

Alois P. Heinz, Nov 18 2024

Keywords

Examples

			The multiplicative partitions of n=8 are {[8], [4,2], [2,2,2]}, encodings give {prime(8), prime(4)*prime(2), prime(2)^3} = {19, 7*3, 3^3} => row 8 = [19, 21, 27].
For n=1 the empty partition [] gives the empty product 1.
Triangle T(n,k) begins:
   1 ;
   3 ;
   5 ;
   7,  9 ;
  11 ;
  13, 15 ;
  17 ;
  19, 21, 27 ;
  23, 25 ;
  29, 33 ;
  31 ;
  35, 37, 39, 45 ;
  41 ;
  43, 51 ;
  47, 55 ;
  49, 53, 57, 63, 81 ;
  59 ;
  ...
		

Crossrefs

Row sums give A378176.
Row lengths give A001055.
Column k=1 gives A318871.
Rightmost elements of rows give A064988.
Sorted terms give A005408.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=1, {1}, {seq(map(x-> x*
          ithprime(d), b(n/d))[], d=numtheory[divisors](n) minus {1})})
        end:
    T:= n-> sort([b(n)[]])[]:
    seq(T(n), n=1..28);

Formula

T(prime(n),1) = T(A000040(n),1) = A006450(n).

A290641 Multiplicative with a(p^e) = prime(p-1)^e.

Original entry on oeis.org

1, 2, 3, 4, 7, 6, 13, 8, 9, 14, 29, 12, 37, 26, 21, 16, 53, 18, 61, 28, 39, 58, 79, 24, 49, 74, 27, 52, 107, 42, 113, 32, 87, 106, 91, 36, 151, 122, 111, 56, 173, 78, 181, 116, 63, 158, 199, 48, 169, 98, 159, 148, 239, 54, 203, 104, 183, 214, 271, 84, 281, 226, 117, 64, 259
Offset: 1

Views

Author

Michel Marcus, Aug 08 2017

Keywords

Comments

a(n) = A064554(n) for 1 <= n < 91, but a(91) = 481 differs from A064554(91) = 463. - Georg Fischer, Oct 23 2018

Crossrefs

Programs

  • Mathematica
    Array[If[# == 1, 1, Times @@ Map[Prime[#1 - 1]^#2 & @@ # &, FactorInteger[#]]] &, 65] (* Michael De Vlieger, Apr 22 2021 *)
  • PARI
    a(n) = {my(f = factor(n)); for (k=1, #f~, f[k, 1] = prime(f[k, 1]-1);); factorback(f);}
    
  • Python
    from sympy import factorint, prime
    from operator import mul
    from functools import reduce
    def a(n):
        return 1 if n==1 else reduce(mul, [prime(p - 1)**e for p, e in factorint(n).items()])
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Aug 08 2017
  • Scheme
    (define (A290641 n) (if (= 1 n) n (* (A000040 (+ -1 (A020639 n))) (A290641 (A032742 n))))) ;; Antti Karttunen, Aug 08 2017
    

Formula

From Antti Karttunen, Aug 08 2017: (Start)
a(n) = A064989(A064988(n)).
A046523(a(n)) = A046523(n). [Preserves the prime signature of n].
(End)

A304251 If n = Product (p_j^k_j) then a(n) = Sum (prime(p_j)^k_j).

Original entry on oeis.org

0, 3, 5, 9, 11, 8, 17, 27, 25, 14, 31, 14, 41, 20, 16, 81, 59, 28, 67, 20, 22, 34, 83, 32, 121, 44, 125, 26, 109, 19, 127, 243, 36, 62, 28, 34, 157, 70, 46, 38, 179, 25, 191, 40, 36, 86, 211, 86, 289, 124, 64, 50, 241, 128, 42, 44, 72, 112, 277, 25, 283, 130, 42, 729, 52, 39, 331, 68, 88, 31
Offset: 1

Views

Author

Ilya Gutkovskiy, May 09 2018

Keywords

Examples

			a(12) = 14 because 12 = 2^2*3 and prime(2)^2 + prime(3) = 3^2 + 5 = 14.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local t;
       add(ithprime(t[1])^t[2],t=ifactors(n)[2])
    end proc:
    map(f, [$1..100]); # Robert Israel, Apr 25 2024
  • Mathematica
    a[n_] := Plus @@ (Prime[#[[1]]]^#[[2]] & /@ FactorInteger[n]); a[1] = 0; Table[a[n], {n, 70}]
  • PARI
    a(n) = my(f=factor(n)); sum(k=1, #f~, prime(f[k,1])^f[k,2]); \\ Michel Marcus, May 09 2018

Formula

a(prime(i)^k) = prime(prime(i))^k.
a(A000040(k)) = A006450(k).
a(A006450(k)) = A038580(k).
a(A002110(k)) = A083186(k).
Previous Showing 11-20 of 28 results. Next