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

A125572 Primes p=prime(i) of level (1,13), i.e., such that A118534(i)=prime(i-13).

Original entry on oeis.org

35630467, 118877047, 123823081, 140061577, 155032793, 175204303, 184606997, 188871349, 189489733, 232093339, 244004749, 278518081, 309055367, 310542257, 313596551, 315659909, 329918227, 340761691, 389220347, 398329523, 411405833, 422745641, 480428801, 485608819
Offset: 1

Views

Author

Rémi Eismann and Fabien Sibenaler, Jan 27 2007

Keywords

Comments

This subsequence of A125830 and of A162174 gives primes of level (1,13): If prime(i) has level 1 in A117563 and 2*prime(i) - prime(i+1) = prime(i-k), then we say that prime(i) has level (1,k).

Examples

			prime(10272256) - prime(10272255) = 184607153 - 184606997 = 184606997 - 184606841 = prime(10272255) - prime(10272255-13) and prime(10272255) has level 1 in A117563, so prime(10272255)=184606997 has level (1,13).
		

Crossrefs

Cf. A006562 (primes of level (1,1)), A117078, A117563, A117876, A118464, A118467, A119402, A119403, A119404.

Extensions

Definition and comment reworded following suggestions from the authors. - M. F. Hasler, Nov 30 2009

A125574 Primes p=prime(i) of level (1,14), i.e., such that A118534(i)=prime(i-14).

Original entry on oeis.org

31515413, 69730637, 132102911, 132375259, 215483129, 284491367, 325689253, 388190689, 548369603, 620829113, 633418787, 638213603, 670216277, 793852487, 797759539, 960200149, 1038197399, 1050359137, 1092920249, 1331713301, 1342954871, 1349496367, 1365964199
Offset: 1

Views

Author

Rémi Eismann and Fabien Sibenaler, Jan 27 2007

Keywords

Comments

This subsequence of A125830 and of A162174 gives primes of level (1,14): If prime(i) has level 1 in A117563 and 2*prime(i) - prime(i+1) = prime(i-k), then we say that prime(i) has level (1,k).

Examples

			prime(15456800) - prime(15456799) = 284491601 - 284491367 = 284491367 - 284491133 = prime(15456799) - prime(15456799-14) and prime(15456799) has level 1 in A117563, so prime(15456799) = 284491367 has level (1,14).
		

Crossrefs

Cf. A117078, A117563, A006562 (primes of level (1,1)), A117876, A118464, A118467, A119402, A119403, A119404.

Programs

  • PARI
    lista(nn) = my(c=15, v=primes(15)); forprime(p=53, nn, if(2*v[c]-p==v[c=c%15+1], print1(precprime(p-1), ", ")); v[c]=p); \\ Jinyuan Wang, Jun 18 2021

Extensions

Definition and comment reworded following suggestions from the authors. - M. F. Hasler, Nov 30 2009

A118144 Numbers of prime factors of l, where l is defined in A118534.

Original entry on oeis.org

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

Views

Author

Rémi Eismann and Fabien Sibenaler, May 14 2006, Feb 14 2008

Keywords

Comments

a(n) = 0 only for n = 1, 2 and 4.

Examples

			For a(1), l=0 thus a(1)=0,
for a(3), l=3 thus a(3)=1,
for a(8), l=15=3*5 thus a(8)=2,
for a(24), l=81=3*3*3*3 thus a(24)=4.
		

Crossrefs

Formula

a(n) = numbers of factors of l, largest l such that prime(n+1) = prime(n) + (prime(n) mod l), or 0 if no such l exists.

A216177 Primes p=prime(i) of level (1,4), i.e., such that A118534(i) = prime(i-4).

Original entry on oeis.org

6581, 7963, 13063, 14107, 17053, 17627, 20563, 21347, 22193, 22877, 28319, 30727, 34981, 35171, 41549, 42101, 45197, 46103, 48823, 53201, 53899, 56269, 65449, 65993, 66191, 69031, 69403, 73613, 74101, 74323, 75797, 81973, 86209, 91463, 96293, 101537, 102563
Offset: 1

Views

Author

Fabien Sibenaler, Mar 10 2013

Keywords

Comments

If prime(i) has level 1 in A117563 and 2*prime(i) - prime(i+1) = prime(i-k), then we say that prime(i) has level (1,k).

Examples

			a(2) = 7963 = prime(1006) because 2*prime(1006) - prime(1007) = 2*7963 - 7993 = 7933 = prime(1002).
		

Crossrefs

Subsequence of A125830 and A162174.

