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 51 results. Next

A324574 a(1) = 0; for n > 1, a(n) = A033879(A087207(n)).

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 5, 0, 1, 1, 2, 1, 4, 2, 16, 1, 2, 1, 18, 1, 5, 1, 6, 1, 1, -3, 46, -4, 2, 1, 82, 14, 4, 1, 10, 1, 16, 0, 256, 1, 2, 1, 4, -12, 18, 1, 2, -2, 5, 8, 226, 1, 6, 1, 748, 2, 1, -19, 18, 1, 46, -12, 12, 1, 2, 1, 1362, 0, 82, -12, 22, 1, 4, 1, 3838, 1, 10, 10, 5458, 254, 16, 1, 6, -10, 256, -348, 12250
Offset: 1

Views

Author

Antti Karttunen, Mar 08 2019

Keywords

Comments

As A087207 is a surjective function that toggles the parity, it follows that if it can be proved/disproved that a(n) = 0 for some/any even n, then it also proves/disproves the existence of odd perfect numbers.
The positions (n > 1) of zeros in squarefree n, 15, 385, ..., can be obtained as A019565(A000396(n)).

Crossrefs

Programs

Formula

a(1) = 0; for n > 1, a(n) = A033879(A087207(n)).
a(n) = a(A007947(n)) = A324575(A007947(n)).

A286608 Numbers k for which the binary representation of the primes that divide k (A087207) is less than k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 27, 28, 30, 32, 33, 35, 36, 39, 40, 42, 44, 45, 48, 49, 50, 52, 54, 55, 56, 60, 63, 64, 65, 66, 68, 70, 72, 75, 77, 78, 80, 81, 84, 85, 88, 90, 91, 96, 98, 99, 100, 102, 104, 105, 108, 110, 112, 117, 119, 120, 121, 125, 126, 128, 130
Offset: 1

Views

Author

Antti Karttunen, Jun 20 2017

Keywords

Comments

Any finite cycle of A087207, if such cycles exist at all, should have at least one term that is a member of this sequence, and also at least one term that is a member of A286609.

Crossrefs

Cf. A286609 (complement).
Intersection with A286611 gives A286612.

