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

A376593 Second differences of consecutive nonsquarefree numbers (A013929). First differences of A078147.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Oct 01 2024

Keywords

Comments

The range is {-3, -2, -1, 0, 1, 2, 3}.

Examples

			The nonsquarefree numbers (A013929) are:
  4, 8, 9, 12, 16, 18, 20, 24, 25, 27, 28, 32, 36, 40, 44, 45, 48, 49, 50, 52, ...
with first differences (A078147):
  4, 1, 3, 4, 2, 2, 4, 1, 2, 1, 4, 4, 4, 4, 1, 3, 1, 1, 2, 2, 2, 4, 3, 1, 4, 4, ...
with first differences (A376593):
  -3, 2, 1, -2, 0, 2, -3, 1, -1, 3, 0, 0, 0, -3, 2, -2, 0, 1, 0, 0, 2, -1, -2, ...
		

Crossrefs

The version for A000002 is A376604, first differences of A054354.
The first differences were A078147.
Zeros are A376594, complement A376595.
A000040 lists the prime numbers, differences A001223.
A005117 lists squarefree numbers, differences A076259.
A064113 lists positions of adjacent equal prime gaps.
A114374 counts partitions into nonsquarefree numbers.
A246655 lists prime-powers exclusive, inclusive A000961.
A333254 lists run-lengths of differences between consecutive primes.
For second differences: A036263 (prime), A073445 (composite), A376559 (perfect-power), A376562 (non-perfect-power), A376590 (squarefree), A376596 (prime-power inclusive), A376599 (non-prime-power inclusive).
For nonsquarefree numbers: A013929 (terms), A078147 (first differences), A376594 (inflections and undulations), A376595 (nonzero curvature).

