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

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

A118534 a(n) is the largest 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, 9, 9, 15, 15, 17, 27, 25, 33, 39, 39, 41, 47, 57, 55, 63, 69, 67, 75, 77, 81, 93, 99, 99, 105, 105, 99, 123, 125, 135, 129, 147, 145, 151, 159, 161, 167, 177, 171, 189, 189, 195, 187, 199, 219, 225, 225, 227, 237, 231, 245, 251, 257, 267, 265, 273, 279
Offset: 1

Views

Author

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

Keywords

Comments

a(n) = prime(n) - g(n) or A000040(n) - A001223(n) if prime(n) - g(n) > g(n), 0 otherwise.
a(n) = 0 only for primes 2, 3 and 7.
Under the twin prime conjecture prime(n+1)-prime(n) = 2 infinitely often, and from that we can conclude that k=prime(n)-2 infinitely often. [Roderick MacPhee, Jul 24 2012]
a(n) = A062234(n) for 5 <= n <= 1000. - Georg Fischer, Oct 28 2018

Examples

			n=5: prime(5) = 11, prime(6) = 13, 13 = 11 + (11 mod 3) = 11 + (11 mod 9), so A117078(5) = 3, a(5) = 9 and A117563(5) = 9/3 = 3. Thus 11 has level 3 and so is a member of A117873.
		

Crossrefs

Cf. A062234, A117078; essentially the same as A117563.

Programs

  • Mathematica
    a[n_] := If[n == 1 || n == 2 || n == 4, 0, 2Prime[n] - Prime[n + 1]]; Array[a, 62] (* Robert G. Wilson v, May 09 2006 *)

Extensions

Edited by N. J. A. Sloane, May 07 2006
More terms from Robert G. Wilson v, May 09 2006

A117876 Primes p=prime(k) of level (1,2), i.e., such that A118534(k) = prime(k-2).

Original entry on oeis.org

23, 47, 73, 233, 353, 647, 1097, 1283, 1433, 1453, 1493, 1613, 1709, 1889, 2099, 2161, 2383, 2621, 2693, 2713, 3049, 3533, 3559, 3923, 4007, 4133, 4643, 4793, 4937, 5443, 5743, 6101, 7213, 7309, 7351, 7561, 7621, 7829, 8179, 8237, 8719, 8849, 9109, 9343, 9467
Offset: 1

Views

Author

Rémi Eismann, May 02 2006

Keywords

Comments

If prime(k) has level 1 in A117563, and if 2*prime(k) - prime(k+1) = prime(k-i), then we say that prime(k) has level (1,i). Sequence gives primes of level (1,2).
The prime p(4)=7 cannot be decomposed into weight*level+gap (<=> A117563(4)=0 <=> A118534(4)=0 <=> A117078(4)=0). For all other primes, an equivalent definition would be: Primes p(k) such that 2*p(k) - p(k+1) = p(k-2). - Rémi Eismann and M. F. Hasler, Nov 08 2009

Examples

			29 = 2*23 - 17, 2179 = 2*2161 - 2143, 5749 = 2*5743 - 5737.
		

Crossrefs

