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.

A089723 a(1)=1; for n>1, a(n) gives number of ways to write n as n = x^y, 2 <= x, 1 <= y.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1
Offset: 1

Views

Author

Naohiro Nomoto, Jan 07 2004

Keywords

Comments

This function depends only on the prime signature of n. - Franklin T. Adams-Watters, Mar 10 2006
a(n) is the number of perfect divisors of n. Perfect divisor of n is divisor d such that d^k = n for some k >= 1. a(n) > 1 for perfect powers n = A001597(m) for m > 2. - Jaroslav Krizek, Jan 23 2010
Also the number of uniform perfect integer partitions of n - 1. An integer partition of n is uniform if all parts appear with the same multiplicity, and perfect if every nonnegative integer up to n is the sum of a unique submultiset. The Heinz numbers of these partitions are given by A326037. The a(16) = 3 partitions are: (8,4,2,1), (4,4,4,1,1,1), (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1). - Gus Wiseman, Jun 07 2019
The record values occur at 1 and at 2^A002182(n) for n > 1. - Amiram Eldar, Nov 06 2020

Examples

			144 = 2^4 * 3^2, gcd(4,2) = 2, d(2) = 2, so a(144) = 2. The representations are 144^1 and 12^2.
From _Friedjof Tellkamp_, Jun 14 2025: (Start)
n:          1, 2, 3, 4, 5, 6, 7, 8, 9, ...
----------------------------------------------------
1st powers: 1, 1, 1, 1, 1, 1, 1, 1, 1, ... (A000012)
Squares:    1, 0, 0, 1, 0, 0, 0, 0, 1, ... (A010052)
Cubes:      1, 0, 0, 0, 0, 0, 0, 1, 0, ... (A010057)
Quartics:   1, 0, 0, 0, 0, 0, 0, 0, 0, ... (A374016)
...
Sum:       oo, 1, 1, 2, 1, 1, 1, 2, 2, ...
a(1)=1:     1, 1, 1, 2, 1, 1, 1, 2, 2, ... (= this sequence). (End)
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    A089723 := proc(n) local t1,t2,g,j;
    if n=1 then 1 else
    t1:=ifactors(n)[2]; t2:=nops(t1); g := t1[1][2];
    for j from 2 to t2 do g:=gcd(g,t1[j][2]); od:
    tau(g); fi; end;
    [seq(A089723(n),n=1..100)]; # N. J. A. Sloane, Nov 10 2016
  • Mathematica
    Table[DivisorSigma[0, GCD @@ FactorInteger[n][[All, 2]]], {n, 100}] (* Gus Wiseman, Jun 12 2017 *)
  • PARI
    a(n) = if (n==1, 1, numdiv(gcd(factor(n)[,2]))); \\ Michel Marcus, Jun 13 2017
    
  • Python
    from math import gcd
    from sympy import factorint, divisor_sigma
    def a(n):
        if n == 1: return 1
        e = list(factorint(n).values())
        g = e[0]
        for ei in e[1:]: g = gcd(g, ei)
        return divisor_sigma(g, 0)
    print([a(n) for n in range(1, 105)]) # Michael S. Branicky, Jul 15 2021

Formula

If n = Product p_i^e_i, a(n) = d(gcd()). - Franklin T. Adams-Watters, Mar 10 2006
Sum_{n=1..m} a(n) = A255165(m) + 1. - Richard R. Forberg, Feb 16 2015
Sum_{n>=2} a(n)/n^s = Sum_{n>=2} 1/(n^s-1) = Sum_{k>=1} (zeta(s*k)-1) for all real s with Re(s) > 1 (Golomb, 1973). - Amiram Eldar, Nov 06 2020
For n > 1, a(n) = Sum_{i=1..floor(n/2)} floor(n^(1/i))-floor((n-1)^(1/i)). - Wesley Ivan Hurt, Dec 08 2020
Sum_{n>=1} (a(n)-1)/n = 1 (Mycielski, 1951). - Amiram Eldar, Jul 15 2021
From Friedjof Tellkamp, Jun 14 2025: (Start)
a(n) = 1 + A259362(n) = 1 + A010052(n) + A010057(n) + A374016(n) + (...), for n > 1.
G.f.: x + Sum_{j>=2, k>=1} x^(j^k). (End)

A089361 Numbers of pairs (i, j), i, j > 1, such that i^j <= n.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 15, 15, 15, 15, 15, 15
Offset: 1

Views

Author

Cino Hilliard, Dec 27 2003

Keywords

Comments