Programs

  • Mathematica
    b[n_] := If[n==1, 0, Total[2^(PrimePi /@ FactorInteger[n][[All, 1]] - 1)]];
    filterQ[n_] := b[n] < n;
    Select[Range[1000], filterQ] (* Jean-François Alcover, Dec 31 2020 *)
  • PARI
    A007947(n) = factorback(factorint(n)[, 1]);
    A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; }; \\ After Michel Marcus
    A087207(n) = A048675(A007947(n));
    isA286608(n) = (A087207(n) < n);
    n=0; j=1; k=1; while(j <= 10000, n=n+1; if(isA286608(n), write("b286608.txt", j, " ", n); j=j+1, write("b286609.txt", k, " ", n); k=k+1));
    
  • Python
    from sympy import factorint, primepi
    def a(n):
        f=factorint(n)
        return sum([2**primepi(i - 1) for i in f])
    print([n for n in range(1, 201) if a(n)Indranil Ghosh, Jun 20 2017
  • Scheme
    ;; With Antti Karttunen's IntSeq-library.
    (define A286608 (MATCHING-POS 1 1 (lambda (n) (< (A087207 n) n))))
    

A286609 Numbers k for which the binary representation of the primes that divide k (A087207) is more than k.

Original entry on oeis.org

7, 11, 13, 17, 19, 23, 26, 29, 31, 34, 37, 38, 41, 43, 46, 47, 51, 53, 57, 58, 59, 61, 62, 67, 69, 71, 73, 74, 76, 79, 82, 83, 86, 87, 89, 92, 93, 94, 95, 97, 101, 103, 106, 107, 109, 111, 113, 114, 115, 116, 118, 122, 123, 124, 127, 129, 131, 133, 134, 137, 138, 139, 141, 142, 145, 146, 148, 149, 151, 155
Offset: 1

Views

Author

Antti Karttunen, Jun 20 2017

Keywords

Comments

Any finite cycle of A087207, if such cycles exist at all, should have at least one term that is a member of this sequence, and also at least one term that is a member of A286608.

Crossrefs

Cf. A286608 (complement).

Programs

  • Mathematica
    b[n_] := If[n= 1, 0, Total[2^(PrimePi /@ FactorInteger[n][[All, 1]] - 1)]];
    filterQ[n_] := b[n] >= n;
    Select[Range[1000], filterQ] (* Jean-François Alcover, Dec 31 2020 *)
  • PARI
    A007947(n) = factorback(factorint(n)[, 1]);
    A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; }; \\ After Michel Marcus
    A087207(n) = A048675(A007947(n));
    isA286608(n) = (A087207(n) < n);
    n=0; j=1; k=1; while(k <= 10000, n=n+1; if(isA286608(n), write("b286608.txt", j, " ", n); j=j+1, write("b286609.txt", k, " ", n); k=k+1));
    
  • Python
    from sympy import factorint, primepi
    def a(n):
        f=factorint(n)
        return sum([2**primepi(i - 1) for i in f])
    print([n for n in range(1, 201) if a(n)>n]) # Indranil Ghosh, Jun 20 2017
  • Scheme
    ;; With Antti Karttunen's IntSeq-library.
    (define A286609 (MATCHING-POS 1 1 (lambda (n) (> (A087207 n) n))))
    

A286611 Numbers k for which A019565(k) <= A087207(k).

Original entry on oeis.org

17, 19, 34, 37, 41, 43, 47, 53, 59, 61, 65, 67, 69, 71, 73, 74, 79, 82, 83, 86, 89, 97, 101, 103, 106, 107, 109, 113, 118, 122, 127, 129, 131, 134, 137, 139, 141, 142, 145, 146, 148, 149, 151, 157, 158, 163, 164, 166, 167, 173, 177, 178, 179, 181, 183, 191, 193, 194, 197, 199, 201, 202, 206, 211, 212
Offset: 1

Views

Author

Antti Karttunen, Jun 20 2017

Keywords

Comments

Any 2-cycle of A087207 and also any 2-cycle of A019565 (in which case A019565(x) = A087207(x) for both members of the cycle), if such cycles exist at all, must have the both of its members included in this sequence.

Crossrefs

Intersection with A286608 gives A286612.

Programs

A286612 Numbers n for which A019565(n) <= A087207(n) < n.

Original entry on oeis.org

65, 513, 1026, 4107, 8200, 8256, 16400, 16450, 16512, 16544, 16641, 32800, 32900, 33024, 33282, 33920, 49184, 65600, 65800, 66048, 66080, 131200, 131334, 132096, 132160, 163968, 262400, 262668, 264192, 264320, 274432, 327936, 524342, 524610, 524800, 524832, 525826, 528384, 532500, 540736, 548864, 655872, 786467, 1048617
Offset: 1

Views

Author

Antti Karttunen, Jun 20 2017

Keywords

Comments

Any 2-cycle of A087207 and also any 2-cycle of A019565 (in which case A019565(x) = A087207(x) for both members of the cycle), if such cycles exist at all, must have the larger one of its members included in this sequence.

Crossrefs

Intersection of A286608 and A286611.
Subsequence of A285315.

A288569 Start with n and repeatedly apply the map x -> A087207(x) until we reach 0; a(n) is the number of steps needed, or -1 if 0 is never reached.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jun 25 2017

Keywords

Comments

There is a conjecture that 0 is always reached - see A087207.
The map x -> A087207(x) can also start with A019565(n) until it reaches 1 (which is A019565(0)). - Flávio V. Fernandes, Feb 24 2025

Examples

			10 -> 5 -> 4 -> 1 -> 0 reaches 0 in 4 steps, so a(10)=4.
38 = 2*19 -> 129 = 3*43 -> 8194 = 2*17*241 -> 4503599627370561 = 3^2*37*71*190483425427 -> ..., and a(38) is presently unknown.
		

Crossrefs

Cf. A087207.
Cf. A019565.

Programs

  • Maple
    f:= proc(n) local i; option remember;
      add(2^(numtheory:-pi(t)-1), t = numtheory:-factorset(n)) end proc:
    g:= proc(n) local t,count;
       t:= n;
       for count from 0 while t <> 0 do
          t:= f(t)
       od;
       count
    end proc:
    map(g, [$1..37]); # Robert Israel, Jun 25 2017
  • Mathematica
    f[n_] := Total[2^(PrimePi /@ FactorInteger[n][[All, 1]]-1)]; f[1] = 0;
    g[n_] := Module[{t, count}, t = n; For[count = 0, t != 0, count++, t = f[t]]; count];
    Table[g[n], {n, 1, 37}] (* Jean-François Alcover, Aug 15 2023, after Robert Israel *)
  • Python
    from sympy import factorint, primepi
    def f(n):
        return 0 if n < 2 else sum(1 << int(primepi(i-1)) for i in factorint(n))
    def a(n):
        fn, c = n, 0
        while not fn == 0: fn, c = f(fn), c+1
        return c
    print([a(n) for n in range(1, 38)]) # Michael S. Branicky, Jul 11 2022

A288566 Partial sums of A087207.

Original entry on oeis.org

0, 1, 3, 4, 8, 11, 19, 20, 22, 27, 43, 46, 78, 87, 93, 94, 158, 161, 289, 294, 304, 321, 577, 580, 584, 617, 619, 628, 1140, 1147, 2171, 2172, 2190, 2255, 2267, 2270, 4318, 4447, 4481, 4486, 8582, 8593, 16785, 16802, 16808, 17065, 33449, 33452, 33460, 33465, 33531, 33564, 66332, 66335, 66355, 66364
Offset: 1

Views

Author

N. J. A. Sloane, Jun 24 2017

Keywords

Crossrefs

Cf. A087207.

Formula

G.f.: (1/(1 - x)) * Sum_{k>=1} 2^(k-1) * x^prime(k) / (1 - x^prime(k)). - Ilya Gutkovskiy, Aug 18 2021

A307544 Irregular triangle read by rows: T(n,k) = A087207(A307540(n,k)).

Original entry on oeis.org

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

Views

Author

Michael De Vlieger, Apr 19 2019

Keywords

Comments

Let gpf(m) = A006530(m) and let phi(m) = A000010(m) for m in A005117.
Row n contains m in A005117 such that A006530(m) = n, sorted such that phi(m)/m increases as k increases.
Let m be the squarefree kernel A007947(m') of m'. We only consider squarefree m since phi(m)/m = phi(m')/m'. Let prime p | n and prime q be a nondivisor of n.
Since m is squarefree, we might encode the multiplicities of its prime divisors in a positional notation M that is finite at n significant digits. For example, m = 42 can be encoded reverse(A067255(42)) = 1,0,1,1 = 7^1 * 5^0 * 3^1 * 2^1. It is necessary to reverse row m of A067255 (hereinafter simply A067255(m)) so as to preserve zeros in M = A067255(m) pertaining to small nondivisor primes q < p. The code M is a series of 0's and 1's since m is squarefree. Then it is clear that row n contains all m such that A067255(m) has n terms, and there are 2^(n - 1) possible terms for n >= 1.
We may use an approach that generates the binary expansion of the range 2^(n - 1) < M < 2^n - 1, or we may append 1 to the reversed (n - 1)-tuples of {1, 0} (as A059894) to achieve codes M -> m for each row n.
Originally it was thought that the codes M were in order of the latter algorithm, and we could avoid sorting. Observation shows that the m still require sorting by the function phi(m)/m indeed to be in increasing order in row n. Still, the latter approach is slightly more efficient than the former in generating the sequence.
This sequence interprets the code M as a binary value. The sequence is a permutation of the natural numbers since the ratio phi(m)/m is unique for squarefree m.
This sequence and A059894 are identical for 1 <= n <= 23.
Numbers of terms in rows n of this sequence and A059894 (partitioned by powers of 2) that are coincident: 1, 2, 4, 8, 14, 14, 10, 26, 14, 20, 10, 16, 22, 12, 18, 18, 16, 14, 18, 18, 18, 14, 16, ...}.
The graphs of this sequence and A059894 are similar.
The graph of this sequence feature squares of size 2^(j-1) at (x,y) = (h,h) where h = 2^j, integers, that have pi-radian rotational symmetry.

Examples

			First terms of this sequence appear bottom to top in the chart below. The values of n appear in the header, values m = T(n,k) followed parenthetically by phi(m)/m appear in column n. In square brackets, we write the multiplicities of primes in positional order with the smallest prime at right (big-endian). The x axis plots k according to primepi(gpf(m)), while the y axis plots k according to phi(m)/m:
    0       1          2             3             4
    .       .          .             .             .
--- 1 ------------------------------------------------
  (1/1)     .          .             .             .
   [0]      .          .             .             .
    .       .          .             .             .
    .       .          .             .             7
    .       .          .             5           (6/7)
    .       .          .           (4/5)        [1000]
    .       .          .           [100]           .
    .       .          .             .            35
    .       .          3             .          (24/35)
    .       .        (2/3)           .          [1100]
    .       .        [10]            .             .
    .       .          .             .             .
    .       .          .             .            21
    .       .          .             .           (4/7)
    .       .          .            15          [1010]
    .       .          .          (8/15)           .
    .       2          .           [110]           .
    .     (1/2)        .             .             .
    .      [1]         .             .            105
    .       .          .             .          (16/35)
    .       .          .             .          [1110]
    .       .          .             .            14
    .       .          .            10           (3/7)
    .       .          .           (2/5)        [1001]
    .       .          .           [101]           .
    .       .          .             .            70
    .       .          6             .          (12/35)
    .       .        (1/3)           .          [1101]
    .       .        [11]            .            42
    .       .          .            30           (2/7)
    .       .          .          (4/15)        [1011]
    .       .          .           [111]          210
    .       .          .             .           (8/35)
    .       .          .             .          [1111]
...
a(1) = 0 since T(0,1) = 1 = empty product.
a(2) = 1 since T(1,1) = 2 = 2^1 -> binary "1" = decimal 1.
a(3) = 3 since T(2,1) = 6 = 2^1 * 3^1 -> binary "11" = decimal 3.
a(4) = 2 since T(2,2) = 3 = 2^0 * 3^1 -> binary "10" = decimal 2.
a(5) = 7 since T(3,1) = 30 = 2^1 * 3^1 * 5^1 -> binary "111" = decimal 7, etc.
Graph of first 32 terms: (Start)
              x
                       x
                   x
                           x
                 x
                         x
                     x
                x
                             x
                        x
                    x
                            x
                  x
                          x
                      x
                              x
       x
           x
         x
             x
        x
            x
          x
              x
   x
     x
    x
      x
x
  x
x
(End)
From _Antti Karttunen_, Jan 10 2020: (Start)
Arranged as a binary tree:
                                       0
                                       |
                    ...................1...................
                   3                                       2
         7......../ \........5                   6......../ \........4
        / \                 / \                 / \                 / \
       /   \               /   \               /   \               /   \
      /     \             /     \             /     \             /     \
    15       11         13       9          14       10         12       8
  31  23   27  19     29  21   25 30      17  22   26  18     28  20   24 16
etc.
(End)
		

Crossrefs

Programs

  • Mathematica
    Prepend[Array[SortBy[#, Last] &@ Map[{#2, EulerPhi[#1]/#1} & @@ {Times @@  MapIndexed[Prime[First@ #2]^#1 &, Reverse@ #], FromDigits[#, 2]} &, Map[Prepend[Reverse@ #, 1] &, Tuples[{1, 0}, # - 1]]] &, 7], {{0, 0, 1}}][[All, All, 1]] // Flatten
  • PARI
    up_to = 1023;
    rat(n) = { my(m=1, p=2); while(n, if(n%2, m *= (p-1)/p); n >>= 1; p = nextprime(1+p)); (m); };
    cmpA307544(a,b) = if(!a,sign(-b),if(!b,sign(a), my(as=logint(a,2), bs=logint(b,2)); if(as!=bs, sign(as-bs), sign(rat(a)-rat(b)))));
    A307544list(up_to) = vecsort(vector(1+up_to,n,n-1), cmpA307544);
    v307544 = A307544list(up_to);
    A307544(n) = v307544[1+n]; \\ Antti Karttunen, Jan 10 2020

Formula

For n > 0, row lengths = 2^(n - 1).
T(n,1) = 2^n - 1 = A000225(n).
T(n,2^(n - 1)) = 2^(n - 1).

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

A061395 Let p be the largest prime factor of n; if p is the k-th prime then set a(n) = k; a(1) = 0 by convention.

Original entry on oeis.org

0, 1, 2, 1, 3, 2, 4, 1, 2, 3, 5, 2, 6, 4, 3, 1, 7, 2, 8, 3, 4, 5, 9, 2, 3, 6, 2, 4, 10, 3, 11, 1, 5, 7, 4, 2, 12, 8, 6, 3, 13, 4, 14, 5, 3, 9, 15, 2, 4, 3, 7, 6, 16, 2, 5, 4, 8, 10, 17, 3, 18, 11, 4, 1, 6, 5, 19, 7, 9, 4, 20, 2, 21, 12, 3, 8, 5, 6, 22, 3, 2, 13, 23, 4, 7, 14, 10, 5, 24, 3, 6, 9, 11, 15
Offset: 1

Views

Author

Henry Bottomley, Apr 30 2001

Keywords

Comments

Records occur at the primes. - Robert G. Wilson v, Dec 30 2007
For n > 1: length of n-th row in A067255. - Reinhard Zumkeller, Jun 11 2013
a(n) = the largest part of the partition having Heinz number n. We define the Heinz number of a partition p = [p_1, p_2, ..., p_r] as Product(p_j-th prime, j=1...r) (concept used by Alois P. Heinz in A215366 as an "encoding" of a partition). For example, for the partition [1, 1, 2, 4, 10] we get 2*2*3*7*29 = 2436. Example: a(20) = 3; indeed, the partition having Heinz number 20 = 2*2*5 is [1,1,3]. - Emeric Deutsch, Jun 04 2015

Examples

			a(20) = 3 since the largest prime factor of 20 is 5, which is the 3rd prime.
		

Crossrefs

Programs

  • Haskell
    a061395 = a049084 . a006530  -- Reinhard Zumkeller, Jun 11 2013
    
  • Maple
    with(numtheory):
    a:= n-> pi(max(1, factorset(n)[])):
    seq(a(n), n=1..100);  # Alois P. Heinz, Aug 03 2013
  • Mathematica
    Insert[Table[PrimePi[FactorInteger[n][[ -1]][[1]]], {n, 2, 120}], 0, 1] (* Stefan Steinerberger, Apr 11 2006 *)
    f[n_] := PrimePi[ FactorInteger@n][[ -1, 1]]; Array[f, 94] (* Robert G. Wilson v, Dec 30 2007 *)
  • PARI
    a(n) = if (n==1, 0, primepi(vecmax(factor(n)[,1]))); \\ Michel Marcus, Nov 14 2022
    
  • Python
    from sympy import primepi, primefactors
    def a(n): return 0 if n==1 else primepi(primefactors(n)[-1])
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, May 14 2017

Formula

A000040(a(n)) = A006530(n); a(n) = A049084(A006530(n)). - Reinhard Zumkeller, May 22 2003
A243055(n) = a(n) - A055396(n). - Antti Karttunen, Mar 07 2017
a(n) = A000720(A006530(n)). - Alois P. Heinz, Mar 05 2020
a(n) = A029837(A087207(n)+1). - Flávio V. Fernandes, Apr 24 2025

Extensions

Definition reworded by N. J. A. Sloane, Jul 01 2008
Showing 1-10 of 51 results. Next