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

A242415 Reverse the deltas of indices of distinct primes in the prime factorization of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 15, 11, 12, 13, 35, 10, 16, 17, 18, 19, 45, 21, 77, 23, 24, 25, 143, 27, 175, 29, 30, 31, 32, 55, 221, 14, 36, 37, 323, 91, 135, 41, 105, 43, 539, 20, 437, 47, 48, 49, 75, 187, 1573, 53, 54, 33, 875, 247, 667, 59, 60, 61, 899, 63, 64, 65
Offset: 1

Views

Author

Antti Karttunen, May 24 2014

Keywords

Comments

This self-inverse permutation (involution) of natural numbers preserves both the total number of prime divisors and the (index of) largest prime factor of n, i.e., for all n it holds that A001222(a(n)) = A001222(n) and A006530(a(n)) = A006530(n) [equally: A061395(a(n)) = A061395(n)]. It also preserves the exponent of the largest prime: A053585(a(n)) = A053585(n).
From the above it follows, that this fixes prime powers (A000961), among other numbers.
Considered as a function on partitions encoded by the indices of primes in the prime factorization of n (as in table A112798), this implements an operation which reverses the order of horizontal line segments of the "steps" in Young (or Ferrers) diagram of a partition, but keeps the order of vertical line segments intact. Please see the last example in the example section and compare also to the comments given in A242419.

Examples

			For n = 10 = 2*5 = p_1 * p_3, we get p_(3-1) * p_3 = 3 * 5 = 15, thus a(10) = 15.
For n = 20 = 2*2*5 = p_1^2 * p_3^1, we get p_(3-1)^2 * p_3^1 = 3^2 * 5 = 45, thus a(20) = 45.
For n = 84 = 2*2*3*7 = p_1^2 * p_2 * p_4, when we reverse the deltas of indices, but keep the exponents same, we get p_(4-2)^2 * p_(4-1) * p_4 = p_2^2 * p_3 * p_4 = 3^2 * 5 * 7 = 315, thus a(84) = 315.
For n = 2200, we see that it encodes the partition (1,1,1,3,3,5) in A112798 as 2200 = p_1 * p_1 * p_1 * p_3 * p_3 * p_5 = 2^3 * 5^2 * 11. This in turn corresponds to the following Young diagram in French notation:
   _
  | |
  | |
  | |_ _
  |     |
  |     |_ _
  |_ _ _ _ _|
Reversing the order of horizontal line segment lengths (1,2,2) to (2,2,1), but keeping the order of vertical line segment lengths as (3,2,1), we get a new Young diagram
   _ _
  |   |
  |   |
  |   |_ _
  |       |
  |       |_
  |_ _ _ _ _|
which represents the partition (2,2,2,4,4,5), encoded in A112798 by p_2^3 * p_4^2 * p_5^1 = 3^3 * 7^2 * 11 = 14553, thus a(2200) = 14553.
		

Crossrefs

Formula

If n = p_a^e_a * p_b^e_b * ... * p_h^e_h * p_i^e_i * p_j^e_j * p_k^e_k, where p_a < ... < p_k are distinct primes (sorted into ascending order) in the prime factorization of n, and e_a .. e_k are their nonzero exponents, then a(n) = p_{k-j}^e_a * p_{k-i}^e_b * p_{k-h}^e_c * ... * p_{k-a}^e_j * p_k^e_k.
As a recurrence: a(1) = 1, and for n>1, a(n) = (A000040(A241919(n))^A067029(n)) * A242378(A241919(n), a(A051119(A225891(n)))).
By composing/conjugating related permutations:
a(n) = A069799(A242419(n)) = A242419(A069799(n)).

A153212 A permutation of the natural numbers: in the prime factorization of n, swap each prime's index difference (from the previous distinct prime that divides n) and the prime's power.

Original entry on oeis.org

1, 2, 4, 3, 8, 6, 16, 5, 9, 18, 32, 15, 64, 54, 12, 7, 128, 10, 256, 75, 36, 162, 512, 35, 27, 486, 25, 375, 1024, 30, 2048, 11, 108, 1458, 24, 21, 4096, 4374, 324, 245, 8192, 150, 16384, 1875, 45, 13122, 32768, 77, 81, 50, 972, 9375, 65536, 14, 72, 1715, 2916, 39366, 131072, 105, 262144, 118098, 225, 13
Offset: 1

Views

Author

Luchezar Belev (l_belev(AT)yahoo.com), Dec 20 2008

Keywords

Comments

