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

A179985 Numbers N such that {A028334(2), ..., A028334(K)} = {1,...,N} for some K >= 2, where A028334(k) = (prime(k+1) - prime(k))/2.

Original entry on oeis.org

1, 2, 3, 4, 7, 17, 18, 77
Offset: 1

Views

Author

M. F. Hasler, Jan 16 2011

Keywords

Comments

No further terms found using primes up to 10^12. - Douglas McNeil, Jan 14 2011
According to Thomas R. Nicely (see Links) the next term, if it exists, must correspond to a gap occurring between primes greater than 4*10^18. - Giovanni Resta, Jan 06 2013

Examples

			For k >= 2, consider A028334(k) = (1/2) * (prime(k+1) - prime(k)), half the k-th gap between primes. (We ignore g(1), which would equal 1/2.)
Then, using k=2,...,24 (and up to k=29), all the values 1,2,3 and 4 occur. Therefore, a(4)=4 is in the sequence.
However, for k=30 a new gap of 14 = 2*7 occurs, thus creating the "holes" (missing values) g=5 and g=6. The list of gaps has holes until one reaches k=46: At that moment all values g=1,...,7, and no other values occur. (This remains true up to k=98.) Therefore, a(5)=7 is in the list.
For more examples, see link to posts by Veikko Pohjola.
		

Crossrefs

Programs

  • PARI
    my(p=2, L=1, l=1, g=1, o); while(p=nextprime(1+(o=p)), bittest(g,(p-o)\2) & next; my(a=(p-o)\2); g+=1<L & L=a; l==a || next; while(bittest(g,l++),); l>L & print1( L, ", "))

A001223 Prime gaps: differences between consecutive primes.

Original entry on oeis.org

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, 6, 2, 10, 2, 4, 2, 12, 12, 4, 2, 4, 6, 2, 10, 6, 6, 6, 2, 6, 4, 2, 10, 14, 4, 2, 4, 14, 6, 10, 2, 4, 6, 8, 6, 6, 4, 6, 8, 4, 8, 10, 2, 10, 2, 6, 4, 6, 8, 4, 2, 4, 12, 8, 4, 8, 4, 6, 12
Offset: 1

Views

Author

Keywords

Comments

There is a unique decomposition of the primes: provided the weight A117078(n) is > 0, we have prime(n) = weight * level + gap, or A000040(n) = A117078(n) * A117563(n) + a(n). - Rémi Eismann, Feb 14 2008
Let rho(m) = A179196(m), for any n, let m be an integer such that p_(rho(m)) <= p_n and p_(n+1) <= p_(rho(m+1)), then rho(m) <= n < n + 1 <= rho(m + 1), therefore a(n) = p_(n+1) - p_n <= p_rho(m+1) - p_rho(m) = A182873(m). For all rho(m) = A179196(m), a(rho(m)) < A165959(m). - John W. Nicholson, Dec 14 2011
A solution (modular square root) of x^2 == A001248(n) (mod A000040(n+1)). - L. Edson Jeffery, Oct 01 2014
There exists a constant C such that for n -> infinity, Cramer conjecture a(n) < C log^2 prime(n) is equivalent to (log prime(n+1)/log prime(n))^n < e^C. - Thomas Ordowski, Oct 11 2014
a(n) = A008347(n+1) - A008347(n-1). - Reinhard Zumkeller, Feb 09 2015
Yitang Zhang proved lim inf_{n -> infinity} a(n) is finite. - Robert Israel, Feb 12 2015
lim sup_{n -> infinity} a(n)/log^2 prime(n) = C <==> lim sup_{n -> infinity}(log prime(n+1)/log prime(n))^n = e^C. - Thomas Ordowski, Mar 09 2015
a(A038664(n)) = 2*n and a(m) != 2*n for m < A038664(n). - Reinhard Zumkeller, Aug 23 2015
If j and k are positive integers then there are no two consecutive primes gaps of the form 2+6j and 2+6k (A016933) or 4+6j and 4+6k (A016957). - Andres Cicuttin, Jul 14 2016
Conjecture: For any positive numbers x and y, there is an index k such that x/y = a(k)/a(k+1). - Andres Cicuttin, Sep 23 2018
Conjecture: For any three positive numbers x, y and j, there is an index k such that x/y = a(k)/a(k+j). - Andres Cicuttin, Sep 29 2018
Conjecture: For any three positive numbers x, y and j, there are infinitely many indices k such that x/y = a(k)/a(k+j). - Andres Cicuttin, Sep 29 2018
Row m of A174349 lists all indices n for which a(n) = 2m. - M. F. Hasler, Oct 26 2018
Since (6a, 6b) is an admissible pattern of gaps for any integers a, b > 0 (and also if other multiples of 6 are inserted in between), the above conjecture follows from the prime k-tuple conjecture which states that any admissible pattern occurs infinitely often (see, e.g., the Caldwell link). This also means that any subsequence a(n .. n+m) with n > 2 (as to exclude the untypical primes 2 and 3) should occur infinitely many times at other starting points n'. - M. F. Hasler, Oct 26 2018
Conjecture: Defining b(n,j,k) as the number of pairs of prime gaps {a(i),a(i+j)} such that i < n, j > 0, and a(i)/a(i+j) = k with k > 0, then
lim_{n -> oo} b(n,j,k)/b(n,j,1/k) = 1, for any j > 0 and k > 0, and
lim_{n -> oo} b(n,j,k1)/b(n,j,k2) = C with C = C(j,k1,k2) > 0. - Andres Cicuttin, Sep 01 2019

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See page 92.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 186-192.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000040 (primes), A001248 (primes squared), A000720, A037201, A007921, A030173, A036263-A036274, A167770, A008347.
Second difference is A036263, first occurrence is A000230.
For records see A005250, A005669.
Sequences related to the differences between successive primes: A001223 (Delta(p)), A028334, A080378, A104120, A330556-A330561.