These numbers are related to the divergent series r sum(n^(1/k)) = n^(1/2) + n^(1/3) + ... + n^(1/r) for abs(n) > 0 and r=sqrt(n). Notice some numbers are missing, such as 4, 11, 12, 14.
Gaps (i.e., a(n) - a(n-1) > 1) occur for values of n > 1 in A117453. a(n) - a(n-1) = number of factors of j > 1, for the j in the pair (i,j) with the smallest value of i. Where n = A117453(x), a(n) = a(n-1) + A175066(x). For example: n = 64, a(64) = 13, a(63) = 10, 13 - 10 = 3; 64 = 2^6, 6 has three factors (2,3,6), corresponding to the three perfect powers for 64 (2^6, 4^3, 8^2). Also, A117453(3) = 64 and A175066(3) = 3. - Doug Bell, Jun 23 2015

Examples

			There are 5 perfect powers greater than 1 that are less than or equal to 16: 2^2, 2^3, 2^4, 3^2, 4^2, ergo the first 5 in the table.
		

Crossrefs

Programs

  • Maple
    N:= 1000; # to get a(1) to a(N)
    B:= Vector(N);
    for i from 2 to floor(sqrt(N)) do
      for j from 2 while i^j <= N do
        B[i^j]:= B[i^j]+1
      od
    od:
    convert(map(round,Statistics:-CumulativeSum(B)),list); # Robert Israel, Jun 24 2015
  • Mathematica
    A089361[n_] := Sum[Floor[n^(1/j)] - 1, {j, 2, BitLength[n] - 1}];
    Array[A089361, 100] (* Paolo Xausa, Jan 14 2025 *)
  • PARI
    plessn(n,m=2) = { for(k=1,n, s=0; rx = sqrtint(k); ry = logint(k,2); for(x=m,rx, for(y=2,ry, p = floor(x^y); if(p<=k,s++) ) ); print1(s", ") ) } \\ [corrected by Jason Yuen, Jan 12 2025]
    
  • PARI
    A = vector(100); for (p = 2, 6, i = 2; while (i^p <= 100, A[i^p]++; i++)); for (n = 2, 100, A[n] += A[n - 1]); \\ David Wasserman
    
  • PARI
    a(n) = sum(j=2, logint(n,2), sqrtnint(n,j)-1) \\ Jason Yuen, Jan 12 2025
    
  • Python
    from sympy import integer_nthroot
    def A089361(n): return sum(integer_nthroot(n,k)[0]-1 for k in range(2,n.bit_length())) # Chai Wah Wu, Nov 25 2024

Formula

a(1) = 0; for n > 1, if n not in A001597, a(n) = a(n-1), otherwise a(n) = a(n-1) + number of factors of j > 1 (A000005(j) - 1), for the j in the positive integer pair (i,j) where i^j = n with the smallest value of i. - Doug Bell, Jun 23 2015
a(n) = Sum_{j=2..floor(log_2(n))} floor(n^(1/j) - 1). - Robert Israel, Jun 24 2015
From Friedjof Tellkamp, Jun 14 2025: (Start)
a(n) = Sum_{k>=2..n} A259362(k), for n > 1.
G.f.: Sum_{j>=2, k>=2} x^(j^k)/(1-x). (End)

A382691 Alternating sum of the characteristic functions of k-th powers, with k >= 2: characteristic function of squares - c.f. of cubes + c.f. of 4th powers - ... .

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0
Offset: 1

Views

Author

Friedjof Tellkamp, Apr 05 2025

Keywords

Examples

			n:           1, 2, 3, 4, 5, 6, 7, 8, 9, ...
Squares (+): 1, 0, 0, 1, 0, 0, 0, 0, 1, ... (A010052)
Cubes   (-): 1, 0, 0, 0, 0, 0, 0, 1, 0, ... (A010057)
...
Sum:         0, 0, 0, 1, 0, 0, 0,-1, 1, ... (= this sequence).
		

Crossrefs

Cf. A089723 (nonalternating, k>=1), A259362 (nonalternating, k>=2).

Programs

  • Mathematica
    Table[Sum[(-1)^k Boole[IntegerQ[n^(1/k)]], {k, 2, Floor[Log[2, n]]}], {n, 1, 100}]
  • PARI
    a(n) = sum(i=2, logint(n,2), (-1)^i*ispower(n, i)); \\ Michel Marcus, Apr 11 2025

Formula

a(n) = A010052(n) - A010057(n) + A374016(n) - (...).
Sum_{i=1..n} a(i) = A381042(n).
G.f.: Sum_{j>=1, k>=2} (-1)^k * x^(j^k).
Sum_{n>=1} a(n)/n = 1/2.
Dirichlet g.f.: Sum_{k>=2} (-1)^k * zeta(k*s) = Sum_{k>=1} (zeta(2*k*s) - zeta((2*k+1)*s)).
Showing 1-3 of 3 results.