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

A225493 Numbers having only strong prime factors, cf. A051634.

Original entry on oeis.org

1, 11, 17, 29, 37, 41, 59, 67, 71, 79, 97, 101, 107, 121, 127, 137, 149, 163, 179, 187, 191, 197, 223, 227, 239, 251, 269, 277, 281, 289, 307, 311, 319, 331, 347, 367, 379, 397, 407, 419, 431, 439, 451, 457, 461, 479, 487, 493, 499, 521, 541, 557, 569, 587
Offset: 1

Views

Author

Reinhard Zumkeller, May 09 2013

Keywords

Crossrefs

Cf. A225494 (balanced), A225495 (weak), A225496 (non-balanced).

Programs

  • Haskell
    import Data.Set (singleton, fromList, union, deleteFindMin)
    a225493 n = a225493_list !! (n-1)
    a225493_list = 1 : h (singleton p) ps [p] where
       (p:ps) = a051634_list
       h s xs'@(x:xs) ys
         | m > x     = h (s `union` (fromList $ map (* x) (1 : ys))) xs ys
         | otherwise = m : h (s' `union` (fromList $ map (* m) ys')) xs' ys'
         where ys' = m : ys; (m, s') = deleteFindMin s

Formula

Multiplicative closure of A051634.

A006562 Balanced primes (of order one): primes which are the average of the previous prime and the following prime.

Original entry on oeis.org

5, 53, 157, 173, 211, 257, 263, 373, 563, 593, 607, 653, 733, 947, 977, 1103, 1123, 1187, 1223, 1367, 1511, 1747, 1753, 1907, 2287, 2417, 2677, 2903, 2963, 3307, 3313, 3637, 3733, 4013, 4409, 4457, 4597, 4657, 4691, 4993, 5107, 5113, 5303, 5387, 5393
Offset: 1

Views

Author

Keywords

Comments

Subsequence of A075540. - Franklin T. Adams-Watters, Jan 11 2006
This subsequence of A125830 and of A162174 gives primes of level (1,1): More generally, the i-th prime p(i) is of level (1,k) if and only if it has level 1 in A117563 and 2 p(i) - p(i+1) = p(i-k). - Rémi Eismann, Feb 15 2007
Note the similarity between plots of A006562 and A013916. - Bill McEachen, Sep 07 2009
Balanced primes U strong primes = good primes. Or, A006562 U A051634 = A046869. - Juri-Stepan Gerasimov, Mar 01 2010
Primes prime(n) such that A001223(n-1) = A001223(n). - Irina Gerasimova, Jul 11 2013
Numbers m such that A346399(m) is odd and >= 3. - Ya-Ping Lu, Dec 26 2021 and May 07 2024
"Balanced" means that the next and preceding gap are of the same size, i.e., the second difference A036263 vanishes; so these are the primes whose indices are 1 more than indices of zeros in A036263, listed in A064113. - M. F. Hasler, Oct 15 2024
Primes which are the average of three consecutive primes. - Peter Schorn, Apr 30 2025

Examples

			5 belongs to the sequence because 5 = (3 + 7)/2. Likewise 53 = (47 + 59)/2.
5 belongs to the sequence because it is a term, but not first or last, of the AP of consecutive primes (3, 5, 7).
53 belongs to the sequence because it is a term, but not first or last, of the AP of consecutive primes (47, 53, 59).
257 and 263 belong to the sequence because they are terms, but not first or last, of the AP of consecutive primes (251, 257, 263, 269).
		

References

  • A. Murthy, Smarandache Notions Journal, Vol. 11 N. 1-2-3 Spring 2000.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers (Rev. ed. 1997), p. 134.

Crossrefs

Primes A000040 whose indices are 1 more than A064113, indices of zeros in A036263 (second differences of the primes).
Cf. A225494 (multiplicative closure); complement of A178943 with respect to A000040.
Cf. A055380, A051795, A081415, A096710 for other balanced prime sequences.

