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

A284457 Square array whose rows list numbers with the same squarefree kernel (A007947): Transpose of A284311.

Original entry on oeis.org

2, 4, 3, 8, 9, 5, 16, 27, 25, 6, 32, 81, 125, 12, 7, 64, 243, 625, 18, 49, 10, 128, 729, 3125, 24, 343, 20, 11, 256, 2187, 15625, 36, 2401, 40, 121, 13, 512, 6561, 78125, 48, 16807, 50, 1331, 169, 14, 1024, 19683, 390625, 54, 117649, 80, 14641, 2197, 28, 15
Offset: 1

Views

Author

Bob Selcoe, Mar 27 2017

Keywords

Comments

The first column contains the squarefree numbers A005117; each row lists all numbers having the same prime divisors. If T[m,1] is prime then the row contains the powers of that prime. Yields A182944 if only these rows with prime powers (A000961) are kept. - M. F. Hasler, Mar 27 2017
See A284311 for further details.

Examples

			Array starts:
    2    4     8     16      32      64      128
    3    9    27     81     243     729     2187
    5   25   125    625    3125   15625    78125
    6   12    18     24      36      48       54
    7   49   343   2401   16807  117649   823543
   10   20    40     50      80     100      160
   ...
Row 6 is: T[1,6] = 2*5; T[2,6] = 2^2*5; T[3,6] = 2^3*5; T[4,6] = 2*5^2; T[5,6] = 2^4*5, etc.
		

Crossrefs

Cf. A008479 (index of the column where n is located), A285329 (of the row).

Programs

  • Mathematica
    f[n_, k_: 1] := Block[{c = 0, sgn = Sign[k], sf}, sf = n + sgn; While[c < Abs@ k, While[! SquareFreeQ@ sf, If[sgn < 0, sf--, sf++]]; If[sgn < 0, sf--, sf++]; c++]; sf + If[sgn < 0, 1, -1]] (* after Robert G. Wilson v at A005117 *); T[n_, k_] := T[n, k] = Which[And[n == 1, k == 1], 2, k == 1, f@ T[n - 1, k], PrimeQ@ T[n, 1], T[n, 1]^k, True, Module[{j = T[n, k - 1]/T[n, 1] + 1}, While[PowerMod[T[n, 1], j, j] != 0, j++]; j T[n, 1]]]; Table[T[n - k + 1, k], {n, 10}, {k, n, 1, -1}] // Flatten
  • PARI
    A284457(m,n)={for(a=2,m^2+1,(core(a)!=a||m--)&&next;m=factor(a)[,1]; for(k=1,9e9,factor(k*a)[,1]==m&&!n--&&return(k*a)))} \\ M. F. Hasler, Mar 27 2017
    
  • Scheme
    (define (A284457 n) (A284311bi (A004736 n) (A002260 n))) ;; For A284311bi, see A284311. - Antti Karttunen, Apr 17 2017

Formula

From Antti Karttunen, Apr 17 2017: (Start)
A(n,1) = A005117(1+n), A(n,k) = A065642(A(n,k-1)). [A "dispersion" of A065642.]
A(A285329(n), A008479(n)) = n for all n >= 2.(End)

Extensions

Edited by M. F. Hasler, Mar 27 2017

A007947 Largest squarefree number dividing n: the squarefree kernel of n, rad(n), radical of n.

Original entry on oeis.org

1, 2, 3, 2, 5, 6, 7, 2, 3, 10, 11, 6, 13, 14, 15, 2, 17, 6, 19, 10, 21, 22, 23, 6, 5, 26, 3, 14, 29, 30, 31, 2, 33, 34, 35, 6, 37, 38, 39, 10, 41, 42, 43, 22, 15, 46, 47, 6, 7, 10, 51, 26, 53, 6, 55, 14, 57, 58, 59, 30, 61, 62, 21, 2, 65, 66, 67, 34, 69, 70, 71, 6, 73, 74, 15, 38, 77, 78
Offset: 1

Views

Author

R. Muller, Mar 15 1996

Keywords

Comments