Programs

  • Mathematica
    Differences[Select[Range[100],!SquareFreeQ[#]&],2]
  • Python
    from math import isqrt
    from sympy import mobius, factorint
    def A376593(n):
        def f(x): return n+sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        k = next(i for i in range(1,5) if any(d>1 for d in factorint(m+i).values()))
        return next(i for i in range(1-k,5-k) if any(d>1 for d in factorint(m+(k<<1)+i).values())) # Chai Wah Wu, Oct 02 2024

A073445 Second differences of A002808, the sequence of composites.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Aug 01 2002

Keywords

Examples

			From _Gus Wiseman_, Oct 10 2024: (Start)
The composite numbers (A002808) are:
  4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32, 33, ...
with first differences (A073783):
  2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, ...
with first differences (A073445):
  0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, -1, 0, 0, 0, 1, 0, -1, 0, 0, 0, 1, -1, ...
(End)
		

Crossrefs

Also first differences of A054546.
For first differences we had A073783 (ones A375929), run-lengths A376680.
Positions of zeros are A376602.
Positions of nonzeros are A376603.
Positions of ones are A376651, negative-ones A376652.
A002808 lists the composite numbers.
A064113 lists positions of adjacent equal prime gaps.
A333254 gives run-lengths of differences between consecutive primes.
Other second differences: A036263 (prime), A376590 (squarefree), A376596 (prime-power), A376604 (Kolakoski).

Programs

  • Haskell
    a073445 n = a073445_list !! (n-1)
    a073445_list = zipWith (-) (tail a073783_list) a073783_list
    -- Reinhard Zumkeller, Jan 10 2013
    
  • Mathematica
    c[x_] := FixedPoint[x+PrimePi[ # ]+1&, x]; Table[c[w+2]-2*c[w+1]+c[w], {w, 200}]
    (* second program *)
    Differences[Select[Range[100],CompositeQ],2] (* Gus Wiseman, Oct 08 2024 *)
  • Python
    from sympy import primepi
    def A073445(n):
        def iterfun(f,n=0):
            m, k = n, f(n)
            while m != k: m, k = k, f(k)
            return m
        return (a:=iterfun(f:=lambda x:n+primepi(x)+1,n))-((b:=iterfun(lambda x:f(x)+1,a))<<1)+iterfun(lambda x:f(x)+2,b) # Chai Wah Wu, Oct 03 2024

Formula

a(n) = c(n+2)-2*c(n+1)+c(n), where c(n) = A002808(n).
a(n) = A073783(n+1) - A073783(n). - Reinhard Zumkeller, Jan 10 2013

A376596 Second differences of consecutive prime-powers inclusive (A000961). First differences of A057820.

Original entry on oeis.org

0, 0, 0, 1, -1, 0, 1, 0, 1, -2, 1, 2, -2, 0, 0, 0, -1, 4, -1, -2, 2, -2, 2, 2, -4, 1, 0, 1, -2, 4, -4, 0, 4, 2, -4, -2, 2, -2, 2, 4, -4, -2, -1, 2, 3, -4, 8, -8, 4, 0, -2, -2, 2, 2, -4, 8, -8, 2, -2, 10, 0, -8, -2, 2, 2, -4, 0, 6, -3, -4, 5, 0, -4, 4, -2, -2
Offset: 1

Views

Author

Gus Wiseman, Oct 02 2024

Keywords

Comments

For the exclusive version, shift left once.

Examples

			The prime-powers inclusive (A000961) are:
  1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, 41, 43, ...
with first differences (A057820):
  1, 1, 1, 1, 2, 1, 1, 2, 2, 3, 1, 2, 4, 2, 2, 2, 2, 1, 5, 4, 2, 4, 2, 4, 6, 2, 3, ...
with first differences (A376596):
  0, 0, 0, 1, -1, 0, 1, 0, 1, -2, 1, 2, -2, 0, 0, 0, -1, 4, -1, -2, 2, -2, 2, 2, ...
		

Crossrefs

The version for A000002 is A376604, first differences of A054354.
For first differences we had A057820, sorted firsts A376340(n)+1 (except first term).
Positions of zeros are A376597, complement A376598.
Sorted positions of first appearances are A376653, exclusive A376654.
A000961 lists prime-powers inclusive, exclusive A246655.
A001597 lists perfect-powers, complement A007916.
A023893 and A023894 count integer partitions into prime-powers, factorizations A000688.
A064113 lists positions of adjacent equal prime gaps.
For prime-powers inclusive: A057820 (first differences), A376597 (inflections and undulations), A376598 (nonzero curvature).
For second differences: A036263 (prime), A073445 (composite), A376559 (perfect-power), A376562 (non-perfect-power), A376590 (squarefree), A376593 (nonsquarefree), A376599 (non-prime-power).

Programs

  • Mathematica
    Differences[Select[Range[1000],#==1||PrimePowerQ[#]&],2]
  • Python
    from sympy import primepi, integer_nthroot
    def A376596(n):
        def iterfun(f,n=0):
            m, k = n, f(n)
            while m != k: m, k = k, f(k)
            return m
        def f(x): return int(n+x-1-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
        return (a:=iterfun(f,n))-((b:=iterfun(lambda x:f(x)+1,a))<<1)+iterfun(lambda x:f(x)+2,b) # Chai Wah Wu, Oct 02 2024

A378033 Greatest nonsquarefree number <= n, or 1 if there is none (the case n <= 3).

Original entry on oeis.org

1, 1, 1, 4, 4, 4, 4, 8, 9, 9, 9, 12, 12, 12, 12, 16, 16, 18, 18, 20, 20, 20, 20, 24, 25, 25, 27, 28, 28, 28, 28, 32, 32, 32, 32, 36, 36, 36, 36, 40, 40, 40, 40, 44, 45, 45, 45, 48, 49, 50, 50, 52, 52, 54, 54, 56, 56, 56, 56, 60, 60, 60, 63, 64, 64, 64, 64, 68
Offset: 1

Views

Author

Gus Wiseman, Nov 18 2024

Keywords

Examples

			The nonsquarefree numbers <= 10 are {4, 8, 9}, so a(10) = 9.
		

Crossrefs

For prime-powers we have A031218, differences A377782.
Greatest of the nonsquarefree numbers counted by A057627.
The opposite for squarefree is A067535, differences A378087.
For squarefree we have A070321, differences A378085.
The opposite is A120327 (union A162966), differences A378039.
The restriction to the primes is A378032, opposite A377783 (union A378040).
First-differences are A378036, restriction A378034.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers, differences A076259, seconds A376590.
A013929 lists the nonsquarefree numbers, differences A078147, seconds A376593.
A061398 counts squarefree numbers between primes (sums A337030), zeros A068360.
A061399 counts nonsquarefree numbers between primes (sums A378086), zeros A068361.
A112925 gives the greatest squarefree number < prime(n), differences A378038.
A112926 gives the least squarefree number > prime(n), differences A378037.
A377046 encodes k-differences of nonsquarefree numbers, zeros A377050.

Programs

  • Mathematica
    Table[NestWhile[#-1&,n,#>1&&SquareFreeQ[#]&],{n,100}]
  • PARI
    a(n) = my(k=n); while (issquarefree(k), k--); if(!k, 1, k); \\ Michel Marcus, Jul 26 2025

Formula

a(prime(n)) = A378032(n).
a(n) = A013929(A057627(n)), for n > 3. - Ridouane Oudra, Jul 26 2025

A376562 Second differences of consecutive non-perfect-powers (A007916). First differences of A375706.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Oct 01 2024

Keywords

Comments

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

Examples

			The non-perfect powers (A007916) are:
  2, 3, 5, 6, 7, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 26, 28, ...
with first differences (A375706):
  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, ...
with first differences (A376562):
  1, -1, 0, 2, -2, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 1, -1, 0, ...
		

Crossrefs

The version for A000002 is A376604, first differences of A054354.
For first differences we had A375706, ones A375740, complement A375714.
Positions of zeros are A376588, complement A376589.
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
A000961 lists prime-powers inclusive, exclusive A246655.
A007916 lists non-perfect-powers, complement A001597.
A112344 counts integer partitions into perfect-powers, factorizations A294068.
A333254 gives run-lengths of differences between consecutive primes.
For non-perfect-powers: A375706 (first differences), A376588 (inflections and undulations), A376589 (nonzero curvature).
For second differences: A036263 (prime), A073445 (composite), A376559 (perfect-power), A376590 (squarefree), A376593 (nonsquarefree), A376596 (prime-power inclusive), A376599 (non-prime-power inclusive).

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Differences[Select[Range[100],radQ],2]
  • Python
    from itertools import count
    from sympy import mobius, integer_nthroot, perfect_power
    def A376562(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)
        r = m+((k:=next(i for i in count(1) if not perfect_power(m+i)))<<1)
        return next(i for i in count(1-k) if not perfect_power(r+i)) # Chai Wah Wu, Oct 02 2024

A376559 Second differences of consecutive perfect powers (A001597). First differences of A053289.

Original entry on oeis.org

1, -3, 6, 2, -7, 3, -1, 9, 2, 2, 2, 2, -17, -1, 13, 9, 2, -7, -11, 9, -5, 20, 2, -16, -1, 21, 2, 2, -15, -11, 30, 2, 2, 2, 2, 2, 2, 2, -22, -15, 41, 2, 2, 2, -36, 3, 37, 2, 2, 2, -34, -11, 49, 2, 2, -66, 45, 3, -61, 2, 83, 2, 2, 2, 2, -63, 25, 42, 2, -9, -89
Offset: 1

Views

Author

Gus Wiseman, Sep 28 2024

Keywords

Comments

Perfect-powers A007916 are numbers with a proper integer root.
Does this sequence contain zero?

Examples

			The perfect powers (A001597) are:
  1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100, 121, 125, 128, 144, 169, 196, ...
with first differences (A053289):
  3, 4, 1, 7, 9, 2, 5, 4, 13, 15, 17, 19, 21, 4, 3, 16, 25, 27, 20, 9, 18, 13, ...
with first differences (A376559):
  1, -3, 6, 2, -7, 3, -1, 9, 2, 2, 2, 2, -17, -1, 13, 9, 2, -7, -11, 9, -5, 20, ...
		

Crossrefs

The version for A000002 is A376604, first differences of A054354.
For first differences we have A053289, union A023055, firsts A376268, A376519.
A000961 lists prime-powers inclusive, exclusive A246655.
A001597 lists perfect-powers, complement A007916.
A112344 counts integer partitions into perfect-powers, factorizations A294068.
For perfect-powers: A053289 (first differences), A376560 (positive curvature), A376561 (negative curvature).
For second differences: A036263 (prime), A073445 (composite), A376562 (non-perfect-power), A376590 (squarefree), A376593 (nonsquarefree), A376596 (prime-power), A376599 (non-prime-power).

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    Differences[Select[Range[1000],perpowQ],2]
  • PARI
    lista(nn) = my(v = concat (1, select(ispower, [1..nn])), w = vector(#v-1, i, v[i+1] - v[i])); vector(#w-1, i, w[i+1] - w[i]); \\ Michel Marcus, Oct 02 2024
  • Python
    from sympy import mobius, integer_nthroot
    def A376559(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n-1+x+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        a = bisection(f,n,n)
        b = bisection(lambda x:f(x)+1,a,a)
        return a+bisection(lambda x:f(x)+2,b,b)-(b<<1) # Chai Wah Wu, Oct 02 2024
    

A376599 Second differences of consecutive non-prime-powers inclusive (A024619). First differences of A375735.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Oct 02 2024

Keywords

Comments

Inclusive means 1 is a prime-power but not a non-prime-power. For the exclusive version, shift left once.

Examples

			The non-prime-powers inclusive (A024619) are:
  6, 10, 12, 14, 15, 18, 20, 21, 22, 24, 26, 28, 30, 33, 34, 35, 36, 38, 39, 40, ...
with first differences (A375735):
  4, 2, 2, 1, 3, 2, 1, 1, 2, 2, 2, 2, 3, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, ...
with first differences (A376599):
  -2, 0, -1, 2, -1, -1, 0, 1, 0, 0, 0, 1, -2, 0, 0, 1, -1, 0, 1, 0, -1, 0, 1, 0, ...
		

Crossrefs

The version for A000002 is A376604, first differences of A054354.
For first differences we had A375735, ones A375713(n) - 1.
Positions of zeros are A376600, complement A376601.
A000961 lists prime-powers inclusive, exclusive A246655.
A007916 lists non-perfect-powers.
A057820 gives first differences of prime-powers inclusive, first appearances A376341, sorted A376340.
A321346/A321378 count integer partitions without prime-powers, factorizations A322452.
For non-prime-powers: A024619/A361102 (terms), A375735/A375708 (first differences), A376600 (inflections and undulations), A376601 (nonzero curvature).
For second differences: A036263 (prime), A073445 (composite), A376559 (perfect-power), A376562 (non-perfect-power), A376590 (squarefree), A376593 (nonsquarefree), A376596 (prime-power).

Programs

  • Mathematica
    Differences[Select[Range[100],!(#==1||PrimePowerQ[#])&],2]
  • Python
    from sympy import primepi, integer_nthroot
    def A376599(n):
        def iterfun(f,n=0):
            m, k = n, f(n)
            while m != k: m, k = k, f(k)
            return m
        def f(x): return int(n+1+sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
        return (a:=iterfun(f,n))-((b:=iterfun(lambda x:f(x)+1,a))<<1)+iterfun(lambda x:f(x)+2,b) # Chai Wah Wu, Oct 02 2024

A377038 Array read by antidiagonals downward where A(n,k) is the n-th term of the k-th differences of the squarefree numbers.

Original entry on oeis.org

1, 2, 1, 3, 1, 0, 5, 2, 1, 1, 6, 1, -1, -2, -3, 7, 1, 0, 1, 3, 6, 10, 3, 2, 2, 1, -2, -8, 11, 1, -2, -4, -6, -7, -5, 3, 13, 2, 1, 3, 7, 13, 20, 25, 22, 14, 1, -1, -2, -5, -12, -25, -45, -70, -92, 15, 1, 0, 1, 3, 8, 20, 45, 90, 160, 252, 17, 2, 1, 1, 0, -3, -11, -31, -76, -166, -326, -578
Offset: 0

Views

Author

Gus Wiseman, Oct 18 2024

Keywords

Comments

Row n is the k-th differences of A005117 = the squarefree numbers.

Examples

			Array form:
        n=1:  n=2:  n=3:  n=4:  n=5:  n=6:  n=7:  n=8:  n=9:
  ----------------------------------------------------------
  k=0:   1     2     3     5     6     7    10    11    13
  k=1:   1     1     2     1     1     3     1     2     1
  k=2:   0     1    -1     0     2    -2     1    -1     0
  k=3:   1    -2     1     2    -4     3    -2     1     1
  k=4:  -3     3     1    -6     7    -5     3     0    -2
  k=5:   6    -2    -7    13   -12     8    -3    -2     3
  k=6:  -8    -5    20   -25    20   -11     1     5    -5
  k=7:   3    25   -45    45   -31    12     4   -10    10
  k=8:  22   -70    90   -76    43    -8   -14    20   -19
  k=9: -92   160  -166   119   -51    -6    34   -39    28
Triangle form:
   1
   2   1
   3   1   0
   5   2   1   1
   6   1  -1  -2  -3
   7   1   0   1   3   6
  10   3   2   2   1  -2  -8
  11   1  -2  -4  -6  -7  -5   3
  13   2   1   3   7  13  20  25  22
  14   1  -1  -2  -5 -12 -25 -45 -70 -92
  15   1   0   1   3   8  20  45  90 160 252
		

Crossrefs

Row k=0 is A005117.
Row k=1 is A076259.
Row k=2 is A376590.
The version for primes is A095195, noncomposites A376682, composites A377033.
A version for partitions is A175804, cf. A053445, A281425, A320590.
Triangle row-sums are A377039, absolute version A377040.
Column n = 1 is A377041, for primes A007442 or A030016.
First position of 0 in each row is A377042.
For nonsquarefree instead of squarefree numbers we have A377046.
For prime-powers instead of squarefree numbers we have A377051.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers, complement A013929 (differences A078147).
A073576 counts integer partitions into squarefree numbers, factorizations A050320.

Programs

  • Mathematica
    nn=9;
    t=Table[Take[Differences[NestList[NestWhile[#+1&,#+1,!SquareFreeQ[#]&]&,1,2*nn],k],nn],{k,0,nn}]
    Table[t[[j,i-j+1]],{i,nn},{j,i}]

Formula

A(i,j) = sum_{k=0..j} (-1)^(j-k) binomial(j,k) A005117(i+k).

A376597 Inflection and undulation points in the sequence of prime-powers inclusive (A000961).

Original entry on oeis.org

1, 2, 3, 6, 8, 14, 15, 16, 27, 32, 50, 61, 67, 72, 85, 92, 93, 124, 129, 132, 136, 141, 185, 190, 211, 214, 221, 226, 268, 292, 301, 302, 322, 374, 394, 423, 456, 463, 502, 503, 547, 559, 560, 593, 604, 640, 646, 663, 671, 675, 710, 726, 727, 746, 754, 755
Offset: 1

Views

Author

Gus Wiseman, Oct 05 2024

Keywords

Comments

These are points at which the second differences (A376596) are zero.
Inclusive means 1 is a prime-power. For the exclusive version, subtract 1 and shift left.

Examples

			The prime-powers inclusive (A000961) are:
  1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, 41, 43, ...
with first differences (A057820):
  1, 1, 1, 1, 2, 1, 1, 2, 2, 3, 1, 2, 4, 2, 2, 2, 2, 1, 5, 4, 2, 4, 2, 4, 6, 2, ...
with first differences (A376596):
  0, 0, 0, 1, -1, 0, 1, 0, 1, -2, 1, 2, -2, 0, 0, 0, -1, 4, -1, -2, 2, -2, 2, 2, ...
with zeros (A376597) at:
  1, 2, 3, 6, 8, 14, 15, 16, 27, 32, 50, 61, 67, 72, 85, 92, 93, 124, 129, 132, ...
		

Crossrefs

The first differences were A057820, see also A053707, A376340.
These are the zeros of A376596 (sorted firsts A376653, exclusive A376654).
The complement is A376598.
A000961 lists prime-powers inclusive, exclusive A246655.
A001597 lists perfect-powers, complement A007916.
A023893 and A023894 count integer partitions into prime-powers, factorizations A000688.
A064113 lists positions of adjacent equal prime gaps.
For prime-powers inclusive: A057820 (first differences), A376596 (second differences), A376598 (nonzero curvature).
For second differences: A036263 (prime), A073445 (composite), A376559 (perfect-power), A376562 (non-perfect-power), A376590 (squarefree), A376593 (nonsquarefree), A376599 (non-prime-power).

Programs

  • Mathematica
    Join@@Position[Differences[Select[Range[1000],#==1||PrimePowerQ[#]&],2],0]

A378036 First differences of A378033 (greatest positive integer < n that is 1 or nonsquarefree).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 18 2024

Keywords

Crossrefs

Positions of 0 are A005117 - 1, complement A013929 - 1.
Sums for squarefree numbers are A070321 (restriction A112925).
The restricted opposite is A377784, differences of A377783 (union A378040).
First-differences of A378033.
The restriction is A378034, differences of A378032.
The restricted opposite for squarefree is A378037, differences of A112926.
The opposite is A378039, differences of A120327 (union A162966).
For squarefree numbers we have A378085, restriction A378038.
The opposite for squarefree is A378087, differences of A067535.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers, differences A076259, seconds A376590.
A013929 lists the nonsquarefree numbers, differences A078147, seconds A376593.
A061398 counts squarefree numbers between primes (sums A337030), zeros A068360.
A061399 counts nonsquarefree numbers between primes (sums A378086), zeros A068361.
A377046 encodes k-differences of nonsquarefree numbers, zeros A377050.

Programs

  • Mathematica
    Differences[Table[NestWhile[#-1&,n,#>1&&SquareFreeQ[#]&],{n,100}]]
  • PARI
    A378033(n) = if(n<=3, 1, forstep(k=n, 0, -1, if(!issquarefree(k), return(k))));
    A378036(n) = (A378033(1+n)-A378033(n)); \\ Antti Karttunen, Jan 28 2025

Formula

a(prime(n)) = A378034(n).

Extensions

Data section extended to a(107) by Antti Karttunen, Jan 28 2025
Showing 1-10 of 28 results. Next