Programs

  • Haskell
    a006562 n = a006562_list !! (n-1)
    a006562_list = filter ((== 1) . a010051) a075540_list
    -- Reinhard Zumkeller, Jan 20 2012
    
  • Haskell
    a006562 n = a006562_list !! (n-1)
    a006562_list = h a000040_list where
       h (p:qs@(q:r:ps)) = if 2 * q == (p + r) then q : h qs else h qs
    -- Reinhard Zumkeller, May 09 2013
    
  • Magma
    [a: n in [1..1000] | IsPrime(a) where a is NthPrime(n)-NthPrime(n+1)+NthPrime(n+2)]; // Vincenzo Librandi, Jun 23 2016
    
  • Mathematica
    Transpose[ Select[ Partition[ Prime[ Range[1000]], 3, 1], #[[2]] ==(#[[1]] + #[[3]])/2 &]][[2]]
    p=Prime[Range[1000]]; p[[Flatten[1+Position[Differences[p, 2], 0]]]]
    Prime[#]&/@SequencePosition[Differences[Prime[Range[800]]],{x_,x_}][[All,2]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 31 2019 *)
  • PARI
    betwixtpr(n) = { local(c1,c2,x,y); for(x=2,n, c1=c2=0; for(y=prime(x-1)+1,prime(x)-1, if(!isprime(y),c1++); ); for(y=prime(x)+1,prime(x+1)-1, if(!isprime(y),c2++); ); if(c1==c2,print1(prime(x)",")) ) } \\ Cino Hilliard, Jan 25 2005
    
  • PARI
    forprime(p=1,999, p-precprime(n-1)==nextprime(p+1)-p && print1(p",")) \\ M. F. Hasler, Jun 01 2013
    
  • PARI
    is(n)=n-precprime(n-1)==nextprime(n+1)-n && isprime(n) \\ Charles R Greathouse IV, Apr 07 2016
    
  • Python
    from sympy import nextprime; p, q, r = 2, 3, 5
    while q < 6000:
        if 2*q == p + r: print(q, end = ", ")
        p, q, r = q, r, nextprime(r) # Ya-Ping Lu, Dec 23 2021

Formula

2*p_n = p_(n-1) + p_(n+1).
Equals { p = prime(k) | A118534(k) = prime(k-1) }. - Rémi Eismann, Nov 30 2009
a(n) = A000040(A064113(n) + 1) = (A122535(n) + A181424(n)) / 2. - Reinhard Zumkeller, Jan 20 2012
a(n) = A122535(n) + A117217(n). - Zak Seidov, Feb 14 2013
Equals A145025 intersect A000040 = A145025 \ A024675. - M. F. Hasler, Jun 01 2013
Conjecture: Limit_{n->oo} n*(log(a(n)))^2 / a(n) = 1/2. - Alain Rocchelli, Mar 21 2024
Conjecture: The asymptotic limit of the average of a(n+1)-a(n) is equivalent to 2*(log(a(n)))^2. Otherwise formulated: 2 * Sum_{n=1..N} (log(a(n)))^2 ~ a(N). - Alain Rocchelli, Mar 23 2024

Extensions

Reworded comment and added formula from R. Eismann. - M. F. Hasler, Nov 30 2009
Edited by Daniel Forgues, Jan 15 2011

A036263 Second differences of primes.

Original entry on oeis.org

1, 0, 2, -2, 2, -2, 2, 2, -4, 4, -2, -2, 2, 2, 0, -4, 4, -2, -2, 4, -2, 2, 2, -4, -2, 2, -2, 2, 10, -10, 2, -4, 8, -8, 4, 0, -2, 2, 0, -4, 8, -8, 2, -2, 10, 0, -8, -2, 2, 2, -4, 8, -4, 0, 0, -4, 4, -2, -2, 8, 4, -10, -2, 2, 10, -8, 4, -8, 2, 2, 2, -2, 0, -2, 2, 2, -4, 4, 2, -8, 8, -8, 4, -2, 2, 2, -4, -2, 2, 8, -4
Offset: 1

Views

Author

Keywords

Examples

			a(3) = 5 + 11 - 2*7 = 16 - 14 = 2.
		

Crossrefs

For records see A293154, A293155.

Programs

  • Haskell
    a036263 n = a036263_list !! (n-1)
    a036263_list = zipWith (-) (tail a001223_list) a001223_list
    -- Reinhard Zumkeller, Oct 29 2011
    
  • Maple
    A036263:=n->ithprime(n) + ithprime(n+2) - 2*ithprime(n+1); seq(A036263(n), n=1..100); # Wesley Ivan Hurt, Apr 01 2014
  • Mathematica
    Table[Prime[n - 1] + Prime[n + 1] - 2*Prime[n], {n, 2, 105}]
    Differences[Prime[Range[100]], 2] (* Harvey P. Dale, Oct 14 2012 *)
  • PARI
    for(n=2,100,print1(prime(n+2)-2*prime(n+1)+prime(n)","))
    
  • Python
    from sympy import prime
    def A036263(n): return prime(n)-(prime(n+1)<<1)+prime(n+2) # Chai Wah Wu, Sep 28 2024

Formula

a(A064113(n)) = 0. - Reinhard Zumkeller, Jan 20 2012
a(n) = prime(n) + prime(n+2) - 2*prime(n+1). - Thomas Ordowski, Jul 21 2012
Conjecture: |a(1)| + |a(2)| + ... + |a(n)| ~ prime(n). - Thomas Ordowski, Jul 21 2012
a(n) = A001223(n+1) - A001223(n). - R. J. Mathar, Sep 19 2013
Sum_{i = 1..n - 1} a(i) = A046933(n), n >= 1. - Daniel Forgues, Apr 15 2014
Sum_{i = 2..n - 1} a(i) = prime(n + 1) - prime(n) - 2; Sum_{i = 2..n - 1} a(i) = 0 whenever prime(n) is a lesser of twin primes. - Hamdi Murat Yildirim, Jun 24 2014

A051635 Weak primes: prime(n) < (prime(n-1) + prime(n+1))/2.

Original entry on oeis.org

3, 7, 13, 19, 23, 31, 43, 47, 61, 73, 83, 89, 103, 109, 113, 131, 139, 151, 167, 181, 193, 199, 229, 233, 241, 271, 283, 293, 313, 317, 337, 349, 353, 359, 383, 389, 401, 409, 421, 433, 443, 449, 463, 467, 491, 503, 509, 523, 547, 571, 577, 601, 619, 643, 647
Offset: 1

Views

Author

Felice Russo, Nov 15 1999

Keywords

Comments

Primes prime(n) such that prime(n)-prime(n-1) < prime(n+1)-prime(n). - Juri-Stepan Gerasimov, Jan 01 2011
a(n) < A051634(n). a(n) ~ 2*prime(n). - Thomas Ordowski, Jul 25 2012
The inequality above is false. The least counterexample is a(19799) = 496291 > A051634(19799) = 496283. - Amiram Eldar, Nov 26 2023
Erdős called a weak prime an "early prime." He conjectured that there are infinitely many consecutive pairs of early primes, and offered $100 for a proof and $25000 for a disproof (Kuperberg 1992). See A229832 for a stronger conjecture. - Jonathan Sondow, Oct 13 2013

Examples

			7 belongs to the sequence because 7 < (5+11)/2.
		

References

  • A. Murthy, Smarandache Notions Journal, Vol. 11 N. 1-2-3 Spring 2000

Crossrefs

Subsequence of A178943.
Cf. A225495 (multiplicative closure).

Programs

  • Haskell
    a051635 n = a051635_list !! (n-1)
    a051635_list = g a000040_list where
       g (p:qs@(q:r:ps)) = if 2 * q < (p + r) then q : g qs else g qs
    -- Reinhard Zumkeller, May 09 2013
  • Mathematica
    Transpose[Select[Partition[Prime[Range[10^2]], 3, 1], #[[2]]<(#[[1]]+#[[3]])/2 &]][[2]] (* Vladimir Joseph Stephan Orlovsky, May 01 2008 *)
    p=Prime[Range[200]]; p[[Flatten[1+Position[Sign[Differences[p, 2]], 1]]]]
  • PARI
    p=2;q=3;forprime(r=5,1e3,if(2*qCharles R Greathouse IV, Jul 25 2011
    

Formula

a(1) = A229832(1). - Jonathan Sondow, Oct 13 2013
Conjecture: Limit_{n->oo} n / PrimePi(a(n)) = 1/2. - Alain Rocchelli, Mar 17 2024

Extensions

More terms from James Sellers

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

A054818 Sixth term of strong prime sextets: p(m-4)-p(m-5) > p(m-3)-p(m-4) > p(m-2)-p(m-3) > p(m-1)-p(m-2) > p(m)-p(m-1).

Original entry on oeis.org

1873, 2543, 3463, 9623, 21493, 23021, 25247, 26113, 32191, 33413, 33941, 39107, 40823, 41233, 44269, 47297, 48823, 55903, 57793, 67049, 70123, 74297, 74717, 74719, 75167, 75169, 83003, 84319, 87881, 88427, 88663, 103813, 103919
Offset: 0

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Crossrefs

Programs

  • Mathematica
    spsQ[lst_List]:=Module[{d=Differences[lst]},d[[1]]>d[[2]]>d[[3]]> d[[4]]> d[[5]]]; [Select[Partition[Prime[Range[10000]],6,1],spsQ]][[6]] (* Harvey P. Dale, Jul 04 2011 *)

A046869 Good primes (version 1): prime(n)^2 > prime(n-1)*prime(n+1).

Original entry on oeis.org

5, 11, 17, 29, 37, 41, 53, 59, 67, 71, 79, 97, 101, 107, 127, 137, 149, 157, 163, 173, 179, 191, 197, 211, 223, 227, 239, 251, 257, 263, 269, 277, 281, 307, 311, 331, 347, 367, 373, 379, 397, 419, 431, 439, 457, 461, 479, 487, 499, 521, 541
Offset: 1

Views

Author

Keywords

Comments

Also called geometrically strong primes. - Amarnath Murthy, Mar 08 2002
The idea can be extended by defining a geometrically strong prime of order k to be a prime that is greater than the geometric mean of r neighbors on both sides for all r = 1 to k but not for r = k+1. Similar generalizations can be applied to the sequence A051634. - Amarnath Murthy, Mar 08 2002
It appears that a(n) ~ 2*prime(n). - Thomas Ordowski, Jul 25 2012
Conjecture: primes p(n) such that 2*p(n) >= p(n-1) + p(n+1). - Thomas Ordowski, Jul 25 2012
Probably {3,7,23} U {good primes} = {primes p(n) > 2/(1/p(n-1) + 1/p(n+1))}. - Thomas Ordowski, Jul 27 2012
Except for A001359(1), A001359 is a subsequence. - Chai Wah Wu, Sep 10 2019

Examples

			37 is a member as 37^2 = 1369 > 31*41 = 1271.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, Section A14.

Crossrefs

Programs

  • Magma
    [NthPrime(n): n in [2..100] | NthPrime(n)^2 gt NthPrime(n-1)*NthPrime(n+1)]; // Bruno Berselli, Oct 23 2012
  • Maple
    with(numtheory): a := [ ]: P := [ ]: M := 300: for i from 2 to M do if p(i)^2>p(i-1)*p(i+1) then a := [ op(a),i ]; P := [ op(P),p(i) ]; fi; od: a; P;
  • Mathematica
    Do[ If[ Prime[n]^2 > Prime[n - 1]*Prime[n + 1], Print[ Prime[n] ] ], {n, 2, 100} ]
    Transpose[Select[Partition[Prime[Range[300]],3,1],#[[2]]^2>#[[1]]#[[3]]&]][[2]] (* Harvey P. Dale, May 13 2012 *)
    Select[Prime[Range[2, 100]], #^2 > NextPrime[#]*NextPrime[#, -1] &] (* Jayanta Basu, Jun 29 2013 *)
  • PARI
    forprime(n=o=p=3,999,o+0<(o=p)^2/(p=n) & print1(o", "))
    isA046869(p)={ isprime(p) & p^2>precprime(p-1)*nextprime(p+1) } \\ M. F. Hasler, Jun 15 2011
    

Extensions

Corrected and extended by Robert G. Wilson v, Dec 06 2000
Edited by N. J. A. Sloane at the suggestion of Giovanni Resta, Aug 20 2007

A229832 First term of smallest sequence of n consecutive weak primes.

Original entry on oeis.org

3, 19, 349, 2909, 15377, 128983, 1319411, 17797519, 94097539, 6927837559, 48486712787, 968068681519, 1472840004019, 129001208165719
Offset: 1

Views

Author

Jonathan Sondow, Oct 13 2013

Keywords

Comments

Erdős called a weak prime A051635 an "early prime," defined to be one which is less than the arithmetic mean of the prime before it and the prime after it. He conjectured that there are infinitely many consecutive pairs of early primes, and offered $100 for a proof and $25000 for a disproof. See Kuperberg 1992.
I make the stronger conjecture that the sequence a(n) is infinite.
a(1) = A051635(1), a(2) = A054820(1), a(3) = A054824(1), a(4) = A054829(1), a(5) = A054835(1).
a(n) is the prime following A158939(n+1). [Follows from the definitions] - Chris Boyd, Mar 28 2015

Examples

			The primes 19 < (17+23)/2 and 23 < (19+29)/2 are the smallest pair of consecutive weak/early primes, so a(2) = 19.
		

Crossrefs

Formula

a(n) = min{p(i): 2*p(i+j) < p(i+j-1) + p(i+j+1), j = 0,1,..,n-1}.

Extensions

a(6) corrected by and a(7)-a(13) from Giovanni Resta, Jan 16 2014
a(14) from Giovanni Resta, Apr 19 2016

A054805 Second 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

37, 67, 97, 223, 277, 307, 457, 479, 613, 631, 719, 751, 853, 877, 929, 1087, 1297, 1423, 1447, 1471, 1543, 1657, 1663, 1693, 1733, 1777, 1783, 1847, 1861, 1867, 1987, 1993, 2053, 2137, 2333, 2371, 2377, 2459, 2467, 2503, 2521, 2531, 2579, 2609, 2647
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Comments

Second member of pairs of consecutive primes in A051634 (strong primes). - M. F. Hasler, Oct 27 2018

Crossrefs

Cf. A051634, A051635; A054800 .. A054803: members of balanced prime quartets (= consecutive primes in arithmetic progression); A054804 .. A054818: members of strong prime quartet, quintet, sextet; A054819 .. A054840: members of weak prime quartet, quintet, sextet, septets.

Formula

a(n) = nextprime(A054804(n))= prevprime(A054806(n)), nextprime = A151800, prevprime = A151799. - M. F. Hasler, Oct 27 2018

Extensions

Offset corrected to 1 by M. F. Hasler, Oct 27 2018
Definition clarified by N. J. A. Sloane, Aug 28 2021

A054807 Fourth 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

43, 73, 103, 229, 283, 313, 463, 491, 619, 643, 733, 761, 859, 883, 941, 1093, 1303, 1429, 1453, 1483, 1553, 1667, 1669, 1699, 1747, 1787, 1789, 1867, 1871, 1873, 1997, 1999, 2069, 2143, 2341, 2381, 2383, 2473, 2477, 2531, 2539, 2543, 2593, 2621, 2659
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Crossrefs

Cf. A051634, A051635; A054800 .. A054803: members of balanced prime quartets (= 4 consecutive primes in arithmetic progression); A054804 .. A054818: members of strong prime quartet, quintet, sextet; A054819 .. A054840: members of weak prime quartet, quintet, sextet, septets.

Formula

a(n) = nextprime(A054806(n)), nextprime = A151800. - M. F. Hasler, Oct 27 2018

Extensions

Offset corrected to 1 by M. F. Hasler, Oct 27 2018
Definition clarified by N. J. A. Sloane, Aug 28 2021.
Showing 1-10 of 41 results. Next