Multiplicative with a(p^e) = p.
Product of the distinct prime factors of n.
a(k)=k for k=squarefree numbers A005117. - Lekraj Beedassy, Sep 05 2006
A note on square roots of numbers: we can write sqrt(n) = b*sqrt(c) where c is squarefree. Then b = A000188(n) is the "inner square root" of n, c = A007913(n), b*c = A019554(n) = "outer square root" of n, and a(n) = lcm(a(b),c). Unless n is biquadrateful (A046101), a(n) = lcm(b,c). [Edited by Jeppe Stig Nielsen, Oct 10 2021, and Andrey Zabolotskiy, Feb 12 2025]
a(n) = A128651(A129132(n-1) + 2) for n > 1. - Reinhard Zumkeller, Mar 30 2007
Also the least common multiple of the prime factors of n. - Peter Luschny, Mar 22 2011
The Mobius transform of the sequence generates the sequence of absolute values of A097945. - R. J. Mathar, Apr 04 2011
Appears to be the period length of k^n mod n. For example, n^12 mod 12 has period 6, repeating 1,4,9,4,1,0, so a(12)= 6. - Gary Detlefs, Apr 14 2013
a(n) differs from A014963(n) when n is a term of A024619. - Eric Desbiaux, Mar 24 2014
a(n) is also the smallest base (also termed radix) for which the representation of 1/n is of finite length. For example a(12) = 6 and 1/12 in base 6 is 0.03, which is of finite length. - Lee A. Newberg, Jul 27 2016
a(n) is also the divisor k of n such that d(k) = 2^omega(n). a(n) is also the smallest divisor u of n such that n divides u^n. - Juri-Stepan Gerasimov, Apr 06 2017

Examples

			G.f. = x + 2*x^2 + 3*x^3 + 2*x^4 + 5*x^5 + 6*x^6 + 7*x^7 + 2*x^8 + 3*x^9 + ... - _Michael Somos_, Jul 15 2018
		

Crossrefs

See A007913, A062953, A000188, A019554, A003557, A066503, A087207 for other properties related to square and squarefree divisors of n.
More general factorization-related properties, specific to n: A020639, A028234, A020500, A010051, A284318, A000005, A001221, A005361, A034444, A014963, A128651, A267116.
Range of values is A005117.
Bisections: A099984, A099985.
Sequences about numbers that have the same squarefree kernel: A065642, array A284311 (A284457).
A003961, A059896 are used to express relationship between terms of this sequence.

