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.

Showing 1-3 of 3 results.

A351168 If n = p_1^e_1 * ... * p_k^e_k, where p_1 < ... < p_k are primes, then a(n) is obtained by replacing the last factor p_k^e_k by (p_k - 1)^e_k; a(1) = 1.

Original entry on oeis.org

1, 1, 2, 1, 4, 4, 6, 1, 4, 8, 10, 8, 12, 12, 12, 1, 16, 8, 18, 16, 18, 20, 22, 16, 16, 24, 8, 24, 28, 24, 30, 1, 30, 32, 30, 16, 36, 36, 36, 32, 40, 36, 42, 40, 36, 44, 46, 32, 36, 32, 48, 48, 52, 16, 50, 48, 54, 56, 58, 48, 60, 60, 54, 1, 60, 60, 66, 64, 66, 60, 70, 32, 72, 72, 48
Offset: 1

Views

Author

Ben Polson, Feb 03 2022

Keywords

Comments

First time a term appears four or more times in a row is when n = 1684.

Examples

			The prime factorization of 44 is 2^2 * 11^1, so a(44) = 2^2 * 10^1 = 40.
The prime factorization of 50 is 2^1 * 5^2, so a(50) = 2^1 * 4^2 = 32.
		

Crossrefs

Cf. A006530 (greatest prime), A071178 (its exponent).
Cf. A171462 (one instance of the decrement), A003958 (all primes decremented), A351419, A351425.

Programs

  • Mathematica
    a[n_] := Module[{f = FactorInteger[n]}, n*(1 - 1/f[[-1, 1]])^f[[-1, 2]]]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Feb 04 2022 *)
  • PARI
    a(n) = my(f=factor(n),r=matsize(f)[1]); if(r, f[r,1]--); factorback(f); \\ Kevin Ryde, Feb 03 2022

Formula

a(n) = n*(1 - 1/p_k)^e_k where prime factorization n = p_1^e_1 * ... * p_k^e_k with ascending p_1 < ... < p_k.
a(n) = n*(1 - 1/A006530(n))^A071178(n).

Extensions

a(1) = 1 prepended by Michel Marcus, Feb 04 2022
Edited by N. J. A. Sloane, Feb 11 2022

A351425 If n = p_1^e_1 * ... * p_k^e_k, where p_1 < ... < p_k are primes, then a(n) is obtained by replacing the last factor p_k^e_k by (p_k + 1)^(e_k - 1); a(1) = 1.

Original entry on oeis.org

1, 1, 1, 3, 1, 2, 1, 9, 4, 2, 1, 4, 1, 2, 3, 27, 1, 8, 1, 4, 3, 2, 1, 8, 6, 2, 16, 4, 1, 6, 1, 81, 3, 2, 5, 16, 1, 2, 3, 8, 1, 6, 1, 4, 9, 2, 1, 16, 8, 12, 3, 4, 1, 32, 5, 8, 3, 2, 1, 12, 1, 2, 9, 243, 5, 6, 1, 4, 3, 10, 1, 32, 1, 2, 18, 4, 7, 6, 1, 16, 64, 2
Offset: 1

Views

Author

Amiram Eldar and N. J. A. Sloane, Feb 11 2022

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{f = FactorInteger[n]}, n*(f[[-1, 1]] + 1)^(f[[-1, 2]] - 1)/f[[-1, 1]]^f[[-1, 2]]]; a[1] = 1; Array[a, 100]

A351434 If n = Product (p_j^k_j) then a(n) = Product ((p_j - 1)^(k_j + 1)).

Original entry on oeis.org

1, 1, 4, 1, 16, 4, 36, 1, 8, 16, 100, 4, 144, 36, 64, 1, 256, 8, 324, 16, 144, 100, 484, 4, 64, 144, 16, 36, 784, 64, 900, 1, 400, 256, 576, 8, 1296, 324, 576, 16, 1600, 144, 1764, 100, 128, 484, 2116, 4, 216, 64, 1024, 144, 2704, 16, 1600, 36, 1296, 784, 3364, 64, 3600, 900, 288, 1, 2304
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 11 2022

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> mul((i[1]-1)^(i[2]+1), i=ifactors(n)[2]):
    seq(a(n), n=1..65);  # Alois P. Heinz, Feb 11 2022
  • Mathematica
    f[p_, e_] := (p - 1)^(e + 1); a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Table[a[n], {n, 1, 65}]
  • PARI
    a(n) = my(f=factor(n)); for (k=1, #f~, f[k,1]--; f[k,2]++); factorback(f); \\ Michel Marcus, Feb 11 2022

Formula

a(n) = A003958(n) * |A023900(n)|.
Sum_{k=1..n} a(k) ~ c * n^3, where c = (1/3) * Product_{p prime} (1 - (3*p^2 - 4*p + 2)/(p*(p^3 - p + 1))) = 0.1161464566... . - Amiram Eldar, Nov 19 2022
Showing 1-3 of 3 results.