In order for the "index difference" to make sense, we consider the factorization to be sorted with respect to the primes but not the powers to which they are raised; that is, first comes the smallest prime and each subsequent prime is larger than the previous disregarding their powers.
For every n it is true that a(a(n)) = n.
From Antti Karttunen, May 29 2014: (Start)
In other words, this is a self-inverse permutation (involution) of natural numbers.
This permutation maps primes (A000040) to the powers of two larger than one (A000079(n>=1)) and vice versa.
The term a(1) = 1 was added on the grounds that as 1 has an empty prime factorization, there is nothing to swap, thus it stays same. It is also needed as a base case for the given recurrence.
Considered as a function on partitions encoded by the indices of primes in the prime factorization of n (as in table A112798), this implements an operation which exchanges the horizontal and vertical line segment of each "step" in Young (or Ferrers) diagram of a partition. Please see the last example in the example section.
(End)

Examples

			For n = 10 we have 10 = 2^1 * 5^1 = p(1)^1 * p(3)^1 then a(10) = p(1)^1 * p(2)^2 = 2^1 * 3^2 = 18.
For n = 18 we have 18 = 2^1 * 3^2 = p(1)^1 * p(2)^2 then a(18) = p(1)^1 * p(3)^1 = 2^1 * 5^1 = 10.
For n = 19 we have 19 = 19^1 = p(8)^1 then a(19) = p(1)^8 = 2^8 = 256.
For n = 2200, we see that it encodes the partition (1,1,1,3,3,5) in A112798 as 2200 = p_1 * p_1 * p_1 * p_3 * p_3 * p_5 = 2^3 * 5^2 * 11. This in turn corresponds to the following Young diagram in French notation:
   _
  | |
  | |
  | |_ _
  |     |
  |     |_ _
  |_ _ _ _ _|
Exchanging the order of the horizontal and vertical line segment of each "step", results the following Young diagram:
   _ _ _
  |     |_ _
  |         |
  |         |_
  |           |
  |_ _ _ _ _ _|
which represents the partition (3,5,5,6,6), encoded in A112798 by p_3 * p_5^2 * p_6^2 = 5 * 11^2 * 13^2 = 102245, thus a(2200) = 102245.
		

Crossrefs

Fixed points: A242421.
{A000027, A122111, A153212, A242419} form a 4-group.

