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.

A375706 First differences of non-perfect-powers.

Original entry on oeis.org

1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 2, 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, 2, 1, 1, 1, 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, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2
Offset: 1

Views

Author

Gus Wiseman, Aug 31 2024

Keywords

Comments

Non-perfect-powers (A007916) are numbers without a proper integer root.

Examples

			The 5th non-perfect-power is 7, and the 6th is 10, so a(5) = 3.
		

Crossrefs

For prime-powers (A000961) we have A057820.
For perfect powers (A001597) we have A053289.
For nonprime numbers (A002808) we have A073783.
For squarefree numbers (A005117) we have A076259.
First differences of A007916.
For nonsquarefree numbers (A013929) we have A078147.
For non-prime-powers (A024619) we have A375708.
Positions of 1s are A375740, complement A375714.
Runs of non-perfect-powers:
- length: A375702 = A053289(n+1) - 1
- first: A375703 (same as A216765 with 2 exceptions)
- last: A375704 (same as A045542 with 8 removed)
- sum: A375705

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Differences[Select[Range[100],radQ]]
  • PARI
    up_to = 112;
    A375706list(up_to) = { my(v=vector(up_to), pk=2, k=2, i=0); while(i<#v, k++; if(!ispower(k), i++; v[i] = k-pk; pk = k)); (v); };
    v375706 = A375706list(up_to);
    A375706(n) = v375706[n]; \\ Antti Karttunen, Jan 19 2025
  • Python
    from itertools import count
    from sympy import mobius, integer_nthroot, perfect_power
    def A375706(n):
        def f(x): return int(n+1-sum(mobius(k)*(integer_nthroot(x, k)[0]-1) for k in range(2, x.bit_length())))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return next(i for i in count(m+1) if not perfect_power(i))-m # Chai Wah Wu, Sep 09 2024
    

Formula

a(n) = A007916(n+1) - A007916(n).

Extensions

More terms from Antti Karttunen, Jan 19 2025