Programs

  • Haskell
    a001223 n = a001223_list !! (n-1)
    a001223_list = zipWith (-) (tail a000040_list) a000040_list
    -- Reinhard Zumkeller, Oct 29 2011
    
  • Magma
    [(NthPrime(n+1) - NthPrime(n)): n in [1..100]]; // Vincenzo Librandi, Apr 02 2011
    
  • Maple
    with(numtheory): for n from 1 to 500 do printf(`%d,`,ithprime(n+1) - ithprime(n)) od:
  • Mathematica
    Differences[Prime[Range[100]]] (* Harvey P. Dale, May 15 2011 *)
  • PARI
    diff(v)=vector(#v-1,i,v[i+1]-v[i]);
    diff(primes(100)) \\ Charles R Greathouse IV, Feb 11 2011
    
  • PARI
    forprime(p=1, 1e3, print1(nextprime(p+1)-p, ", ")) \\ Felix Fröhlich, Sep 06 2014
    
  • Python
    from sympy import prime
    def A001223(n): return prime(n+1)-prime(n) # Chai Wah Wu, Jul 07 2022
  • Sage
    differences(prime_range(1000)) # Joerg Arndt, May 15 2011
    

Formula

G.f.: b(x)*(1-x), where b(x) is the g.f. for the primes. - Franklin T. Adams-Watters, Jun 15 2006
a(n) = prime(n+1) - prime(n). - Franklin T. Adams-Watters, Mar 31 2010
Conjectures: (i) a(n) = ceiling(prime(n)*log(prime(n+1)/prime(n))). (ii) a(n) = floor(prime(n+1)*log(prime(n+1)/prime(n))). (iii) a(n) = floor((prime(n)+prime(n+1))*log(prime(n+1)/prime(n))/2). - Thomas Ordowski, Mar 21 2013
A167770(n) == a(n)^2 (mod A000040(n+1)). - L. Edson Jeffery, Oct 01 2014
a(n) = Sum_{k=1..2^(n+1)-1} (floor(cos^2(Pi*(n+1)^(1/(n+1))/(1+primepi(k))^(1/(n+1))))). - Anthony Browne, May 11 2016
G.f.: (Sum_{k>=1} x^pi(k)) - 1, where pi(k) is the prime counting function. - Benedict W. J. Irwin, Jun 13 2016
Conjecture: Limit_{N->oo} (Sum_{n=2..N} log(a(n))) / (Sum_{n=2..N} log(log(prime(n)))) = 1. - Alain Rocchelli, Dec 16 2022
Conjecture: The asymptotic limit of the average of log(a(n)) ~ log(log(prime(n))) - gamma (where gamma is Euler's constant). Also, for n tending to infinity, the geometric mean of a(n) is equivalent to log(prime(n)) / e^gamma. - Alain Rocchelli, Jan 23 2023
It has been conjectured that primes are distributed around their average spacing in a Poisson distribution (cf. D. A. Goldston in above links). This is the basis of the last two conjectures above. - Alain Rocchelli, Feb 10 2023

Extensions

More terms from James Sellers, Feb 19 2001

A046933 Number of composites between successive primes.

Original entry on oeis.org

0, 1, 1, 3, 1, 3, 1, 3, 5, 1, 5, 3, 1, 3, 5, 5, 1, 5, 3, 1, 5, 3, 5, 7, 3, 1, 3, 1, 3, 13, 3, 5, 1, 9, 1, 5, 5, 3, 5, 5, 1, 9, 1, 3, 1, 11, 11, 3, 1, 3, 5, 1, 9, 5, 5, 5, 1, 5, 3, 1, 9, 13, 3, 1, 3, 13, 5, 9, 1, 3, 5, 7, 5, 5, 3, 5, 7, 3, 7, 9, 1, 9, 1, 5, 3, 5, 7, 3, 1, 3, 11, 7, 3, 7, 3, 5, 11, 1, 17
Offset: 1

Views

Author

Marc LeBrun, Dec 11 1999

Keywords

Comments

a(n) is odd for n>1 since all primes except 2 are odd. - Joel Brennan, Jan 02 2023

Examples

			a(1) = 0 since 2 is adjacent to 3;
a(2) = 1 since 4 is between 3 and 5;
a(4) = 3 = 11 - 7 - 1, etc.
		

Crossrefs

Cf. A008996 (record values > 0).

Programs

Formula

a(n) = prime(n+1) - prime(n) - 1 = A000040(n+1) - A000040(n) - 1.
a(n) = A001223(n) - 1.
a(n) = 2*A028334(n) - 1 for n>1. - Giovanni Teofilatto, Apr 19 2010
a(n) = Sum_{i=1..n-1} A036263(i). - Daniel Forgues, Apr 07 2014

A024675 Average of two consecutive odd primes.

Original entry on oeis.org

4, 6, 9, 12, 15, 18, 21, 26, 30, 34, 39, 42, 45, 50, 56, 60, 64, 69, 72, 76, 81, 86, 93, 99, 102, 105, 108, 111, 120, 129, 134, 138, 144, 150, 154, 160, 165, 170, 176, 180, 186, 192, 195, 198, 205, 217, 225, 228, 231, 236, 240, 246, 254, 260, 266, 270, 274, 279, 282, 288, 300
Offset: 1

Views

Author

Keywords

Comments

Sometimes called interprimes.
Where local maxima of A072681 occur: A072681(a(n))=A074927(n+1). - Reinhard Zumkeller, Mar 04 2009
Never prime, for that would contradict the definition. - Jon Perry, Dec 05 2012
A subset of A145025, obtained from that sequence by omitting the primes (which are barycenter of their neighboring primes). - M. F. Hasler, Jun 01 2013
Conjecture: Product_{k=1..n} a(k)/A028334(k+1) is an integer for every natural n. Cf. A352743. - Thomas Ordowski, Mar 31 2022
In contrast to the arithmetic mean, the geometric and the harmonic mean of two consecutive primes is never an integer. What is the first case where either of the two would differ from the arithmetic mean, i.e., this sequence? The existence of such a pair of primes is related to Legendre's conjecture, cf. link to discussion on the math-fun mailing list. - M. F. Hasler, Apr 07 2025

Crossrefs

Cf. A072568, A072569. Bisections give A058296, A079424.
Cf. A373699 (partial sums).

Programs

  • Maple
    seq( ( (ithprime(x)+ithprime(x+1))/2 ),x=2..40);
  • Mathematica
    Plus @@@ Partition[Table[Prime[n], {n, 2, 100}], 2, 1]/2
    ListConvolve[{1, 1}/2, Prime /@ Range[2, 70]] (* Jean-François Alcover, Jun 25 2013 *)
    Mean/@Partition[Prime[Range[2,70]],2,1] (* Harvey P. Dale, Jul 28 2020 *)
  • PARI
    for(X=2,50,print((prime(X)+prime(X+1))/2)) \\ Hauke Worpel (thebigh(AT)outgun.com), May 08 2008
    
  • PARI
    first(n)=my(v=primes(n+2)); vector(n,i,v[i+1]+v[i+2])/2 \\ Charles R Greathouse IV, Jun 25 2013
    
  • Python
    from sympy import prime
    def a(n): return (prime(n + 1) + prime(n + 2)) // 2
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jul 11 2017

Formula

a(n) = (prime(n+1)+prime(n+2))/2 = A001043(n+1)/2. - Omar E. Pol, Feb 02 2012
Conjecture: a(n) = ceiling(sqrt(prime(n+1)*prime(n+2))). - Thomas Ordowski, Mar 22 2013 [This requires gaps to be smaller than approximately sqrt(8p) and hence requires a result on prime gaps slightly stronger than that provided by the Riemann hypothesis. - Charles R Greathouse IV, Jul 13 2022]
Equals A145025 \ A006562 = A145025 \ A000040. - M. F. Hasler, Jun 01 2013

A356224 Number of divisors of n whose prime indices cover an initial interval of positive integers.

Original entry on oeis.org

1, 2, 1, 3, 1, 3, 1, 4, 1, 2, 1, 5, 1, 2, 1, 5, 1, 4, 1, 3, 1, 2, 1, 7, 1, 2, 1, 3, 1, 4, 1, 6, 1, 2, 1, 7, 1, 2, 1, 4, 1, 3, 1, 3, 1, 2, 1, 9, 1, 2, 1, 3, 1, 5, 1, 4, 1, 2, 1, 7, 1, 2, 1, 7, 1, 3, 1, 3, 1, 2, 1, 10, 1, 2, 1, 3, 1, 3, 1, 5, 1, 2, 1, 5, 1, 2, 1
Offset: 1

Views

Author

Gus Wiseman, Aug 04 2022

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 a(n) gapless divisors of n = 1..24:
  1  2  1  4  1  6  1  8  1  2  1  12  1  2  1  16  1  18  1  4  1  2  1  24
     1     2     2     4     1     6      1     8      6      2     1     12
           1     1     2           4            4      2      1           8
                       1           2            2      1                  6
                                   1            1                         4
                                                                          2
                                                                          1
For example, the divisors of 12 are {1,2,3,4,6,12}, of which {1,2,4,6,12} belong to A055932, so a(12) = 5.
		

Crossrefs

These divisors belong to A055932, a subset of A073491 (complement A073492).
The complement is A356225.
A001223 lists the prime gaps.
A328338 has third-largest divisor prime.
A356226 gives the lengths of maximal gapless intervals of prime indices.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    normQ[m_]:=m=={}||Union[m]==Range[Max[m]];
    Table[Length[Select[Divisors[n],normQ[primeMS[#]]&]],{n,100}]

A356226 Irregular triangle giving the lengths of maximal gapless submultisets of the prime indices of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Aug 10 2022

Keywords

Comments

A sequence is gapless if it covers an unbroken interval of positive integers. For example, the multiset {2,3,5,5,6,9} has three maximal gapless submultisets: {2,3}, {5,5,6}, {9}.
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

			Triangle  begins: {}, {1}, {1}, {2}, {1}, {2}, {1}, {3}, {2}, {1,1}, {1}, {3}, {1}, {1,1}, {2}, {4}, {1}, {3}, {1}, {2,1}, ... For example, the prime indices of 20 are {1,1,3}, which separates into maximal gapless submultisets {{1,1},{3}}, so row 20 is (2,1).
The prime indices of 18564 are {1,1,2,4,6,7}, which separates into {1,1,2}, {4}, {6,7}, so row 18564 is (3,1,2). This corresponds to the factorization 18564 = 12 * 7 * 221.
		

Crossrefs

Row sums are A001222.
Singleton row positions are A073491, complement A073492.
Length-2,3,4 row positions are A073493-A073495.
Row lengths are A287170, firsts A066205.
Row minima are A356227.
Row maxima are A356228.
Bisected run-lengths are A356229.
Standard composition numbers of rows are A356230.
Heinz numbers of rows are A356231.
Positions of first appearances are A356232.
A001221 counts distinct prime factors, with sum A001414.
A001223 lists the prime gaps, reduced A028334.
A003963 multiplies together the prime indices of n.
A056239 adds up prime indices, row sums of A112798.
A132747 counts non-isolated divisors, complement A132881.
A356069 counts gapless divisors, initial A356224 (complement A356225).

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length/@Split[primeMS[n],#1>=#2-1&],{n,100}]

A356225 Number of divisors of n whose prime indices do not cover an initial interval of positive integers.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Aug 13 2022

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 a(70) = 6 divisors: 5, 7, 10, 14, 35, 70.
		

Crossrefs

These divisors belong to the complement of A055932, a subset of A073491.
These divisors belong to A080259, a superset of A073492.
The complement is counted by A356224.
A001223 lists the prime gaps.
A328338 has third-largest divisor prime, smallest A119313.
A356226 gives the lengths of maximal gapless intervals of prime indices.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    normQ[m_]:=m=={}||Union[m]==Range[Max[m]];
    Table[Length[Select[Divisors[n],!normQ[primeMS[#]]&]],{n,100}]

Formula

a(n) = A000005(n) - A356224(n).

A133028 Even perfect numbers divided by 2.

Original entry on oeis.org

3, 14, 248, 4064, 16775168, 4294934528, 68719345664, 1152921504069976064, 1329227995784915872327346307976921088, 95780971304118053647396689042151819065498660774084608, 6582018229284824168619876730229361455111736159193471558891864064, 7237005577332262213973186563042994240786838745737417944533177174565599576064
Offset: 1

Views

Author

Omar E. Pol, Oct 20 2007, Apr 23 2008, Apr 28 2009

Keywords

Comments

a(13) has 314 digits and is too large to include. - R. J. Mathar, Oct 23 2007
Largest proper divisor of n-th even perfect number.
Also numbers k such that A000203(k) is divisible 24. - Ctibor O. Zizka, Jun 29 2009

Crossrefs

Programs

  • Maple
    a:=proc(n) if isprime(2^n-1)=true then 2^(n-2)*(2^n-1) else end if end proc: seq(a(n),n=1..120); # Emeric Deutsch, Oct 24 2007
  • Mathematica
    p = Select[2^Range[400] - 1, PrimeQ]; p*(p+1)/4 (* Vladimir Joseph Stephan Orlovsky, Feb 02 2012 *)
    Map[2^(#-2) * (2^# - 1) &, MersennePrimeExponent[Range[12]]] (* Amiram Eldar, Oct 21 2024 *)

Formula

a(n) = A000396(n)/2. - R. J. Mathar, Oct 23 2007 [Assuming there are no odd perfect numbers. - Jianing Song, Sep 17 2022]
a(n) = 2^(A000043(n) - 2) * A000668(n). - Omar E. Pol, Mar 01 2008
a(n) = A032742(A000396(n)), assuming there are no odd perfect numbers.

Extensions

More terms from R. J. Mathar and Emeric Deutsch, Oct 23 2007

A356232 Numbers whose prime indices are all odd and cover an initial interval of odd positive integers.

Original entry on oeis.org

1, 2, 4, 8, 10, 16, 20, 32, 40, 50, 64, 80, 100, 110, 128, 160, 200, 220, 250, 256, 320, 400, 440, 500, 512, 550, 640, 800, 880, 1000, 1024, 1100, 1210, 1250, 1280, 1600, 1760, 1870, 2000, 2048, 2200, 2420, 2500, 2560, 2750, 3200, 3520, 3740, 4000, 4096, 4400
Offset: 1

Views

Author

Gus Wiseman, Aug 20 2022

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.
Also positions of first appearances of rows in A356226.

Examples

			The terms together with their prime indices begin:
      1: {}
      2: {1}
      4: {1,1}
      8: {1,1,1}
     10: {1,3}
     16: {1,1,1,1}
     20: {1,1,3}
     32: {1,1,1,1,1}
     40: {1,1,1,3}
     50: {1,3,3}
     64: {1,1,1,1,1,1}
     80: {1,1,1,1,3}
    100: {1,1,3,3}
    110: {1,3,5}
    128: {1,1,1,1,1,1,1}
    160: {1,1,1,1,1,3}
    200: {1,1,1,3,3}
    220: {1,1,3,5}
    250: {1,3,3,3}
    256: {1,1,1,1,1,1,1,1}
    320: {1,1,1,1,1,1,3}
    400: {1,1,1,1,3,3}
		

Crossrefs

The partitions with these Heinz numbers are counted by A053251.
This is the odd restriction of A055932.
A subset of A066208 (numbers with all odd prime indices).
This is the sorted version of A356603.
These are the positions of first appearances of rows in A356226. Other statistics are:
- length: A287170, firsts A066205
- minimum: A356227
- maximum: A356228
- bisected length: A356229
- standard composition: A356230
- Heinz number: A356231
- positions of first appearances: A356232 (this sequence)
A001221 counts distinct prime factors, with sum A001414.
A001223 lists the prime gaps, reduced A028334.
A003963 multiplies together the prime indices.
A056239 adds up the prime indices, row sums of A112798.
A073491 lists numbers with gapless prime indices, complement A073492.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    normQ[m_]:=Or[m=={},Union[m]==Range[Max[m]]];
    Select[Range[1000],normQ[(primeMS[#]+1)/2]&]

A080378 Residues mod 4 of the n-th difference between consecutive primes.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Mar 04 2003

Keywords

Crossrefs

Sequences related to the differences between successive primes: A001223 (Delta(p)), A028334, A080378, A104120, A330556-A330561.

Programs

  • Mathematica
    Table[Mod[Prime[w+1]-Prime[w], 4], {w, 1, 256}]
    Mod[Differences[Prime[Range[200]]], 4] (* Zak Seidov, Jun 26 2015 *)
  • Python
    from sympy import prime
    def A080378(n): return (prime(n+1)-prime(n))&3 # Chai Wah Wu, Jul 07 2022

Formula

a(n) = A001223(n) mod 4.
Showing 1-10 of 43 results. Next