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.

Previous Showing 11-20 of 26 results. Next

A376652 Points of downward concavity in the sequence of composite numbers (A002808).

Original entry on oeis.org

2, 6, 10, 13, 19, 24, 28, 31, 36, 42, 47, 51, 56, 59, 64, 71, 75, 79, 82, 95, 98, 104, 114, 119, 124, 127, 132, 138, 148, 152, 163, 174, 178, 181, 187, 196, 201, 206, 212, 217, 221, 230, 243, 247, 250, 263, 268, 278, 281, 286, 293, 298, 303, 306, 311, 318, 321
Offset: 1

Views

Author

Gus Wiseman, Oct 06 2024

Keywords

Comments

These are points at which the second differences (A073445) are negative.
Also positions of strict descents in the first differences (A073783) of composite numbers (A002808).

Examples

			The composite numbers are (A002808):
  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, 2, ...
with second 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, 0, ...
with negative terms at (A376651):
  2, 6, 10, 13, 19, 24, 28, 31, 36, 42, 47, 51, 56, 59, 64, 71, 75, 79, 82, 95, 98, ...
		

Crossrefs

The version for A000002 is A156242, positive A022297.
Partitions into composite numbers are counted by A023895, factorizations A050370.
For first differences we had A065310 or A073783, ones A375929.
These are the positions of negative terms in A073445, positive A376651.
For prime instead of composite we have A258026, positive A258025.
For zero second differences instead of negative we have A376602.
For composite numbers: A002808 (terms), A073783 (first differences), A073445 (second differences), A376602 (inflections and undulations), A376603 (nonzero curvature), A376651 (concave-up).

Programs

  • Maple
    Comps:= remove(isprime, [seq(i,i=4..1000)]):
    D1:= Comps[2..-1]-Comps[1..-2]:
    D2:= D1[2..-1]-D1[1..-2]:
    select(t -> D2[t] < 0, [$1..nops(D2)]); # Robert Israel, Nov 06 2024
  • Mathematica
    Join@@Position[Sign[Differences[Select[Range[1000],CompositeQ],2]],-1]

A377035 Antidiagonal-sums of the absolute value of the array A377033(n,k) = n-th term of the k-th differences of the composite numbers (A002808).

Original entry on oeis.org

4, 8, 10, 12, 14, 18, 21, 28, 34, 40, 47, 74, 96, 110, 138, 286, 715, 2393, 8200, 25731, 72468, 184716, 431575, 934511, 1892267, 3605315, 6494464, 11116110, 18134549, 28348908, 42701927, 62290660, 88313069, 120999433, 159769475, 221775851, 483797879
Offset: 1

Views

Author

Gus Wiseman, Oct 18 2024

Keywords

Examples

			The fourth antidiagonal of A377033 is (9, 1, -1, -1), so a(4) = 12.
		

Crossrefs

The version for prime instead of composite is A376681, absolute version of A140119.
The version for noncomposite is A376684, absolute version of A376683.
This is the antidiagonal-sums of absolute value of the array A377033.
For squarefree instead of composite we have A377040, absolute version of A377039.
For nonsquarefree instead of composite we have A377048, absolute version of A377047.
For prime-power instead of composite we have A377053, absolute version of A377052.
Other arrays of differences: A095195 (prime), A376682 (noncomposite), A377033 (composite), A377038 (squarefree), A377046 (nonsquarefree), A377051 (prime-power).
A000040 lists the primes, differences A001223, seconds A036263.
A002808 lists the composite numbers, differences A073783, seconds A073445.
A008578 lists the noncomposites, differences A075526.
Cf. A018252, A065310, A065890, A333254, A376602 (zero), A376603 (nonzero), A376651 (positive), A376652 (negative), A376680, A377036.