Programs

  • Haskell
    a007947 = product . a027748_row  -- Reinhard Zumkeller, Feb 27 2012
    
  • Magma
    [ &*PrimeDivisors(n): n in [1..100] ]; // Klaus Brockhaus, Dec 04 2008
    
  • Maple
    with(numtheory); A007947 := proc(n) local i,t1,t2; t1 := ifactors(n)[2]; t2 := mul(t1[i][1],i=1..nops(t1)); end;
    A007947 := n -> ilcm(op(numtheory[factorset](n))):
    seq(A007947(i),i=1..69); # Peter Luschny, Mar 22 2011
    A:= n -> convert(numtheory:-factorset(n),`*`):
    seq(A(n),n=1..100); # Robert Israel, Aug 10 2014
    seq(NumberTheory:-Radical(n), n = 1..78); # Peter Luschny, Jul 20 2021
  • Mathematica
    rad[n_] := Times @@ (First@# & /@ FactorInteger@ n); Array[rad, 78] (* Robert G. Wilson v, Aug 29 2012 *)
    Table[Last[Select[Divisors[n],SquareFreeQ]],{n,100}] (* Harvey P. Dale, Jul 14 2014 *)
    a[ n_] := If[ n < 1, 0, Sum[ EulerPhi[d] Abs @ MoebiusMu[d], {d, Divisors[ n]}]]; (* Michael Somos, Jul 15 2018 *)
    Table[Product[p, {p, Select[Divisors[n], PrimeQ]}], {n, 1, 100}] (* Vaclav Kotesovec, May 20 2020 *)
  • PARI
    a(n) = factorback(factorint(n)[,1]); \\ Andrew Lelechenko, May 09 2014
    
  • PARI
    for(n=1, 100, print1(direuler(p=2, n, (1 + p*X - X)/(1 - X))[n], ", ")) \\ Vaclav Kotesovec, Jun 14 2020
    
  • Python
    from sympy import primefactors, prod
    def a(n): return 1 if n < 2 else prod(primefactors(n))
    [a(n) for n in range(1, 51)]  # Indranil Ghosh, Apr 16 2017
    
  • Sage
    def A007947(n): return mul(p for p in prime_divisors(n))
    [A007947(n) for n in (1..60)] # Peter Luschny, Mar 07 2017
    
  • Scheme
    (define (A007947 n) (if (= 1 n) n (* (A020639 n) (A007947 (A028234 n))))) ;; ;; Needs also code from A020639 and A028234. - Antti Karttunen, Jun 18 2017

Formula

If n = Product_j (p_j^k_j) where p_j are distinct primes, then a(n) = Product_j (p_j).
a(n) = Product_{k=1..A001221(n)} A027748(n,k). - Reinhard Zumkeller, Aug 27 2011
Dirichlet g.f.: zeta(s)*Product_{primes p} (1+p^(1-s)-p^(-s)). - R. J. Mathar, Jan 21 2012
a(n) = Sum_{d|n} phi(d) * mu(d)^2 = Sum_{d|n} |A097945(d)|. - Enrique Pérez Herrero, Apr 23 2012
a(n) = Product_{d|n} d^moebius(n/d) (see Billal link). - Michel Marcus, Jan 06 2015
a(n) = n/( Sum_{k=1..n} (floor(k^n/n)-floor((k^n - 1)/n)) ) = e^(Sum_{k=2..n} (floor(n/k) - floor((n-1)/k))*A010051(k)*M(k)) where M(n) is the Mangoldt function. - Anthony Browne, Jun 17 2016
a(n) = n/A003557(n). - Juri-Stepan Gerasimov, Apr 07 2017
G.f.: Sum_{k>=1} phi(k)*mu(k)^2*x^k/(1 - x^k). - Ilya Gutkovskiy, Apr 11 2017
From Antti Karttunen, Jun 18 2017: (Start)
a(1) = 1; for n > 1, a(n) = A020639(n) * a(A028234(n)).
a(n) = A019565(A087207(n)). (End)
Dirichlet g.f.: zeta(s-1) * zeta(s) * Product_{primes p} (1 + p^(1-2*s) - p^(2-2*s) - p^(-s)). - Vaclav Kotesovec, Dec 18 2019
From Peter Munn, Jan 01 2020: (Start)
a(A059896(n,k)) = A059896(a(n), a(k)).
a(A003961(n)) = A003961(a(n)).
a(n^2) = a(n).
a(A225546(n)) = A019565(A267116(n)). (End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = A065463/2. - Vaclav Kotesovec, Jun 24 2020
From Richard L. Ollerton, May 07 2021: (Start)
a(n) = Sum_{k=1..n} mu(n/gcd(n,k))^2.
a(n) = Sum_{k=1..n} mu(gcd(n,k))^2*phi(gcd(n,k))/phi(n/gcd(n,k)).
For n>1, Sum_{k=1..n} a(gcd(n,k))*mu(a(gcd(n,k)))*phi(gcd(n,k))/gcd(n,k) = 0.
For n>1, Sum_{k=1..n} a(n/gcd(n,k))*mu(a(n/gcd(n,k)))*phi(gcd(n,k))*gcd(n,k) = 0. (End)
a(n) = (-1)^omega(n) * Sum_{d|n} mu(d)*psi(d), where omega = A001221 and psi = A001615. - Ridouane Oudra, Aug 01 2025

Extensions

More terms from several people including David W. Wilson
Definition expanded by Jonathan Sondow, Apr 26 2013

A280864 Lexicographically earliest infinite sequence of distinct positive terms such that, for any prime p, any run of consecutive multiples of p has length exactly 2.

Original entry on oeis.org

1, 2, 4, 3, 6, 8, 5, 10, 12, 9, 7, 14, 16, 11, 22, 18, 15, 20, 24, 21, 28, 26, 13, 17, 34, 30, 45, 19, 38, 32, 23, 46, 36, 27, 25, 35, 42, 48, 29, 58, 40, 55, 33, 39, 52, 44, 77, 49, 31, 62, 50, 65, 78, 54, 37, 74, 56, 63, 51, 68, 60, 75, 41, 82, 64, 43, 86
Offset: 1

Views

Author

Rémy Sigrist, Jan 09 2017

Keywords

Comments

In other words, each multiple of a prime p has exactly one neighbor that is also a multiple of p.
This sequence is similar to A280866; the first difference occurs at n=42: a(42)=55 whereas A280866(42)=50.
Conjectured to be a permutation of the positive integers.
Sometimes referred to as the "cup of coffee" sequence, since it feels as if just one more cup of coffee is all it would take to prove that this is indeed a permutation of the positive integers. - N. J. A. Sloane, Nov 04 2020
There are several short cycles, and apparently at least two infinite cycles. For a list see the attached file "Properties of A280864". - N. J. A. Sloane, Feb 03 2017
Properties (For proofs, see the attached file "Properties of A280864")
Theorem 1: This sequence contains every prime and every even number. (Added by N. J. A. Sloane, Jan 15 2017)
Theorem 2: The sequence contains infinitely many odd composite numbers. (Added by N. J. A. Sloane, Feb 14 2017)
Theorem 3: If p is an odd prime, the sequence contains infinitely many odd multiples of p. (Added by N. J. A. Sloane, Mar 12 2017, with corrected proof Apr 03 2017)
There are two types of primes in this sequence: Type I, the first time a term a(n) is divisible by p is when a(n)=p for some n; Type II, the first time a term a(n) is divisible by p is when a(n)=k*p for some n and some k>1 (the Type II primes are listed in A280745).
Conjecture 4: If a prime p divides a(n) then p <= n. - N. J. A. Sloane, Apr 07 2017 and Apr 16 2017
Theorem 5: The sequence is a permutation of the natural numbers iff it contains every square. - N. J. A. Sloane, Apr 14 2017
From Bob Selcoe, Apr 03 2017: (Start)
Define the "radical class" C_R to be the set of numbers which have the same radical R (or the same largest squarefree divisor - i.e., the same product of their prime factors). These are the columns in A284311. So for example C_10 is the set of numbers with radical 10 or prime factors {2,5}: {10, 20, 40, 50, 80, 100, 160, ...}.
If the sequence contains any members of C_R, then those members must appear in order; so for example, if 160 has appeared, {10, 20, 40, 50, 80} will have already appeared, in that order. Naturally, this holds for prime powers; for example, C_5: if 3125 has appeared, {5, 25, 125, 625} will have appeared earlier, in that order.
After seeing a(n), let S be smallest missing number (A280740) and let prime(G) be largest prime already appearing in the sequence. Conjecture: Prime(G) < S <= prime(G+1), and a(35) = 25 = S is the only nonprime S term (following a(31) = 23, preceding a(39) = 29). (End)

Examples

			The first terms, alongside their required and forbidden prime factors are:
n   a(n)  Required  Forbidden
--  ----  --------  ---------
1      1  none      none
2      2  none      none
3      4  2         none
4      3  none      2
5      6  3         none
6      8  2         3
7      5  none      2
8     10  5         none
9     12  2         5
10     9  3         2
11     7  none      3
12    14  7         none
13    16  2         7
14    11  none      2
15    22  11        none
16    18  2         11
17    15  3         2
18    20  5         3
19    24  2         5
20    21  3         2
21    28  7         3
22    26  2         7
23    13  13        2
24    17  none      13
25    34  17        none
26    30  2         17
27    45  3, 5      2
28    19  none      3, 5
29    38  19        none
30    32  2         19
31    23  none      2
32    46  23        none
33    36  2         23
34    27  3         2
35    25  none      3
36    35  5         none
37    42  7         5
38    48  2, 3      7
39    29  none      2, 3
40    58  29        none
41    40  2         29
42    55  5         2
		

Crossrefs

A280754 gives fixed points.
Cf. A280866.
In the same spirit as A064413 and A098550.
A338338, A338444, and A375029 are variants.
A373797 is a finite version.

Programs

  • Maple
    N:= 1000: # to get all terms until the first term > N
    A[1]:= 1:
    A[2]:= 2:
    G:= {}:
    Avail:= [$3..N]:
    found:= true:
    lastn:= 2:
    for n from 3 while found and nops(Avail)>0 do
      found:= false;
      H:= G;
      G:= numtheory:-factorset(A[n-1]);
      r:= convert(G minus H,`*`);
      s:= convert(G intersect H, `*`);
      for j from 1 to nops(Avail) do
        if Avail[j] mod r = 0 and igcd(Avail[j],s) = 1 then
          found:= true;
          A[n]:= Avail[j];
          Avail:= subsop(j=NULL,Avail);
          lastn:= n;
          break
        fi
      od;
    od:
    seq(A[i],i=1..lastn); # Robert Israel, Mar 22 2017
  • Mathematica
    terms = 100;
    rad[n_] := Times @@ FactorInteger[n][[All, 1]];
    A280864 = Reap[present = 0; p = 1; pp = 1; Do[forbidden = GCD[p, pp]; mandatory = p/forbidden; a = mandatory; While[BitGet[present, a] > 0 || GCD[forbidden, a] > 1, a += mandatory]; Sow[a]; present += 2^a; pp = p; p = rad[a], terms]][[2, 1]] (* Jean-François Alcover, Nov 23 2017, translated from Rémy Sigrist's PARI program *)

Extensions

Added "infinite" to definition. - N. J. A. Sloane, Sep 28 2019

A065642 a(1) = 1; for n > 1, a(n) = Min {m > n | m has same prime factors as n ignoring multiplicity}.

Original entry on oeis.org

1, 4, 9, 8, 25, 12, 49, 16, 27, 20, 121, 18, 169, 28, 45, 32, 289, 24, 361, 40, 63, 44, 529, 36, 125, 52, 81, 56, 841, 60, 961, 64, 99, 68, 175, 48, 1369, 76, 117, 50, 1681, 84, 1849, 88, 75, 92, 2209, 54, 343, 80, 153, 104, 2809, 72, 275, 98, 171, 116, 3481, 90, 3721
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 03 2001

Keywords

Comments

After the initial 1, a permutation of the nonsquarefree numbers A013929. The array A284457 is obtained as a dispersion of this sequence. - Antti Karttunen, Apr 17 2017
Numbers such that a(n)/n is not an integer are listed in A284342.

Examples

			a(10) = a(2 * 5) = 2 * 2 * 5 = 20; a(12) = a(2^2 * 3) = 2 * 3^2 = 18.
		

Crossrefs

Cf. A285328 (a left inverse).
Cf. also arrays A284457 & A284311, A285321 and permutations A284572, A285112, A285332.

Programs

  • Haskell
    a065642 1 = 1
    a065642 n = head [x | let rad = a007947 n, x <- [n+1..], a007947 x == rad]
    -- Reinhard Zumkeller, Jun 12 2015, Jul 27 2011
    
  • Mathematica
    ffi[x_]:= Flatten[FactorInteger[x]]; lf[x_]:= Length[FactorInteger[x]]; ba[x_]:= Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}]; cor[x_]:= Apply[Times, ba[x]]; Join[{1}, Table[Min[Flatten[Position[Table[cor[w], {w, n+1, n^2}]-cor[n], 0]]+n], {n, 2, 100}]] (* This code is suitable since prime factor set is invariant iff squarefree kernel is invariant. *) (* G. C. Greubel, Oct 31 2018 *)
    Array[If[# == 1, 1, Function[{n, c}, SelectFirst[Range[n + 1, n^2], Times @@ FactorInteger[#][[All, 1]] == c &]] @@ {#, Times @@ FactorInteger[#][[All, 1]]}] &, 61] (* Michael De Vlieger, Oct 31 2018 *)
  • PARI
    A065642(n)={ my(r=A007947(n)); if(1==n,n, n += r; while(A007947(n) <> r, n += r); n)} \\ Antti Karttunen, Apr 17 2017
    
  • PARI
    a(n)=if(n<2, return(1)); my(f=factor(n),r,mx,mn,t); if(#f~==1, return(f[1,1]^(f[1,2]+1))); f=f[,1]; r=factorback(f); mn=mx=n*f[1]; forvec(v=vector(#f,i,[1,logint(mx/r,f[i])+1]), t=prod(i=1,#f, f[i]^v[i]); if(tn, mn=t)); mn \\ Charles R Greathouse IV, Oct 18 2017
    
  • Python
    from sympy import primefactors, prod
    def a007947(n): return 1 if n < 2 else prod(primefactors(n))
    def a(n):
        if n==1: return 1
        r=a007947(n)
        n += r
        while a007947(n)!=r:
            n+=r
        return n
    print([a(n) for n in range(1, 51)]) # Indranil Ghosh, Apr 17 2017
  • Scheme
    (define (A065642 n) (if (= 1 n) n (let ((k (A007947 n))) (let loop ((n (+ n k))) (if (= (A007947 n) k) n (loop (+ n k))))))) ;; (Semi-naive implementation) - Antti Karttunen, Apr 17 2017
    

Formula

A007947(a(n)) = A007947(n); a(A007947(n)) = A007947(n) * A020639(n), where A007947 is the squarefree kernel (radical), A020639 is the least prime factor (lpf).
a(A000040(n)^k) = A000040(n)^(k+1); A001221(a(n)) = A001221(n).
A285328(a(n)) = n. - Antti Karttunen, Apr 17 2017
n < a(n) <= n*lpf(n) <= n^2. - Charles R Greathouse IV, Oct 18 2017

A008479 Number of numbers <= n with same prime factors as n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

For n > 1, a(n) gives the (one-based) index of the row where n is located in arrays A284311 and A285321 or respectively, index of the column where n is in A284457. A285329 gives the other index. - Antti Karttunen, Apr 17 2017

Crossrefs

Programs

  • Maple
    N:= 100: # to get a(1)..a(N)
    V:= Vector(N):
    V[1]:= 1:
    for n from 2 to N do
      if V[n] = 0 then
       S:= {n};
       for p in numtheory:-factorset(n) do
         S := S union {seq(seq(s*p^k,k=1..floor(log[p](N/s))),s=S)};
       od:
       S:= sort(convert(S,list));
       for k from 1 to nops(S) do V[S[k]]:= k od:
    fi
    od:
    convert(V,list); # Robert Israel, May 20 2016
  • Mathematica
    PkTbl=Prepend[ Array[ Times @@ First[ Transpose[ FactorInteger[ # ] ] ]&, 100, 2 ], 1 ];1+Array[ Count[ Take[ PkTbl, #-1 ], PkTbl[ [ # ] ] ]&, Length[ PkTbl ] ]
    Count[#, k_ /; k == Last@ #] & /@ Function[s, Take[s, #] & /@ Range@ Length@ s]@ Array[Map[First, FactorInteger@ #] &, 120] (* or *)
    Table[Sum[(Floor[n^k/k] - Floor[(n^k - 1)/k]) (Floor[k^n/n] - Floor[(k^n - 1)/n]), {k, n}], {n, 120}] (* Michael De Vlieger, May 20 2016 *)
  • PARI
    a(n)=my(f=factor(n)[,1], s); forvec(v=vector(#f, i, [1, logint(n, f[i])]), if(prod(i=1, #f, f[i]^v[i])<=n, s++)); s \\ Charles R Greathouse IV, Oct 19 2017
  • Scheme
    (define (A008479 n) (if (not (zero? (A008683 n))) 1 (+ 1 (A008479 (A285328 n))))) ;; Antti Karttunen, Apr 17 2017
    

Formula

a(n) = Sum_{k=1..n} (floor(n^k/k)-floor((n^k-1)/k))*(floor(k^n/n)-floor((k^n-1)/n)). - Anthony Browne, May 20 2016
If A008683(n) <> 0 [when n is squarefree, A005117], a(n) = 1, otherwise a(n) = 1+a(A285328(n)). - Antti Karttunen, Apr 17 2017
a(n) <= A010846(n), with equality if and only if n = 1. - Amiram Eldar, May 25 2025
a(m^(k+1)) = A010846(m^k) when m is squarefree. - Flávio V. Fernandes, Aug 20 2025

A285321 Square array A(1,k) = A019565(k), A(n,k) = A065642(A(n-1,k)), read by descending antidiagonals.

Original entry on oeis.org

2, 3, 4, 6, 9, 8, 5, 12, 27, 16, 10, 25, 18, 81, 32, 15, 20, 125, 24, 243, 64, 30, 45, 40, 625, 36, 729, 128, 7, 60, 75, 50, 3125, 48, 2187, 256, 14, 49, 90, 135, 80, 15625, 54, 6561, 512, 21, 28, 343, 120, 225, 100, 78125, 72, 19683, 1024
Offset: 1

Views

Author

Antti Karttunen, Apr 17 2017

Keywords

Comments

A permutation of the natural numbers > 1.
Otherwise like array A284311, but the columns come in different order.

Examples

			The top left 12x6 corner of the array:
   2,   3,  6,     5,  10,  15,  30,      7,  14,  21,  42,   35
   4,   9, 12,    25,  20,  45,  60,     49,  28,  63,  84,  175
   8,  27, 18,   125,  40,  75,  90,    343,  56, 147, 126,  245
  16,  81, 24,   625,  50, 135, 120,   2401,  98, 189, 168,  875
  32, 243, 36,  3125,  80, 225, 150,  16807, 112, 441, 252, 1225
  64, 729, 48, 15625, 100, 375, 180, 117649, 196, 567, 294, 1715
		

Crossrefs

Transpose: A285322.
Cf. A008479 (index of the row where n is located), A087207 (of the column).
Cf. arrays A284311, A285325, also A285332.

Programs

  • Mathematica
    a065642[n_] := Module[{k}, If[n == 1, Return[1], k = n + 1; While[ EulerPhi[k]/k != EulerPhi[n]/n, k++]]; k];
    A[1, k_] := Times @@ Prime[Flatten[Position[#, 1]]]&[Reverse[ IntegerDigits[k, 2]]];
    A[n_ /; n > 1, k_] := A[n, k] = a065642[A[n - 1, k]];
    Table[A[n - k + 1, k], {n, 1, 10}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Nov 17 2019 *)
  • Python
    from operator import mul
    from sympy import prime, primefactors
    def a019565(n): return reduce(mul, (prime(i+1) for i, v in enumerate(bin(n)[:1:-1]) if v == '1')) if n > 0 else 1 # This function from Chai Wah Wu
    def a007947(n): return 1 if n<2 else reduce(mul, primefactors(n))
    def a065642(n):
        if n==1: return 1
        r=a007947(n)
        n = n + r
        while a007947(n)!=r:
            n+=r
        return n
    def A(n, k): return a019565(k) if n==1 else a065642(A(n - 1, k))
    for n in range(1, 11): print([A(k, n - k + 1) for k in range(1, n + 1)]) # Indranil Ghosh, Apr 18 2017
  • Scheme
    (define (A285321 n) (A285321bi (A002260 n) (A004736 n)))
    (define (A285321bi row col) (if (= 1 row) (A019565 col) (A065642 (A285321bi (- row 1) col))))
    

Formula

A(1,k) = A019565(k), A(n,k) = A065642(A(n-1,k)).
For all n >= 2: A(A008479(n), A087207(n)) = n.

A285329 a(n) = A013928(A007947(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 17 2017

Keywords

Comments

For n > 1, a(n) gives the (one-based) index of the column where n is located in array A284311, or respectively, index of the row where n is in A284457. A008479 gives the other index.

Crossrefs

Cf. A008479 (the other index).
Cf. array A284311 (A284457).

Programs

  • Python
    from operator import mul
    from sympy import primefactors
    from sympy.ntheory.factor_ import core
    from functools import reduce
    def a007947(n): return 1 if n<2 else reduce(mul, primefactors(n))
    def a013928(n): return sum(1 for i in range(1, n) if core(i) == i)
    print([a013928(a007947(n)) for n in range(1, 101)]) # Indranil Ghosh, Apr 18 2017
    
  • Python
    from math import prod, isqrt
    from sympy import primefactors, mobius
    def A285329(n):
        m=prod(primefactors(n))-1
        return sum(mobius(k)*(m//k**2) for k in range(1,isqrt(m)+1)) # Chai Wah Wu, May 12 2024

Formula

a(n) = A013928(A007947(n)).
Other identities. For all n >= 0:
If A008683(n) <> 0 [when n is squarefree, A005117], a(n) = A013928(n), otherwise a(n) = a(A285328(n)).
a(A019565(n)) = A064273(n).

A285112 Permutation of natural numbers: a(0) = 1, a(1) = 2, a(2n) = A005117(1+a(n)), a(2n+1) = A065642(a(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 9, 6, 8, 7, 25, 14, 27, 10, 12, 13, 16, 11, 49, 39, 125, 22, 28, 42, 81, 15, 20, 19, 18, 21, 169, 26, 32, 17, 121, 79, 343, 65, 117, 205, 625, 35, 44, 43, 56, 69, 84, 133, 243, 23, 45, 33, 40, 31, 361, 30, 24, 34, 63, 277, 2197, 41, 52, 53, 64, 29, 289, 199, 1331, 130, 6241, 563, 2401, 106, 325, 193, 351, 335, 1025, 1030, 3125, 58
Offset: 0

Views

Author

Antti Karttunen, Apr 17 2017

Keywords

Comments

Note the indexing: the domain starts from 0, while the range excludes zero.
This sequence can be represented as a binary tree. Each left hand child is produced as A005117(1+n), and each right hand child as A065642(n), when the parent node contains n >= 2:
1
|
...................2...................
3 4
5......../ \........9 6......../ \........8
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
7 25 14 27 10 12 13 16
11 49 39 125 22 28 42 81 15 20 19 18 21 169 26 32
etc.

Crossrefs

Inverse: A285111.
Similar or related permutations: A243344, A243346, A252753, A277696, A284572.
Cf. also arrays A284457 & A284311.

Formula

a(0) = 1, a(1) = 2, a(2n) = A005117(1+a(n)), a(2n+1) = A065642(a(n)).

A284785 a(n) = rad(A280864(n)).

Original entry on oeis.org

1, 2, 2, 3, 6, 2, 5, 10, 6, 3, 7, 14, 2, 11, 22, 6, 15, 10, 6, 21, 14, 26, 13, 17, 34, 30, 15, 19, 38, 2, 23, 46, 6, 3, 5, 35, 42, 6, 29, 58, 10, 55, 33, 39, 26, 22, 77, 7, 31, 62, 10, 65, 78, 6, 37, 74, 14, 21, 51, 34, 30, 15, 41, 82, 2, 43, 86
Offset: 1

Views

Author

Bob Selcoe, Apr 02 2017

Keywords

Comments

By definition, all terms are squarefree (see A007947); repeated terms here are the squarefree kernels of A280864(n).
All even squarefree numbers appear infinitely often.
1 appears only at a(1).
Even terms appear consecutively in pairs, each pair followed by one or more odd terms.
Conjecture: all odd squarefree numbers > 1 appear infinitely often. If so, then A280864 is a permutation of the natural numbers.
Theorem: a(n) = b(n-1)*b(n) where b = A280738. - N. J. A. Sloane, Apr 11 2017

Examples

			a(61) = 30 because A280864(61) = 60, and rad(60) = 30.
		

Crossrefs

A365656 Array T(n,k) read by antidiagonals (downward): T(n,1) = A005117(n) (squarefree numbers > 1); for k > 1, columns are nonsquarefree numbers (in descending order) with exactly the same prime factors as T(n,1).

Original entry on oeis.org

1, 2, 4, 3, 8, 9, 5, 16, 27, 25, 6, 32, 81, 125, 12, 7, 64, 243, 625, 18, 49, 10, 128, 729, 3125, 24, 343, 20, 11, 256, 2187, 15625, 36, 2401, 40, 121, 13, 512, 6561, 78125, 48, 16807, 50, 1331, 169, 14, 1024, 19683, 390625, 54, 117649, 80, 14641, 2197, 28, 15
Offset: 0

Views

Author

Michael De Vlieger, Nov 17 2023

Keywords

Comments

Permutation of natural numbers.
Transpose of A284311 with a(0) = 1 prepended.
Essentially the same as A284457. - R. J. Mathar, Jan 23 2024

Examples

			Table T(n,k) for n = 1..12 and k = 1..6 shown below:
  n\k |  1    2     3       4        5         6 ...
  ----------------------------------------------
   1  |  1
   2  |  2    4     8      16       32        64
   3  |  3    9    27      81      243       729
   4  |  5   25   125     625     3125     15625
   5  |  6   12    18      24       36        48
   6  |  7   49   343    2401    16807    117649
   7  | 10   20    40      50       80       100
   8  | 11  121  1331   14641   161051   1771561
   9  | 13  169  2197   28561   371293   4826809
  10  | 14   28    56      98      112       196
  11  | 15   45    75     135      225       375
  12  | 17  289  4913   83521  1419857  24137569
  ...
Triangle begins:
   1;
   2;
   4,   3;
   8,   9,   5;
  16,  27,  25,  6;
  32,  81, 125, 12,  7;
  64, 243, 625, 18, 49, 10;
 ...
		

Crossrefs

Programs

  • Mathematica
    f[n_, k_ : 1] := Block[{c = 0, s = Sign[k], m}, m = n + s;
        While[c < Abs[k], While[! SquareFreeQ@ m, If[s < 0, m--, m++]];
         If[s < 0, m--, m++]; c++];
        m + If[s < 0, 1, -1] ] (* after Robert G.Wilson v at A005117 *);
      T[n_, k_] := T[n, k] =
        Which[And[n == 1, k == 1], 2, k == 1, f@T[n - 1, k],
         PrimeQ@ T[n, 1], T[n, 1]^k, True,
         Module[{j = T[n, k - 1]/T[n, 1] + 1},
          While[PowerMod[T[n, 1], j, j] != 0, j++]; j T[n, 1]]]; {1}~Join~
       Table[T[n - k + 1, k], {n, 12}, {k, n, 1, -1}] // TableForm

Formula

For prime n = p, T(p,k) = p^k.
Showing 1-10 of 10 results.