Programs

  • Mathematica
    With[{m = 4}, Prime@ Select[Range[m + 1, 10^4], If[MemberQ[{1, 2, 4}, #], 0, 2 Prime[#] - Prime[# + 1]] == Prime[# - m] &]] (* Michael De Vlieger, Jul 16 2017 *)

A216180 Primes p=prime(i) of level (1,6), i.e., such that A118534(i) = prime(i-6).

Original entry on oeis.org

15823, 21617, 31277, 43331, 65731, 97883, 100853, 120947, 265277, 318023, 320953, 361241, 362759, 419831, 422141, 426799, 452549, 465211, 482441, 491539, 504403, 513533, 526781, 540391, 551597, 557093, 575261, 582251, 598729, 649093, 654629, 663601, 678779, 782723
Offset: 1

Views

Author

Fabien Sibenaler, Mar 10 2013

Keywords

Comments

If prime(i) has level 1 in A117563 and 2*prime(i) - prime(i+1) = prime(i-k), then we say that prime(i) has level (1,k).

Examples

			31277 = prime(3373) is a term because 2*prime(3373) - prime(3374) = 2*31277 - 31307 = 31247 = prime(3367).
		

Crossrefs

Subsequence of A125830 and of A162174.

Programs

  • Mathematica
    With[{m = 6}, Prime@ Select[Range[m + 1, 5*10^4], If[MemberQ[{1, 2, 4}, #], 0, 2 Prime[#] - Prime[# + 1]] == Prime[# - m] &]] (* Michael De Vlieger, Jul 16 2017 *)
  • PARI
    lista(nn) = my(c=7, v=primes(7)); forprime(p=19, nn, if(2*v[c]-p==v[c=c%7+1], print1(precprime(p-1), ", ")); v[c]=p); \\ Jinyuan Wang, Jun 18 2021

A216202 Primes p=prime(i) of level (1,7), i.e., such that A118534(i) = prime(i-7).

Original entry on oeis.org

22307, 39251, 81569, 85853, 132763, 159233, 179849, 188029, 281431, 370949, 373393, 421741, 480587, 607363, 630737, 741721, 770669, 782011, 812527, 879743, 909917, 928703, 1008263, 1037347, 1095859, 1111091, 1126897, 1173631, 1260911, 1382681, 1398781, 1439447
Offset: 1

Views

Author

Fabien Sibenaler, Mar 12 2013

Keywords

Comments

If prime(i) has level 1 in A117563 and 2*prime(i) - prime(i+1) = prime(i-k), then we say that prime(i) has level (1,k).

Examples

			81569 = prime(7980) is a term because:
prime(7981) = 81611, prime(7973) = 81527;
2*prime(7980) - prime(7981) = prime(7973).
		

Crossrefs

Subsequence of A125830 and A162174.

Programs

  • Mathematica
    With[{m = 7}, Prime@ Select[Range[m + 1, 10^5], If[MemberQ[{1, 2, 4}, #], 0, 2 Prime[#] - Prime[# + 1]] == Prime[# - m] &]] (* Michael De Vlieger, Jul 16 2017 *)

A216204 Primes p=prime(i) of level (1,8), i.e., such that A118534(i) = prime(i-8).

Original entry on oeis.org

259033, 308153, 343831, 377393, 576227, 597697, 780733, 990397, 1408889, 1643893, 1648613, 1678777, 1910179, 1942207, 2045377, 2049191, 2073403, 2388703, 2403701, 2430611, 2448883, 2481517, 2572529, 2710457, 2827687, 2982697, 3376859, 3404579, 3942413, 4119419
Offset: 1

Views

Author

Fabien Sibenaler, Mar 12 2013

Keywords

Comments

If prime(i) has level 1 in A117563 and 2*prime(i) - prime(i+1) = prime(i-k), then we say that prime(i) has level (1,k).
Subsequence of A125830 and of A162174.

Examples

			343831 = prime(24490) is a term because:
prime(24491) = 343891, prime(24382) = 343771;
2*prime(24490) - prime(24491) = prime(24382).
		

Crossrefs

Programs

  • Mathematica
    With[{m = 8}, Prime@ Select[Range[m + 1, 2*10^5], If[MemberQ[{1, 2, 4}, #], 0, 2 Prime[#] - Prime[# + 1]] == Prime[# - m] &]] (* Michael De Vlieger, Jul 16 2017 *)
  • PARI
    lista(nn) = my(v=primes(9)); forprime(p=29, nn, if(2*v[9]-p==v[1], print1(v[9], ", ")); v=concat(v[2..9], p)); \\ Jinyuan Wang, Jun 18 2021

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

A117078 a(n) is the smallest k such that prime(n+1) = prime(n) + (prime(n) mod k), or 0 if no such k exists.

Original entry on oeis.org

0, 0, 3, 0, 3, 9, 3, 5, 17, 3, 25, 11, 3, 13, 41, 47, 3, 11, 7, 3, 67, 5, 7, 9, 31, 3, 9, 3, 5, 33, 41, 25, 3, 43, 3, 29, 151, 53, 7, 167, 3, 19, 3, 7, 3, 17, 199, 73, 3, 5, 227, 3, 11, 7, 251, 257, 3, 53, 7, 3, 13, 31, 101, 3, 103, 101, 13, 109, 3, 5, 347, 9, 19, 367, 5, 13, 127, 131, 131, 19, 3
Offset: 1

Views

Author

Rémi Eismann, Apr 18 2006, Dec 10 2006, Feb 14 2008

Keywords

Comments

There is a unique decomposition of the primes: provided the weight a(n) is > 0, we have prime(n) = weight * level + gap, or A000040(n)=a(n)*A117563(n)+A001223(n).
a(n) is the smallest divisor of A118534(n) greater than A001223(n) (gap).
a(n) == 0 (mod 2) only for n = {1, 2 or 4}. - Robert G. Wilson v, May 05 2006
a(n) = 0 only for primes 2, 3 and 7. Conjecture: 2, 3 and 7 are the only primes for which log(A000040(n)) < sqrt(A001223(n)).
a(n) > 0 if and only if 2*prime(n+1) < 3*prime(n). - Thomas Ordowski, Nov 25 2013

Examples

			For n = 1 we have prime(n) = 2, prime(n+1) = 3; there is no k such that 3 - 2 = 1 = (2 mod k), hence a(1) = 0.
For n = 3 we have prime(n) = 5, prime(n+1) = 7; 3 is the smallest k such that 7 - 5 = 2 = (5 mod k), hence a(3) = 3.
For n = 19 we have prime(n) = 67, prime(n+1) = 71; 7 is the smallest k such that 71 - 67 = 4 = (67 mod k), hence a(19) = 7.
		

Crossrefs

Cf. A074822 (k=5), A118534, A117563.

Programs

  • Mathematica
    f[n_] := Block[{a, p = Prime@n, np = Prime[n + 1]}, a = Min@ Select[ Divisors[2p - np], # > np - p &]; If[a == Infinity, 0, a]]; Array[f, 80] (* Robert G. Wilson v, May 08 2006 *)
  • PARI
    {m=78; for(n=1,m,p=prime(n);d=prime(n+1)-p; k=0; j=1; while(k==0&&j
    				

Extensions

Edited and corrected by Don Reble and Klaus Brockhaus, Apr 21 2006

A090369 Smallest divisor of 2n that is > 2, or 0 if no such divisor exists.

Original entry on oeis.org

0, 4, 3, 4, 5, 3, 7, 4, 3, 4, 11, 3, 13, 4, 3, 4, 17, 3, 19, 4, 3, 4, 23, 3, 5, 4, 3, 4, 29, 3, 31, 4, 3, 4, 5, 3, 37, 4, 3, 4, 41, 3, 43, 4, 3, 4, 47, 3, 7, 4, 3, 4, 53, 3, 5, 4, 3, 4, 59, 3, 61, 4, 3, 4, 5, 3, 67, 4, 3, 4, 71, 3, 73, 4, 3, 4, 7, 3, 79, 4, 3, 4, 83, 3, 5, 4, 3, 4, 89, 3, 7, 4, 3, 4, 5
Offset: 1

Views

Author

Lekraj Beedassy, Nov 27 2003

Keywords

Crossrefs

Programs

  • Maple
    A090369 := proc(n) local lf,i ; lf := numtheory[divisors](2*n) ; for i from 1 to nops(lf) do if op(i,lf) > 2 then RETURN( op(i,lf) ) ; fi ; od ; RETURN(0) ; end : for n from 0 to 100 do printf("%d,",A090369(n)) ; od ; # R. J. Mathar, Jun 02 2006
  • Mathematica
    Join[{0},Table[SelectFirst[Divisors[2n],#>2&],{n,2,120}]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 24 2017 *)

Extensions

More terms from Ray Chandler, Dec 02 2003
Edited by N. J. A. Sloane at the suggestion of Rémi Eismann, Sep 15 2007
Previous Showing 11-20 of 53 results. Next