Programs

  • Mathematica
    q=Select[Range[120],CompositeQ];
    t=Table[Sum[(-1)^(j-k)*Binomial[j,k]*q[[i+k]],{k,0,j}],{j,0,Length[q]/2},{i,Length[q]/2}];
    Total/@Table[Abs[t[[j,i-j+1]]],{i,Length[q]/2},{j,i}]

A375929 Numbers k such that A002808(k+1) = A002808(k) + 1. In other words, the k-th composite number is 1 less than the next.

Original entry on oeis.org

3, 4, 7, 8, 11, 12, 14, 15, 16, 17, 20, 21, 22, 23, 25, 26, 29, 30, 32, 33, 34, 35, 37, 38, 39, 40, 43, 44, 45, 46, 48, 49, 52, 53, 54, 55, 57, 58, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 72, 73, 76, 77, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94
Offset: 1

Views

Author

Gus Wiseman, Sep 12 2024

Keywords

Comments

Positions of 1's in A073783 (see also A054546, A065310).

Examples

			The composite numbers are 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, ... which increase by 1 after positions 3, 4, 7, 8, ...
		

Crossrefs

Positions in A002808 of each element of A068780.
The complement is A065890 shifted.
First differences are A373403 (except first).
The version for non-prime-powers is A375713, differences A373672.
The version for prime-powers is A375734, differences A373671.
The version for non-perfect-powers is A375740.
The version for nonprime numbers is A375926.
A000040 lists the prime numbers, differences A001223.
A000961 lists prime-powers (inclusive), differences A057820.
A002808 lists the composite numbers, differences A073783.
A018252 lists the nonprime numbers, differences A065310.
A046933 counts composite numbers between primes.

Programs

  • Mathematica
    Join@@Position[Differences[Select[Range[100],CompositeQ]],1]
  • Python
    from sympy import primepi
    def A375929(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 n+bisection(lambda y:primepi(x+2+y))-2
        return bisection(f,n,n) # Chai Wah Wu, Sep 15 2024
    
  • Python
    # faster for initial segment of sequence
    from sympy import isprime
    from itertools import count, islice
    def agen(): # generator of terms
        pic, prevc = 0, -1
        for i in count(4):
            if not isprime(i):
                if i == prevc + 1:
                    yield pic
                pic, prevc = pic+1, i
    print(list(islice(agen(), 10000))) # Michael S. Branicky, Sep 17 2024

Formula

a(n) = A375926(n) - 1.

A379300 Number of prime indices of n that are composite.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Dec 25 2024

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 39 are {2,6}, so a(39) = 1.
The prime indices of 70 are {1,3,4}, so a(70) = 1.
The prime indices of 98 are {1,4,4}, so a(98) = 2.
The prime indices of 294 are {1,2,4,4}, a(294) = 2.
The prime indices of 1911 are {2,4,4,6}, so a(1911) = 3.
The prime indices of 2548 are {1,1,4,4,6}, so a(2548) = 3.
		

Crossrefs

Positions of first appearances are A000420.
Positions of zero are A302540, counted by A034891 (strict A036497).
Positions of one are A379301, counted by A379302 (strict A379303).
A000040 lists the prime numbers, differences A001223.
A002808 lists the composite numbers, nonprimes A018252, differences A073783 or A065310.
A055396 gives least prime index, greatest A061395.
A056239 adds up prime indices, row sums of A112798, counted by A001222.
A066247 is the characteristic function for the composite numbers.
A377033 gives k-th differences of composite numbers, see A073445, A377034-A377037.
Other counts of prime indices:
- A087436 postpositive, see A038550.
- A330944 nonprime, see A002095, A096258, A320628, A330945.
- A379306 squarefree, see A302478, A379308, A379309, A379316.
- A379310 nonsquarefree, see A114374, A256012, A379307.
- A379311 old prime, see A379312-A379315.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Select[prix[n],CompositeQ]],{n,100}]

Formula

Totally additive with a(prime(k)) = A066247(k).