Programs

  • Mathematica
    With[{m = 2}, Prime@ Select[Range[m + 1, 1200], If[MemberQ[{1, 2, 4}, #], 0, 2 Prime[#] - Prime[# + 1]] == Prime[# - m] &]] (* Michael De Vlieger, Jul 16 2017 *)
  • PARI
    for(n=5,9999, 2*prime(n)-prime(n+1) == prime(n-2) & print1(prime(n),",")) \\ M. F. Hasler, Nov 08 2009
    
  • PARI
    is_A117876(p)={ isprime(p) & isprime(d=2*p-nextprime(p+2)) & d == precprime(precprime(p-2)-2) & p>7 } \\ M. F. Hasler, Nov 08 2009
    
  • Scheme
    (define (A117876 n) (A000040 (A066495 (+ 1 n)))) ;; Antti Karttunen, Nov 30 2013

Formula

a(n) = A000040(A066495(n+1)). - Antti Karttunen, Nov 30 2013

Extensions

Edited by N. J. A. Sloane, May 14 2006
More terms from Rémi Eismann, May 25 2006
Definition corrected and terms double-checked by M. F. Hasler, Nov 08 2009

A074822 Primes p such that p + 4 is prime and p == 9 (mod 10).

Original entry on oeis.org

19, 79, 109, 229, 349, 379, 439, 499, 739, 769, 859, 1009, 1279, 1429, 1489, 1549, 1579, 1609, 1999, 2239, 2269, 2389, 2539, 2659, 2689, 2749, 3019, 3079, 3319, 3529, 3919, 4129, 4519, 4639, 4729, 4789, 4969, 4999, 5479, 5569, 5689, 5779, 5839, 6199
Offset: 1

Views

Author

Roger L. Bagula, Sep 30 2002

Keywords

Comments

From Rémi Eismann, May 14 2006; May 04 2007: (Start)
Also primes for which k is equal to 5 in A117078. Examples: prime(9) = prime(8) + (prime(8) mod 5) = 19 + (19 mod 5)=23; prime(23) = prime(22) + (prime(22) mod 5) = 79 + (79 mod 5)=83; prime(1359) = prime(1358) + (prime(1358) mod 5) = 11239+ (11239 mod 5)=11243.
The prime numbers in this sequence are of the form (10i-1) with i=(level(n)+1)/2, level(n) defined in A117563.
Consider A117078: a(n) = smallest k such that prime(n+1) = prime(n) + (prime(n) mod k), or 0 if no such k exists. Sequence gives values of prime(n) for which k=5. (End)
p is the lesser member of cousin primes (p,p+4) such that p == 9 (mod 10). - Muniru A Asiru, Jul 03 2017

Crossrefs

Intersection of A023200 and A030433.

Programs

  • Mathematica
    Prime[ Select[ Range[1000], Prime[ # ] + 4 == Prime[ # + 1] && Mod[ Prime[ # ], 10] == 9 & ]]
    Transpose[Select[Partition[Prime[Range[820]],2,1],Last[#]-First[#] == 4 && Mod[ First[ #],10]==9&]][[1]] (* Harvey P. Dale, Oct 20 2011 *)
  • PARI
    is(n)=n%30==19 && isprime(n+4) && isprime(n) \\ Charles R Greathouse IV, Jul 12 2017
    
  • PARI
    list(lim)=my(v=List(),p=19); forprime(q=23,lim+4, if(q-p==4 && p%30==19, listput(v,p)); p=q); Vec(v) \\ Charles R Greathouse IV, Jul 12 2017

Extensions

Edited by Robert G. Wilson v and N. J. A. Sloane, Oct 03 2002
Entry revised by N. J. A. Sloane, Feb 24 2007

A162174 Primes classified by level.

Original entry on oeis.org

5, 13, 19, 23, 31, 37, 43, 47, 53, 61, 73, 97, 113, 127, 131, 139, 151, 157, 163, 173, 181, 199, 211, 223, 233, 257, 263, 271, 293, 307, 313, 317, 337, 353, 373, 389, 397, 401, 421, 457, 479, 509, 523, 541, 547, 563, 571, 593, 607, 619, 647, 653, 661, 673, 691
Offset: 1

Views

Author

Rémi Eismann, Jun 27 2009

Keywords

Comments

Conjecture : primes classified by level are rarefying among prime numbers.
A000040(n) = 2, 3, 7, A162175(n), a(n) [From Rémi Eismann, Jun 27 2009]

Examples

			For prime(3)=5, A117078(3)=3 > A117563(3)=1 ; prime(3)=5 is classified by level. For prime(172)=1021, A117078(172)=337 > A117563(172)=3 ; prime(172)=1021 is classified by level.
		

Crossrefs

Cf. A162175. [From Rémi Eismann, Jun 27 2009]

Formula

If for prime(n), A117078(n) (the weight) > A117563(n) (the level) then prime(n) is classified by level.
If for prime(n), A117078(n) (the weight) <= A117563(n) (the level) and A117078(n) <> 0 then prime(n) is classified by weight. [From Rémi Eismann, Jun 27 2009]

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

Original entry on oeis.org

13933, 23633, 28229, 49223, 71363, 79633, 81239, 90547, 96857, 97613, 108827, 115363, 117443, 126781, 130657, 133733, 153533, 157679, 176819, 186799, 197389, 206651, 221327, 222199, 228139, 246947, 266297, 272203, 276049, 279221, 282493, 290627, 292493, 296299
Offset: 1

Views

Author

Rémi Eismann, May 04 2006

Keywords

Comments

This subsequence of A125830 and of A162174 gives primes of level (1,5): 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(5061) = 49223 has level (1,5): prime(5062) = 49253 = 2*prime(5061) - prime(5061-5) = 2*prime(5061) - prime(5056).
		

Crossrefs

Programs

  • Mathematica
    With[{m = 5}, Prime@ Select[Range[m + 1, 3*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=6, v=primes(6)); forprime(p=17, nn, if(2*v[c]-p==v[c=c%6+1], print1(precprime(p-1), ", ")); v[c]=p); \\ Jinyuan Wang, Jun 18 2021

Extensions

Edited by N. J. A. Sloane, May 14 2006
More terms from Rémi Eismann, May 21 2006
Definition and comment reworded following suggestions from the authors. - M. F. Hasler, Nov 30 2009

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

Original entry on oeis.org

619, 1069, 1459, 1499, 1759, 1789, 2861, 3331, 3931, 4177, 4801, 4831, 5419, 6229, 6397, 8431, 8893, 9067, 9631, 11003, 11131, 11789, 12619, 14251, 15331, 15889, 16661, 17683, 17939, 18269, 18553, 19219, 19391, 19507, 20029, 20759, 22039, 22159, 22171, 22549
Offset: 1

Views

Author

Rémi Eismann, May 24 2006

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

			prime(115) - prime(114) = 631 - 619 = 619 - 607 = prime(114) - prime(114-3).
		

Crossrefs

Subsequence of A125830 and A162174.
Cf. A006562 (primes of level (1,1)), A117078, A117563, A117876, A118464.

Programs

  • Mathematica
    Select[Partition[Prime[Range[2600]],5,1],#[[5]]-#[[4]]==#[[4]]-#[[1]]&][[All,4]] (* Harvey P. Dale, Aug 28 2021 *)

Extensions

Definition and comment reworded, following author's suggestions, by M. F. Hasler, Nov 30 2009

A118922 Primes for which the weight as defined in A117078 is 9 and the gap as defined in A001223 is 8.

Original entry on oeis.org

89, 359, 449, 683, 701, 719, 1439, 1979, 2213, 2609, 2663, 2699, 2843, 2879, 3041, 3221, 3491, 4751, 5399, 5813, 6029, 6389, 6983, 7019, 7919, 8171, 8369, 8513, 9539, 10151, 10169, 10259, 10313, 10781, 10979, 11321, 11519, 11681, 12149, 12203
Offset: 1

Views

Author

Rémi Eismann, May 25 2006, May 04 2007

Keywords

Comments

The prime numbers in this sequence are of the form (18i-1) with i=(level(n)+1)/2, level(n) defined in A117563.

Examples

			a(1) = 89 because of prime(25) = prime(24) + (prime(24)mod 9) = 97
g(n) = 8
		

Crossrefs

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

Original entry on oeis.org

576791, 3361517, 9433859, 10460719, 11630503, 11707537, 12080027, 19743677, 28716287, 33384517, 34961923, 36627659, 37776967, 38087983, 40794049, 45650359, 49152757, 52230229, 53152907, 53240927, 55036789, 56167103, 56177783, 57717749, 58804483, 71849423, 76119269
Offset: 1

Views

Author

Rémi Eismann and Fabien Sibenaler, Jul 25 2006

Keywords

Comments

This subsequence of A125830 and of A162174 gives primes of level (1,11): 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(240963) - prime(240962) = 3361601 - 3361517 = 3361517 - 3361433 = prime(240962) - prime(240962-11) and prime(240962) has level 1 in A117563, so prime(240962)=3361517 has level (1,11).
		

Crossrefs

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

Extensions

More terms from Fabien Sibenaler, Oct 20 2006
Definition and comment reworded following suggestions from the authors. - M. F. Hasler, Nov 30 2009

A118924 Primes for which the weight as defined in A117078 is 53 and the gap as defined in A001223 is 52.

Original entry on oeis.org

19609, 547171, 3099757, 3282289, 3401221, 4286851, 4648099, 5544859, 5622769, 5731207, 5868901, 6387559, 6581857, 6949147, 6985081, 7382899, 7412791, 7675141, 7697401, 8203021, 8366791, 9190411, 9649921, 9990499, 9994951
Offset: 1

Views

Author

Rémi Eismann, May 25 2006, May 04 2007

Keywords

Comments

The prime numbers in this sequence are of the form (106i-1) with i=(level(n)+1)/2, level(n) defined in A117563.

Examples

			Prime(2226) = prime(2225) + (prime(2225) mod 53) = 19609 + (19609 mod 53) = 19661
g(n) = 19661 - 19609 = 53 - 1 = 52
		

Crossrefs

Previous Showing 11-20 of 77 results. Next