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

A064113 Indices k such that (1/3)*(prime(k)+prime(k+1)+prime(k+2)) is a prime.

Original entry on oeis.org

2, 15, 36, 39, 46, 54, 55, 73, 102, 107, 110, 118, 129, 160, 164, 184, 187, 194, 199, 218, 239, 271, 272, 291, 339, 358, 387, 419, 426, 464, 465, 508, 520, 553, 599, 605, 621, 629, 633, 667, 682, 683, 702, 709, 710, 733, 761, 791, 813, 821, 822, 829, 830
Offset: 1

Views

Author

Jason Earls, Sep 08 2001

Keywords

Comments

n such that d(n) = d(n+1), where d(n) = prime(n+1) - prime(n) = A001223(n).
Of interest because when I generalize it to d(n) = d(n+2), d(n) = d(n+3), etc. I am unable to find any positive number k such that d(n) = d(n+k) has no solution.
From Lei Zhou, Dec 06 2005: (Start)
When (1/3)*(prime(k) + prime(k+1) + prime(k+2)) is prime, then it is equal to prime(k+1).
Also, indices k such that (prime(k)+prime(k+2))/2 = prime(k+1).
The Mathematica program is based on the alternative definition. (End)
Inflection and undulation points of the primes, i.e., positions of zeros in A036263, the second differences of the primes. - Gus Wiseman, Mar 24 2020

Examples

			a(2) = 15 because (p(15)+p(16)+p(17)) = 1/3(47 + 53 + 59) = 53 (prime average of three successive primes).
Splitting the prime gaps into anti-runs gives: (1,2), (2,4,2,4,2,4,6,2,6,4,2,4,6), (6,2,6,4,2,6,4,6,8,4,2,4,2,4,14,4,6,2,10,2,6), (6,4,6), ... Then a(n) is the n-th partial sum of the lengths of these anti-runs. - _Gus Wiseman_, Mar 24 2020
		

Crossrefs

Indices of zeros in A036263 (second differences of primes).
Indices (A000720 = primepi) of balanced primes A006562, minus 1.
Cf. A262138.
Complement of A333214.
First differences are A333216.
The version for strict ascents is A258025.
The version for strict descents is A258026.
The version for weak ascents is A333230.
The version for weak descents is A333231.
A triangle for anti-runs of compositions is A106356.
Lengths of maximal runs of prime gaps are A333254.
Anti-runs of compositions in standard order are A333381.