A379311 Number of prime indices of n that are 1 or prime.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Dec 27 2024

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 39 are {2,6}, so a(39) = 1.
The prime indices of 70 are {1,3,4}, so a(70) = 2.
The prime indices of 98 are {1,4,4}, so a(98) = 1.
The prime indices of 294 are {1,2,4,4}, a(294) = 2.
The prime indices of 1911 are {2,4,4,6}, so a(1911) = 1.
The prime indices of 2548 are {1,1,4,4,6}, so a(2548) = 2.
		

Crossrefs

Positions of first appearances are A000079.
These "old" primes are listed by A008578.
Positions of zero are A320629, counted by A023895 (strict A204389).
Positions of one are A379312, counted by A379314 (strict A379315).
Positions of nonzero terms are A379313.
A000040 lists the prime numbers, differences A001223.
A002808 lists the composite numbers, nonprimes A018252, differences A073783 or A065310.
A055396 gives least prime index, greatest A061395.
A056239 adds up prime indices, row sums of A112798, counted by A001222.
A080339 is the characteristic function for the old prime numbers.
A376682 gives k-th differences of old prime numbers, see A030016, A075526, A173390, A376683, A376855.
Other counts of prime indices:
- A330944 nonprime, see A002095, A096258, A320628, A330945.
- A379306 squarefree, see A302478, A379308, A379309, A379316.
- A379310 nonsquarefree, see A114374, A256012, A379307.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Select[prix[n],#==1||PrimeQ[#]&]],{n,100}]

Formula

Totally additive with a(prime(k)) = A080339(k).

A379314 Number of integer partitions of n with a unique 1 or prime part.

Original entry on oeis.org

0, 1, 1, 1, 0, 2, 1, 3, 1, 4, 3, 8, 3, 10, 6, 14, 8, 22, 12, 30, 18, 40, 26, 58, 33, 76, 53, 103, 69, 140, 94, 185, 132, 239, 176, 323, 232, 417, 320, 536, 414, 704, 544, 900, 721, 1145, 936, 1481, 1198, 1867, 1571, 2363, 2001, 3003, 2550, 3768, 3275, 4712
Offset: 0

Views

Author

Gus Wiseman, Dec 28 2024

Keywords

Examples

			The a(10) = 3 through a(15) = 14 partitions:
  (8,2)    (11)     (9,3)    (13)       (9,5)      (8,7)
  (9,1)    (6,5)    (10,2)   (7,6)      (12,2)     (10,5)
  (4,4,2)  (7,4)    (6,4,2)  (8,5)      (6,6,2)    (11,4)
           (8,3)             (10,3)     (8,4,2)    (12,3)
           (9,2)             (12,1)     (9,4,1)    (14,1)
           (10,1)            (5,4,4)    (4,4,4,2)  (6,5,4)
           (4,4,3)           (6,4,3)               (6,6,3)
           (6,4,1)           (6,6,1)               (7,4,4)
                             (8,4,1)               (8,4,3)
                             (4,4,4,1)             (8,6,1)
                                                   (9,4,2)
                                                   (10,4,1)
                                                   (4,4,4,3)
                                                   (6,4,4,1)
		

Crossrefs

For all prime parts we have A000607 (strict A000586), ranks A076610.
For no prime parts we have A002095 (strict A096258), ranks A320628.
Ranked by A379312 = positions of 1 in A379311.
For a unique composite part we have A379302 (strict A379303), ranks A379301.
The strict case is A379315.
For squarefree instead of old prime we have A379308 (strict A379309), ranks A379316.
Considering 1 nonprime gives A379304 (strict A379305), ranks A331915.
A000040 lists the prime numbers, differences A001223.
A000041 counts integer partitions, strict A000009.
A002808 lists the composite numbers, nonprimes A018252, differences A073783 or A065310.
A376682 gives k-th differences of old primes.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Count[#,_?(#==1||PrimeQ[#]&)]==1&]],{n,0,30}]
  • PARI
    seq(n)={Vec(sum(k=1, n, if(isprime(k) || k==1, x^k))/prod(k=4, n, 1 - if(!isprime(k), x^k), 1 + O(x^n)), -n-1)} \\ Andrew Howroyd, Dec 28 2024

A375926 Numbers k such that A018252(k+1) = A018252(k) + 1. In other words, the k-th nonprime number is 1 less than the next.

Original entry on oeis.org

4, 5, 8, 9, 12, 13, 15, 16, 17, 18, 21, 22, 23, 24, 26, 27, 30, 31, 33, 34, 35, 36, 38, 39, 40, 41, 44, 45, 46, 47, 49, 50, 53, 54, 55, 56, 58, 59, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 73, 74, 77, 78, 81, 82, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95
Offset: 1

Views

Author

Gus Wiseman, Sep 11 2024

Keywords

Examples

			The nonprime numbers are 1, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, ... which increase by 1 after term 4, term 5, term 8, etc.
		

Crossrefs

The complement appears to be A014689, except the first term.
Positions of 1's in A065310 (see also A054546, A073783).
First differences are A373403 (except first).
The version for non-prime-powers is A375713, differences A373672.
The version for prime-powers is A375734, differences A373671.
The version for non-perfect-powers is A375740.
The version for composite numbers is A375929.
A000040 lists the prime numbers, differences A001223.
A018252 lists the nonprimes, exclusive A002808.
A046933 counts composite numbers between primes.

Programs

  • Mathematica
    Join@@Position[Differences[Select[Range[100],!PrimeQ[#]&]],1]
  • Python
    from sympy import primepi
    def A375926(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 n+bisection(lambda y:primepi(x+1+y))-1
        return bisection(f,n,n) # Chai Wah Wu, Sep 15 2024

A179278 Largest nonprime integer <= n.

Original entry on oeis.org

1, 1, 1, 4, 4, 6, 6, 8, 9, 10, 10, 12, 12, 14, 15, 16, 16, 18, 18, 20, 21, 22, 22, 24, 25, 26, 27, 28, 28, 30, 30, 32, 33, 34, 35, 36, 36, 38, 39, 40, 40, 42, 42, 44, 45, 46, 46, 48, 49, 50, 51, 52, 52, 54, 55, 56, 57, 58, 58, 60, 60, 62, 63, 64, 65, 66, 66, 68, 69, 70, 70, 72
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 08 2010

Keywords

Examples

			From _Gus Wiseman_, Dec 04 2024: (Start)
The nonprime integers <= n:
  1  1  1  4  4  6  6  8  9  10  10  12  12  14  15  16
           1  1  4  4  6  8  9   9   10  10  12  14  15
                 1  1  4  6  8   8   9   9   10  12  14
                       1  4  6   6   8   8   9   10  12
                          1  4   4   6   6   8   9   10
                             1   1   4   4   6   8   9
                                     1   1   4   6   8
                                             1   4   6
                                                 1   4
                                                     1
(End)
		

Crossrefs

For prime we have A007917.
For nonprime we have A179278 (this).
For squarefree we have A070321.
For nonsquarefree we have A378033.
For prime power we have A031218.
For non prime power we have A378367.
For perfect power we have A081676.
For non perfect power we have A378363.
A000040 lists the primes, differences A001223.
A002808 lists the composite numbers, differences A073783.
A018252 lists the nonprimes, differences A065310.
A095195 has row n equal to the k-th differences of the prime numbers.
A113646 gives least nonprime >= n.
A151800 gives the least prime > n, weak version A007918.
A377033 has row n equal to the k-th differences of the composite numbers.

Programs

  • Mathematica
    Array[# - Boole[PrimeQ@ #] - Boole[# == 3] &, 72] (* Michael De Vlieger, Oct 13 2018 *)
    Table[Max@@Select[Range[n],!PrimeQ[#]&],{n,30}] (* Gus Wiseman, Dec 04 2024 *)
  • PARI
    a(n) = if (isprime(n), if (n==3, 1, n-1), n); \\ Michel Marcus, Oct 13 2018

Formula

For n > 3: a(n) = A113523(n) = A014684(n);
For n > 0: a(n) = A113638(n). - Georg Fischer, Oct 12 2018
A005171(a(n)) = 1; A010051(a(n)) = 0.
a(n) = A018252(A062298(n)). - Ridouane Oudra, Aug 22 2025

Extensions

Inequality in the name reversed by Gus Wiseman, Dec 05 2024

A377036 First term of the n-th differences of the composite numbers. Inverse zero-based binomial transform of A002808.

Original entry on oeis.org

4, 2, 0, -1, 2, -2, 0, 4, -8, 8, 0, -16, 32, -32, -1, 78, -233, 687, -2363, 8160, -25670, 72352, -184451, 430937, -933087, 1888690, -3597221, 6479696, -11086920, 18096128, -28307626, 42644791, -62031001, 86466285, -110902034, 110907489, -52325, -483682930
Offset: 0

Views

Author

Gus Wiseman, Oct 18 2024

Keywords

Crossrefs

The version for prime instead of composite is A007442.
For noncomposite numbers we have A030016.
This is the first column (n=1) of A377033.
For row-sums we have A377034, absolute version A377035.
First zero positions are A377037, cf. A376678, A376855, A377042, A377050, A377055.
For squarefree instead of composite we have A377041, nonsquarefree A377049.
For prime-power instead of composite we have A377054.
Other arrays of differences: A095195 (prime), A376682 (noncomposite), A377033 (composite), A377038 (squarefree), A377046 (nonsquarefree), A377051 (prime-power).
A000040 lists the primes, differences A001223, seconds A036263.
A002808 lists the composite numbers, differences A073783, seconds A073445.
A008578 lists the noncomposites, differences A075526.
Cf: A018252, A065310, A065890, A140119, A173390, A333214, A376602 (zero), A376603 (nonzero), A376651 (positive), A376652 (negative), A376680.

Programs

  • Mathematica
    q=Select[Range[100],CompositeQ];
    t=Table[Sum[(-1)^(j-k)*Binomial[j,k]*q[[1+k]],{k,0,j}],{j,0,Length[q]-1}]

Formula

The inverse zero-based binomial transform of a sequence (q(0), q(1), ..., q(m)) is the sequence p given by:
p(j) = sum_{k=0..j} (-1)^(j-k) binomial(j,k) q(k)

A376268 Sorted positions of first appearances in the first differences (A053289) of perfect-powers (A001597).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 16, 17, 18, 19, 21, 23, 24, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 58, 60, 61, 62, 63, 64, 65, 66, 67, 69, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 81
Offset: 1

Views

Author

Gus Wiseman, Sep 28 2024

Keywords

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 positions of first appearances (A376268):
  1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 16, 17, 18, 19, 21, 23, 24, 27, 28, 29, ...
		

Crossrefs

These are the sorted positions of first appearances in A053289 (union A023055).
The complement is A376519.
A053707 lists first differences of consecutive prime-powers.
A333254 lists run-lengths of differences between consecutive primes.
Other families of numbers and their first differences:
For prime numbers (A000040) we have A001223.
For composite numbers (A002808) we have A073783.
For nonprime numbers (A018252) we have A065310.
For perfect powers (A001597) we have A053289.
For non-perfect-powers (A007916) we have A375706.
For squarefree numbers (A005117) we have A076259.
For nonsquarefree numbers (A013929) we have A078147.
For prime-powers inclusive (A000961) we have A057820.
For prime-powers exclusive (A246655) we have A057820(>1).
For non-prime-powers inclusive (A024619) we have A375735.
For non-prime-powers exclusive (A361102) we have A375708.

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    q=Differences[Select[Range[1000],perpowQ]];
    Select[Range[Length[q]],!MemberQ[Take[q,#-1],q[[#]]]&]
Previous Showing 11-20 of 26 results. Next