Programs

  • PARI
    a(n) = {my(f = factor(n)); my(g = f); for (i=1, #f~, if (i==1, g[i,1] = prime(f[i,2]), g[i,1] = prime(f[i,2]+ primepi(g[i-1,1]))); if (i==1, g[i,2] = primepi(f[i,1]), g[i,2] = primepi(f[i,1]) - primepi(f[i-1,1]));); factorback(g);} \\ Michel Marcus, Dec 16 2014

Formula

Denote the i-th prime with p(i): p(1)=2, p(2)=3, p(3)=5, p(4)=7, etc. Let n = p(a1)^b1 * p(a2)^b2 * ... * p(ak)^bk is the factorization of n where p(i)^j is the i-th prime raised to power j. As mentioned above, we assume that the primes are sorted, i.e., a1 < a2 < a3 ... < ak. Then a(n) = p(c1)^d1 * p(c2)^d2 * ... * p(ck)^dk where c1 = b1 and c(i) = b(i) + c(i-1) for i > 1 d1 = a1 and d(i) = a(i) - a(i-1) for i > 1.
From Antti Karttunen, May 16 2014: (Start)
a(1) = 1 and for n>1, let r = a(A051119(n)). Then a(n) = r * (A000040(A061395(r)+A071178(n)) ^ A241919(n)).
a(n) = A122111(A242419(n)) = A242419(A122111(n)).
(End)

Extensions

Term a(1)=1 prepended, and also more terms computed by Antti Karttunen, May 16 2014

A027855 Antimutinous numbers: n>1 such that n/p^k < p, where p is the largest prime dividing n and p^k is the highest power of p dividing n.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 37, 38, 39, 41, 42, 43, 44, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 61, 62, 64, 65, 66, 67, 68, 69, 71, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 85, 86, 87
Offset: 1

Views

Author

Keywords

Comments

Numbers which can be expressed as m*p^k, for p prime and m < p and k > 0. List contains n if A006530(n) > A051119(n). - Harry Richman, Aug 19 2019

Crossrefs

Programs

  • Maple
    isA027855 := proc(n) local p,k,pk; if n <= 1 then false; else p := A006530(n) ; pk := p ; while n mod ( pk*p) = 0 do pk := pk*p ; od: if n< p*pk then true ; else false ; fi ; fi ; end proc:
    for n from 2 to 120 do if isA027855(n) then printf("%d, ",n) ; fi ; od: # R. J. Mathar, Dec 02 2007
  • Mathematica
    Select[Range@100, #1^(#2 + 1) & @@ FactorInteger[#][[-1]] > # &] (* Ivan Neretin, Jul 09 2015 *)
  • PARI
    is(n) = my(f = factor(n)); c = n\f[#f~, 1]^f[#f~, 2]; c < f[#f~, 1] \\ David A. Corneth, Aug 19 2019
  • Python
    from sympy import factorint, primefactors
    def a053585(n):
        if n==1: return 1
        p = primefactors(n)[-1]
        return p**factorint(n)[p]
    print([n for n in range(2, 301) if n//a053585(n)Indranil Ghosh, Jul 13 2017
    

Extensions

More terms from R. J. Mathar, Dec 02 2007

A345994 Let m = A344005(n) = smallest m such that n divides m*(m+1); a(n) = min(gcd(n,m), gcd(n,m+1)).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

This is the minimum of A345992 and A345993.

Crossrefs

A065202 Characteristic function of A065201: a(n) = if A065201(k) = n for some k then 1 else 0.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 21 2001

Keywords

Crossrefs

Programs

Formula

a(A065200(n)) = 0 and a(A065201(n)) = 1.
a(n) = A107078(A051119(n)). - Antti Karttunen, Aug 27 2017

Extensions

Edited by Franklin T. Adams-Watters, Oct 27 2006

A243074 a(1) = 1, a(n) = n/p^(k-1), where p = largest prime dividing n and p^k = highest power of p dividing n.

Original entry on oeis.org

1, 2, 3, 2, 5, 6, 7, 2, 3, 10, 11, 12, 13, 14, 15, 2, 17, 6, 19, 20, 21, 22, 23, 24, 5, 26, 3, 28, 29, 30, 31, 2, 33, 34, 35, 12, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 7, 10, 51, 52, 53, 6, 55, 56, 57, 58, 59, 60, 61, 62, 63, 2, 65, 66, 67, 68, 69, 70, 71, 24, 73, 74, 15, 76, 77, 78, 79, 80, 3
Offset: 1

Views

Author

Antti Karttunen, May 31 2014

Keywords

Comments

After 1, A102750 gives such k that a(k) = k, which are also the positions of the records as for all n, a(n) <= n. After 1, only terms of A102750 occur, each an infinite number of times.

Examples

			For n = 18 = 2*3*3, we discard all instances of the highest prime factor 3 except one, thus a(18) = 2*3 = 6.
For n = 54 = 2*3*3*3, we discard two copies of 3, and thus also the value of a(54) is 2*3 = 6.
For n = 20 = 2*5, the highest prime factor 5 occurs only once, so nothing is cast off, and a(20) = 20.
		

Crossrefs

Differs from A052410 for the first time at n=18.

Programs

Formula

a(n) = A006530(n) * A051119(n).

A087179 a(n) = (...(((x1^x2)^x3)^x4)^...) where x1,x2,... are the exponents in the prime factorization of n, a(1) = 0.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 3, 2, 1, 1, 1, 5, 1, 1, 1, 4, 1, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 4, 2, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 2, 6, 1, 1, 1, 2, 1, 1, 1, 9, 1, 1, 1, 2, 1, 1, 1, 4, 4, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 5, 1, 1, 2, 4, 1, 1, 1, 3, 1, 1, 1, 8, 1, 1, 1, 4, 1, 1, 1, 2, 2, 1, 1, 3
Offset: 1

Views

Author

Sam Alexander, Oct 19 2003

Keywords

Examples

			a(75) = a((3^1)*(5^2)) = 1^2 = 1.
a(108) = a((2^2)*(3^3)) = 2^3 = 8.
a(300) = a(2^2 * 3^1 * 5^2) = (2^1)^2 = 4. - _Antti Karttunen_, Aug 27 2017
		

Crossrefs

After a(1) = 0 differs from A290109 for the next time at n=300.

Programs

Formula

If A001221(n) <= 1, a(n) = A067029(n) [i.e., when n is a prime power, p^k, a(n) = k], otherwise a(n) = a(A051119(n)) ^ A071178(n). - Antti Karttunen, Aug 27 2017

Extensions

Term a(1) = 0 prepended by Antti Karttunen, Aug 27 2017

A304404 If n = Product (p_j^k_j) then a(n) = Product (n/p_j^k_j).

Original entry on oeis.org

1, 1, 1, 1, 1, 6, 1, 1, 1, 10, 1, 12, 1, 14, 15, 1, 1, 18, 1, 20, 21, 22, 1, 24, 1, 26, 1, 28, 1, 900, 1, 1, 33, 34, 35, 36, 1, 38, 39, 40, 1, 1764, 1, 44, 45, 46, 1, 48, 1, 50, 51, 52, 1, 54, 55, 56, 57, 58, 1, 3600, 1, 62, 63, 1, 65, 4356, 1, 68, 69, 4900, 1, 72, 1, 74, 75
Offset: 1

Views

Author

Ilya Gutkovskiy, May 12 2018

Keywords

Examples

			a(60) = a(2^2*3*5) = (60/2^2) * (60/3) * (60/5) = 15 * 20 * 12 = 3600.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Times @@ (n/#[[1]]^#[[2]] & /@ FactorInteger[n]); Table[a[n], {n, 75}]
    Table[n^(PrimeNu[n] - 1), {n, 75}]
  • PARI
    A304404(n) = (n^(omega(n)-1)); \\ Antti Karttunen, Aug 06 2018
    
  • Python
    from sympy.ntheory.factor_ import primenu
    def A304404(n): return int(n**(primenu(n)-1)) # Chai Wah Wu, Jul 12 2023

Formula

a(n) = n^(omega(n)-1), where omega() = A001221.
a(n) = A062509(n)/n.

A345997 Let m = A344005(n) be the smallest number such that n|m*(m+1); let X = A345992(n) = gcd(n,m); Y = A345993(n) = gcd(n,m+1). Sequence lists n such that neither X nor Y is equal to n/p^k, where p = largest prime divisor of n and k is its exponent in n.

Original entry on oeis.org

60, 70, 84, 90, 120, 126, 130, 154, 170, 195, 198, 204, 210, 220, 228, 230, 234, 238, 240, 252, 255, 264, 273, 280, 312, 315, 330, 340, 348, 360, 364, 370, 372, 374, 378, 385, 390, 396, 399, 414, 418, 420, 430, 434, 440, 450, 455, 456, 460, 462, 468, 470
Offset: 1

Views

Author

Keywords

Comments

Numbers n such that neither A345992(n) nor A345993(n) is equal to A051119(n). This disproves an obvious conjecture about A344005.
From Robert Dougherty-Bliss, Jul 17 2021: (Start)
Every integer in the sequence has at least three distinct prime factors.
If n = p^k for a prime p, then m = n - 1 so gcd(n, m) = 1 = n / p^k.
Otherwise, we can write n = AB for unique coprime integers A and B such that A|m and B|(m + 1), in which case gcd(n, m) = A. The arguments in A344005 show that this factorization is the one which minimizes min(|u| A, |v| B) over all u and v such that vB - uA = +-1. If n = p^k q^j, then A = p^k and B = q^j (or the other way) is the only nontrivial factorization, and it does better than the trivial upper bound of n - 1. Therefore X = gcd(n, m) = p^k or q^j. (End)

Examples

			For n = 60 = 2^2*3*5, m  = 15, X = 15, Y = 4, but n/p^k = 60/5 = 12 which is neither 15 nor 4, so 60 is a term.
		

Crossrefs

A375719 a(1) = 1; For n > 1, a(n) is the smallest number different from a(1), ..., a(n-1) such that lcm(a(1), ..., a(n)) is a perfect square.

Original entry on oeis.org

1, 4, 2, 9, 3, 6, 12, 16, 8, 18, 24, 25, 5, 10, 15, 20, 30, 36, 40, 45, 48, 49, 7, 14, 21, 28, 35, 42, 50, 56, 60, 63, 64, 32, 70, 72, 75, 80, 81, 27, 54, 84, 90, 96, 98, 100, 105, 108, 112, 120, 121, 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 126, 132, 135, 140
Offset: 1

Views

Author

Yifan Xie, Aug 25 2024

Keywords

Comments

This is a permutation of the positive integers.
From Yifan Xie, Jan 09 2025: (Start)
The sequence can be constructed using the following properties:
1. The squares appear in increasing order.
2. p^(2k) is immediately followed by p^(2k-1), 2*p^(2k-1), ..., (p-1)*p^(2k-1) for prime p.
3. The numbers m^2 < k < (m+1)^2 such that A006530(k) < A051119(k) appear in increasing order between m^2 and (m+1)^2.
a(n) > a(n-1) iff a(n) = p^(2k) and a(n-1) = p^(2k-1), where p is a prime. (End)

Examples

			For n = 4, a(4) is different from 1, 2, 4, and lcm(4, a(4)) is a perfect square. Therefore, a(4) = 9.
		

Crossrefs

Cf. A006530 (Gpf(n)), A051119 (largest divisor of n coprime to Gpf(n)).

Programs

  • PARI
    seq(n)={my(b=1, a=vector(n), M=Map()); for(n=1, #a, my(k=1); while(!issquare(lcm(b,k)) || mapisdefined(M,k), k++); a[n]=k; b=lcm(b,k); mapput(M,k,1)); a} \\ Andrew Howroyd, Aug 30 2024
    
  • Python
    from math import isqrt, lcm
    from itertools import count, islice
    def sqr(n): return isqrt(n)**2 == n
    def agen(): # generator of terms
        an, aset, L, m = 1, {1}, 1, 2
        for n in count(2):
            yield an
            an = next(k for k in count(m) if k not in aset and sqr(lcm(k, L)))
            aset.add(an)
            L = lcm(L, an)
            while m in aset: m += 1
    print(list(islice(agen(), 65))) # Michael S. Branicky, Aug 30 2024
Previous Showing 11-20 of 20 results.