Programs

  • Haskell
    import Data.List (elemIndices)
    a064113 n = a064113_list !! (n-1)
    a064113_list = map (+ 1) $ elemIndices 0 a036263_list
    -- Reinhard Zumkeller, Jan 20 2012
    
  • Mathematica
    ct = 0; Do[If[(Prime[k] + Prime[k + 2] - 2*Prime[k + 1]) == 0, ct++; n[ct] = k], {k, 1, 2000}]; Table[n[k], {k, 1, ct}] (* Lei Zhou, Dec 06 2005 *)
    Join@@Position[Differences[Array[Prime,100],2],0] (* Gus Wiseman, Mar 24 2020 *)
  • PARI
    d(n) = prime(n+1)-prime(n); j=[]; for(n=1,1500, if(d(n)==d(n+1), j=concat(j,n))); j
    
  • PARI
    { n=0; for (m=1, 10^9, if (d(m)==d(m+1), write("b064113.txt", n++, " ", m); if (n==1000, break)) ) } \\ Using d(n) above. - Harry J. Smith, Sep 07 2009
    
  • PARI
    [n | n<-[1..888], !A036263(n)] \\ M. F. Hasler, Oct 15 2024
    
  • PARI
    \\ More efficient for larges range of n:
    A064113_upto(N, n=1, L=List(), q=prime(n+1), d=q-prime(n))={forprime(p=1+q,, if(d==d=p-q, listput(L,n); #LM. F. Hasler, Oct 15 2024
    
  • Python
    from itertools import count, islice
    from sympy import prime, nextprime
    def A064113_gen(startvalue=1): # generator of terms >= startvalue
        c = max(startvalue,1)
        p = prime(c)
        q = nextprime(p)
        r = nextprime(q)
        for k in count(c):
            if p+r==(q<<1):
                yield k
            p, q, r = q, r, nextprime(r)
    A064113_list = list(islice(A064113_gen(),20)) # Chai Wah Wu, Feb 27 2024

Formula

A036263(a(n)) = 0; A122535(n) = A000040(a(n)); A006562(n) = A000040(a(n) + 1); A181424(n) = A000040(a(n) + 2). - Reinhard Zumkeller, Jan 20 2012
A262138(2*a(n)) = 0. - Reinhard Zumkeller, Sep 12 2015
a(n) = A000720(A006562(n)) - 1, where A000720 = (prime)pi, A006562 = balanced primes. - M. F. Hasler, Oct 15 2024

A333214 Positions of adjacent unequal terms in the sequence of differences between primes.

Original entry on oeis.org

1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 40, 41, 42, 43, 44, 45, 47, 48, 49, 50, 51, 52, 53, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 74, 75
Offset: 1

Views

Author

Gus Wiseman, Mar 15 2020

Keywords

Examples

			The sequence of differences between primes splits into the following runs: (1), (2,2), (4), (2), (4), (2), (4), (6), (2), (6), (4), (2), (4), (6,6), (2), (6), (4), (2), (6), (4), (6).
		

Crossrefs

The version for the Kolakoski sequence is A054353.
Complement of A064113 (the version for adjacent equal terms).
Runs of compositions in standard order are counted by A124767.
A triangle for runs of compositions is A238279.
The version for strict ascents is A258025.
The version for strict descents is A258026.
The version for weak ascents is A333230.
The version for weak descents is A333231.
First differences are A333254 (if the first term is 0).

Programs

  • Mathematica
    Accumulate[Length/@Split[Differences[Array[Prime,100]],#1==#2&]]//Most
    - or -
    Select[Range[100],Prime[#+1]-Prime[#]!=Prime[#+2]-Prime[#+1]&]

Formula

Numbers k such that prime(k+1) - prime(k) != prime(k+2) - prime(k+1).

A054819 First term of weak prime quartet: p(m+1)-p(m) < p(m+2)-p(m+1) < p(m+3)-p(m+2).

Original entry on oeis.org

17, 41, 79, 107, 227, 281, 311, 347, 349, 379, 397, 439, 461, 499, 569, 641, 673, 677, 827, 857, 881, 907, 1031, 1061, 1091, 1187, 1229, 1277, 1301, 1319, 1367, 1427, 1429, 1451, 1487, 1489, 1549, 1607, 1619, 1621, 1697, 1877, 1997, 2027, 2087, 2153
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Examples

			From _Gus Wiseman_, May 31 2020: (Start)
The first 10 strictly increasing prime gap quartets:
   17   19   23   29
   41   43   47   53
   79   83   89   97
  107  109  113  127
  227  229  233  239
  281  283  293  307
  311  313  317  331
  347  349  353  359
  349  353  359  367
  379  383  389  397
(End)
		

Crossrefs

Prime gaps are A001223.
Second prime gaps are A036263.
Strictly decreasing prime gap quartets are A335278.
Strictly increasing prime gap quartets are A335277.
Equal prime gap quartets are A090832.
Weakly increasing prime gap quartets are A333383.
Weakly decreasing prime gap quartets are A333488.
Unequal prime gap quartets are A333490.
Partially unequal prime gap quartets are A333491.
Positions of adjacent equal prime gaps are A064113.
Positions of strict ascents in prime gaps are A258025.
Positions of strict descents in prime gaps are A258026.
Positions of adjacent unequal prime gaps are A333214.
Positions of weak ascents in prime gaps are A333230.
Positions of weak descents in prime gaps are A333231.
Lengths of maximal weakly decreasing sequences of prime gaps are A333212.
Lengths of maximal strictly increasing sequences of prime gaps are A333253.

Programs

  • Mathematica
    wpqQ[lst_]:=Module[{diffs=Differences[lst]},diffs[[1]]Harvey P. Dale, Jun 12 2012 *)
    ReplaceList[Array[Prime,100],{_,x_,y_,z_,t_,_}/;y-xx] (* Gus Wiseman, May 31 2020 *)

Formula

a(n) = prime(A335277(n)). - Gus Wiseman, May 31 2020

A258026 Numbers k such that prime(k+2) - 2*prime(k+1) + prime(k) < 0.

Original entry on oeis.org

4, 6, 9, 11, 12, 16, 18, 19, 21, 24, 25, 27, 30, 32, 34, 37, 40, 42, 44, 47, 48, 51, 53, 56, 58, 59, 62, 63, 66, 68, 72, 74, 77, 80, 82, 84, 87, 88, 91, 92, 94, 97, 99, 101, 103, 106, 108, 111, 112, 114, 115, 119, 121, 125, 127, 128, 130, 132, 133, 135, 137
Offset: 1

Views

Author

Clark Kimberling, Jun 05 2015

Keywords

Comments

Positions of strict descents in the sequence of differences between primes. Partial sums of A333215. - Gus Wiseman, Mar 24 2020

Examples

			The prime gaps split into the following maximal weakly increasing subsequences: (1,2,2,4), (2,4), (2,4,6), (2,6), (4), (2,4,6,6), (2,6), (4), (2,6), (4,6,8), (4), (2,4), (2,4,14), ... Then a(n) is the n-th partial sum of the lengths of these subsequences. - _Gus Wiseman_, Mar 24 2020
		

Crossrefs

Partition of the positive integers: A064113, A258025, A258026;
Corresponding partition of the primes: A063535, A063535, A147812.
Adjacent terms differing by 1 correspond to strong prime quartets A054804.
The version for the Kolakoski sequence is A156242.
First differences are A333215 (if the first term is 0).
The version for strict ascents is A258025.
The version for weak ascents is A333230.
The version for weak descents is A333231.
Prime gaps are A001223.
Positions of adjacent equal prime gaps are A064113.
Weakly increasing runs of compositions in standard order are A124766.
Strictly decreasing runs of compositions in standard order are A124769.

Programs

  • Mathematica
    u = Table[Sign[Prime[n+2] - 2 Prime[n+1] + Prime[n]], {n, 1, 200}];
    Flatten[Position[u, 0]]   (* A064113 *)
    Flatten[Position[u, 1]]   (* A258025 *)
    Flatten[Position[u, -1]]  (* A258026 *)
    Accumulate[Length/@Split[Differences[Array[Prime,100]],LessEqual]]//Most (* Gus Wiseman, Mar 24 2020 *)
  • Python
    from itertools import count, islice
    from sympy import prime, nextprime
    def A258026_gen(startvalue=1): # generator of terms >= startvalue
        c = max(startvalue,1)
        p = prime(c)
        q = nextprime(p)
        r = nextprime(q)
        for k in count(c):
            if p+r<(q<<1):
                yield k
            p, q, r = q, r, nextprime(r)
    A258026_list = list(islice(A258026_gen(),20)) # Chai Wah Wu, Feb 27 2024

A054804 First term of strong prime quartets: prime(m+1)-prime(m) > prime(m+2)-prime(m+1) > prime(m+3)-prime(m+2).

Original entry on oeis.org

31, 61, 89, 211, 271, 293, 449, 467, 607, 619, 709, 743, 839, 863, 919, 1069, 1291, 1409, 1439, 1459, 1531, 1637, 1657, 1669, 1723, 1759, 1777, 1831, 1847, 1861, 1979, 1987, 2039, 2131, 2311, 2357, 2371, 2447, 2459, 2477, 2503, 2521, 2557, 2593, 2633
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Comments

Primes preceding the first member of pairs of consecutive primes in A051634 ("strong primes"), see example. (A051634 lists the middle member of the triplets, here we list the first member of the quadruplets.) - M. F. Hasler, Oct 27 2018, corrected thanks to Gus Wiseman, Jun 01 2020.

Examples

			The first 10 strictly decreasing prime gap quartets:
   31  37  41  43
   61  67  71  73
   89  97 101 103
  211 223 227 229
  271 277 281 283
  293 307 311 313
  449 457 461 463
  467 479 487 491
  607 613 617 619
  619 631 641 643
For example, the primes (211,223,227,229) have differences (12,4,2), which are strictly decreasing, so 211 is in the sequence.
The second and third term of each quadruplet are consecutive terms in A051634: this is a characteristic property of this sequence. - _M. F. Hasler_, Jun 01 2020
		

Crossrefs

Prime gaps are A001223.
Second prime gaps are A036263.
All of the following use prime indices rather than the primes themselves:
- Strictly decreasing prime gap quartets are A335278.
- Strictly increasing prime gap quartets are A335277.
- Equal prime gap quartets are A090832.
- Weakly increasing prime gap quartets are A333383.
- Weakly decreasing prime gap quartets are A333488.
- Unequal prime gap quartets are A333490.
- Partially unequal prime gap quartets are A333491.
- Adjacent equal prime gaps are A064113.
- Strict ascents in prime gaps are A258025.
- Strict descents in prime gaps are A258026.
- Adjacent unequal prime gaps are A333214.
- Weak ascents in prime gaps are A333230.
- Weak descents in prime gaps are A333231.
Maximal weakly increasing intervals of prime gaps are A333215.
Maximal strictly decreasing intervals of prime gaps are A333252.

Programs

  • Maple
    primes:= select(isprime,[seq(i,i=3..10000,2)]):
    L:=  primes[2..-1]-primes[1..-2]:
    primes[select(t -> L[t+2] < L[t+1] and L[t+1] < L[t], [$1..nops(L)-2])]; # Robert Israel, Jun 28 2018
  • Mathematica
    ReplaceList[Array[Prime,100],{_,x_,y_,z_,t_,_}/;y-x>z-y>t-z:>x] (* Gus Wiseman, May 31 2020 *)
    Select[Partition[Prime[Range[400]],4,1],Max[Differences[#,2]]<0&][[All,1]] (* Harvey P. Dale, Jan 12 2023 *)

Formula

a(n) = prime(A335278(n)). - Gus Wiseman, May 31 2020

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

Original entry on oeis.org

1, 2, 1, 3, 1, 0, 5, 2, 1, 1, 7, 2, 0, -1, -2, 11, 4, 2, 2, 3, 5, 13, 2, -2, -4, -6, -9, -14, 17, 4, 2, 4, 8, 14, 23, 37, 19, 2, -2, -4, -8, -16, -30, -53, -90, 23, 4, 2, 4, 8, 16, 32, 62, 115, 205, 29, 6, 2, 0, -4, -12, -28, -60, -122, -237, -442, 31, 2, -4, -6, -6, -2, 10, 38, 98, 220, 457, 899
Offset: 0

Views

Author

Gus Wiseman, Oct 15 2024

Keywords

Comments

Row k is the k-th differences of the noncomposite numbers.

Examples

			Array begins:
         n=1:  n=2:  n=3:  n=4:  n=5:  n=6:  n=7:  n=8:  n=9:
  -----------------------------------------------------------
  k=0:    1     2     3     5     7    11    13    17    19
  k=1:    1     1     2     2     4     2     4     2     4
  k=2:    0     1     0     2    -2     2    -2     2     2
  k=3:    1    -1     2    -4     4    -4     4     0    -6
  k=4:   -2     3    -6     8    -8     8    -4    -6    14
  k=5:    5    -9    14   -16    16   -12    -2    20   -28
  k=6:  -14    23   -30    32   -28    10    22   -48    48
  k=7:   37   -53    62   -60    38    12   -70    96   -70
  k=8:  -90   115  -122    98   -26   -82   166  -166    86
  k=9:  205  -237   220  -124   -56   248  -332   252   -86
Triangle begins:
    1
    2    1
    3    1    0
    5    2    1    1
    7    2    0   -1   -2
   11    4    2    2    3    5
   13    2   -2   -4   -6   -9  -14
   17    4    2    4    8   14   23   37
   19    2   -2   -4   -8  -16  -30  -53  -90
   23    4    2    4    8   16   32   62  115  205
   29    6    2    0   -4  -12  -28  -60 -122 -237 -442
   31    2   -4   -6   -6   -2   10   38   98  220  457  899
		

Crossrefs

The version for modern primes (A000040) is A095195.
Initial rows: A008578, A075526, A036263 with 0 prepended.
Column n = 1 is A030016 (modern A007442).
A version for partitions is A175804, cf. A053445, A281425, A320590.
Antidiagonal-sums are A376683 (modern A140119), absolute A376684 (modern A376681).
First position of 0 is A376855 (modern A376678).
For composite instead of prime we have A377033.
For squarefree instead of prime we have A377038, nonsquarefree A377046.
For prime-power instead of composite we have A377051.
A000040 lists the primes, differences A001223, second A036263.

Programs

  • Mathematica
    nn=12;
    t=Table[Take[Differences[NestList[NestWhile[#+1&, #+1,!PrimeQ[#]&]&,1,2*nn],k],nn],{k,0,nn}]
    (* or *)
    nn=12;
    q=Table[If[n==0,1,Prime[n]],{n,0,2nn}];
    Table[Sum[(-1)^(j-k)*Binomial[j,k]*q[[i+k]],{k,0,j}],{j,0,nn},{i,nn}]

Formula

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

A333230 Positions of weak ascents in the sequence of differences between primes.

Original entry on oeis.org

1, 2, 3, 5, 7, 8, 10, 13, 14, 15, 17, 20, 22, 23, 26, 28, 29, 31, 33, 35, 36, 38, 39, 41, 43, 45, 46, 49, 50, 52, 54, 55, 57, 60, 61, 64, 65, 67, 69, 70, 71, 73, 75, 76, 78, 79, 81, 83, 85, 86, 89, 90, 93, 95, 96, 98, 100, 102, 104, 105, 107, 109, 110, 113
Offset: 1

Views

Author

Gus Wiseman, Mar 18 2020

Keywords

Comments

Partial sums of A333252.

Examples

			The prime gaps split into the following strictly decreasing subsequences: (1), (2), (2), (4,2), (4,2), (4), (6,2), (6,4,2), (4), (6), (6,2), (6,4,2), (6,4), (6), (8,4,2), ...
		

Crossrefs

The version for the Kolakoski sequence is A022297.
The version for equal differences is A064113.
The version for strict ascents is A258025.
The version for strict descents is A258026.
The version for distinct differences is A333214.
The version for weak descents is A333231.
First differences are A333252 (if the first term is 0).
Prime gaps are A001223.
Weakly decreasing runs of standard compositions are counted by A124765.
Weakly increasing runs of standard compositions are counted by A124766.
Strictly increasing runs of standard compositions are counted by A124768.
Strictly decreasing runs of standard compositions are counted by A124769.
Runs of prime gaps with nonzero differences are A333216.

Programs

  • Mathematica
    Accumulate[Length/@Split[Differences[Array[Prime,100]],#1>#2&]]//Most
    - or -
    Select[Range[100],Prime[#+1]-Prime[#]<=Prime[#+2]-Prime[#+1]&]

Formula

Numbers k such that prime(k+2) - 2*prime(k+1) + prime(k) >= 0.

A376602 Inflection and undulation points in the sequence of composite numbers (A002808).

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 14, 15, 16, 18, 20, 21, 22, 25, 27, 29, 32, 33, 34, 37, 38, 39, 41, 43, 44, 45, 48, 50, 52, 53, 54, 57, 60, 61, 62, 65, 66, 67, 68, 69, 72, 74, 76, 78, 80, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 96, 99, 100, 101, 103, 105, 106, 107, 108
Offset: 1

Views

Author

Gus Wiseman, Oct 05 2024

Keywords

Comments

These are points at which the second differences (A073445) are zero.

Examples

			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, 2, ...
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, 0, ...
with zeros at (A376602):
  1, 3, 5, 7, 9, 11, 14, 15, 16, 18, 20, 21, 22, 25, 27, 29, 32, 33, 34, 37, 38, ...
		

Crossrefs

Partitions into composite numbers are counted by A023895, factorizations A050370.
For prime instead of composite we have A064113.
These are the positions of zeros in A073445.
For first differences we had A073783, ones A375929, complement A065890.
For concavity in primes we have A258025/A258026, weak A333230/A333231.
For upward concavity (instead of zero) we have A376651, downward A376652.
The complement is A376603.
For composite numbers: A002808 (terms), A073783 (first differences), A073445 (second differences), A376603 (nonzero curvature), A376651 (concave-up), A376652 (concave-down).
For inflection and undulation points: A064113 (prime), A376588 (non-perfect-power), A376591 (squarefree), A376594 (nonsquarefree), A376597 (prime-power), A376600 (non-prime-power).

Programs

  • Mathematica
    Join@@Position[Differences[Select[Range[100],CompositeQ],2],0]

A333215 Lengths of maximal weakly increasing subsequences in the sequence of prime gaps (A001223).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Mar 14 2020

Keywords

Comments

Prime gaps are differences between adjacent prime numbers.

Examples

			The prime gaps split into the following weakly increasing subsequences: (1,2,2,4), (2,4), (2,4,6), (2,6), (4), (2,4,6,6), (2,6), (4), (2,6), (4,6,8), (4), (2,4), (2,4,14), ...
		

Crossrefs

Prime gaps are A001223.
Ones correspond to strong prime quartets A054804.
Weakly increasing runs of compositions in standard order are A124766.
First differences of A258026 (with zero prepended).
The version for the Kolakoski sequence is A332875.
The weakly decreasing version is A333212.
The unequal version is A333216.
Positions of weak ascents in prime gaps are A333230.
The strictly decreasing version is A333252.
The strictly increasing version is A333253.
The equal version is A333254.

Programs

  • Mathematica
    Length/@Split[Differences[Array[Prime,100]],#1<=#2&]//Most

Formula

Ones correspond to strong prime quartets (A054804), so the sum of terms up to but not including the n-th one is A000720(A054804(n - 1)).

A377037 Position of first zero in the n-th differences of the composite numbers (A002808), or 0 if it does not appear.

Original entry on oeis.org

1, 14, 2, 65, 1, 83, 2, 7, 1, 83, 2, 424, 12, 32, 11, 733, 10, 940, 9, 1110, 8, 1110, 7, 1110, 6, 1110, 112, 1110, 111, 1110, 110, 2192, 109, 13852, 108, 13852, 107, 13852, 106, 13852, 105, 17384, 104, 17384, 103, 17384, 102, 17384, 101, 27144, 552, 28012, 551
Offset: 2

Views

Author

Gus Wiseman, Oct 17 2024

Keywords

Examples

			The third differences of the composite numbers are:
  -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -2, 1, 0, 0, 1, -1, -1, ...
so a(3) = 14.
		

Crossrefs

The version for prime instead of composite is A376678.
For noncomposite numbers we have A376855.
This is the first position of 0 in row n of the array A377033.
For squarefree instead of composite we have A377042, nonsquarefree A377050.
For prime-power instead of composite we have A377055.
Other arrays of differences: A095195 (prime), A376682 (noncomposite), A377033 (composite), A377038 (squarefree), A377046 (nonsquarefree), A377051 (prime-power).
A000040 lists the primes, differences A001223, second A036263.
A002808 lists the composite numbers, differences A073783, second A073445.
A008578 lists the noncomposites, differences A075526.
A377036 gives first term of the n-th differences of the composite numbers, for primes A007442 or A030016.

Programs

  • Mathematica
    nn=10000;
    u=Table[Differences[Select[Range[nn],CompositeQ],k],{k,2,16}];
    mnrm[s_]:=If[Min@@s==1,mnrm[DeleteCases[s-1,0]]+1,0];
    m=Table[Position[u[[k]],0][[1,1]],{k,mnrm[Union[First/@Position[u,0]]]}]

Extensions

Offset 2 from Michel Marcus, Oct 18 2024
a(17)-a(54) from Alois P. Heinz, Oct 18 2024
Showing 1-10 of 30 results. Next