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

A158850 Numbers n such that 30*n + 29 is prime.

Original entry on oeis.org

0, 1, 2, 4, 5, 7, 8, 11, 12, 13, 14, 15, 16, 18, 19, 21, 23, 26, 27, 30, 33, 34, 36, 40, 41, 42, 43, 46, 47, 49, 51, 53, 56, 62, 64, 65, 67, 68, 69, 70, 76, 77, 79, 81, 84, 85, 86, 89, 90, 92, 93, 95, 96, 97, 98, 99, 102, 103, 106, 109, 110, 111, 112, 114, 117, 121, 123, 125
Offset: 1

Views

Author

Ki Punches, Mar 28 2009

Keywords

Comments

Encoded primes with LSD 9 and (SOD-1)/3 non-integer, (LSD, least significant digit; SOD, sum of digits). Divide any such number by 30, if the whole number portion from the quotient is in the sequence, the number is prime.

Examples

			Example: 3209 with LSD 9 and (SOD-1)/3 non-integer; Then 3209/30 = 106.966, or 106, which is in the sequence, thus 3209 is prime.
		

Crossrefs

Programs

Formula

a(n) = (A132236(n) - 29)/30 = Floor[A132236(n)/30]. - Chandler

Extensions

Edited by Ray Chandler, Apr 07 2009

A282324 Greater of twin primes congruent to 19 (mod 30).

Original entry on oeis.org

19, 109, 139, 199, 229, 349, 619, 829, 859, 1279, 1429, 1489, 1609, 1669, 1699, 1789, 1879, 1999, 2029, 2089, 2239, 2269, 2659, 2689, 3169, 3259, 3469, 3529, 3559, 3769, 3919, 4129, 4159, 4219, 4339, 4519, 4549, 4639, 4789, 4969, 5419, 5479, 5659, 5869, 6199
Offset: 1

Views

Author

Martin Renner, Feb 11 2017

Keywords

Comments

The union of [A282323 and this sequence] is A132242.
The union of [{5, 7}, A282322, this sequence and A282326] is the greater of twin primes sequence A006512.
The union of [{3, 5, 7}, A282321 to A282326] is the twin primes sequence A001097.
Number of terms less than 10^k, k=2,3,4,...: 1, 9, 64, 414, 2734, 19674, 146953, ... - Muniru A Asiru, Feb 09 2018

Crossrefs

Programs

  • GAP
    Filtered(List([1..220], k -> 30*k-11), n -> IsPrime(n) and IsPrime(n-2));  # Muniru A Asiru, Feb 02 2018
  • Magma
    [p: p in PrimesUpTo(7000) | IsPrime(p-2) and p mod 30 eq 19 ]; // Vincenzo Librandi, Feb 13 2017
    
  • Maple
    a:={}:
    for i from 1 to 1229 do
      if isprime(ithprime(i)-2) and ithprime(i) mod 30 = 19 then
        a:={op(a),ithprime(i)}:
      fi:
    od:
    a;
    # More efficient
    select(n -> isprime(n-2) and isprime(n), [seq(30*k+19, k=0..220)]); # Muniru A Asiru, Jan 30 2018
  • Mathematica
    Select[Prime[Range[1000]], PrimeQ[# - 2] && Mod[#, 30] == 19 &] (* Vincenzo Librandi, Feb 13 2017 *)
  • PARI
    list(lim)=my(v=List(), p=2); forprime(q=3, lim, if(q-p==2 && q%30==19, listput(v, q)); p=q); Vec(v) \\ Charles R Greathouse IV, Feb 14 2017
    

A138905 a(n) is n-th prime == -1 (mod 6n).

Original entry on oeis.org

5, 23, 71, 167, 179, 431, 461, 863, 863, 839, 1583, 1511, 1949, 2099, 2339, 4127, 4283, 4751, 4673, 4919, 5669, 6599, 8693, 10079, 7349, 10607, 12149, 11087, 12527, 11159, 15809, 19583, 16829, 19583, 13859, 25703, 24197, 25307, 23633, 21839, 34439
Offset: 1

Views

Author

Zak Seidov, Apr 03 2008

Keywords

Examples

			a(1) = 1st term in A007528 (Primes of form 6n-1)
a(2) = 2nd term in A068231 (Primes congruent to 11 (mod 12))
a(3) = 3rd term in A061242 (Primes of form 18n-1)
a(4) = 4th term in A134517 (Primes of form 24n-1)
a(5) = 5th term in A132236 (Primes congruent to 29 (mod 30))
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Module[{p=1,cnt=0},Until[cnt==n,If[Mod[Prime[p],6n]==6n-1,cnt++];p++];Prime[p-1]];Array[a,41] (* James C. McMahon, Jun 22 2025 *)

A140378 Lengths of runs of consecutive primes and nonprimes in A007775.

Original entry on oeis.org

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

Views

Author

Juri-Stepan Gerasimov, Jun 13 2008

Keywords

Comments

Primes can be classified according to their remainder modulo 30: remainder 1 (A136066), 7 (A132231), 11 (A132232), 13 (A132233), 17 (A039949), 19 (A132234), 23 (A132235), or 29 (A132236). In the sequence A007775 of all numbers (prime or nonprime) in any of these remainder classes, we look for runs of numbers that are successively prime or nonprime and place the lengths of these runs in this sequence.

Examples

			Groups of runs in A007775 are (1), (7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47), (49), (53, 59, 61, 67, 71, 73), (77), (79, 83,...), which is 1 nonprime followed by 12 primes followed by 1 nonprime followed by 6 primes etc.
		

Crossrefs

Programs

  • Maple
    A007775 := proc(n) option remember ; local a; if n = 1 then 1; else for a from A007775(n-1)+1 do if a mod 2 <>0 and a mod 3 <>0 and a mod 5 <> 0 then RETURN(a) ; fi ; od: fi ; end: A := proc() local al,isp,n; al := 0: isp := false ; n := 1: while n< 300 do a := A007775(n) ; if isprime(a) <> isp then printf("%d,",al) ; al := 1; isp := not isp ; else al := al+1 ; fi ; n := n+1: od: end: A() ; # R. J. Mathar, Jun 16 2008

Extensions

Edited by R. J. Mathar, Jun 16 2008

A140387 Binary encoding of the location of primes in integer sets r+30*n with remainder r=1,7,11,..,29.

Original entry on oeis.org

1, 32, 16, 129, 73, 36, 194, 6, 42, 176, 225, 12, 21, 89, 18, 97, 25, 243, 44, 44, 196, 34, 166, 90, 149, 152, 109, 66, 135, 225, 89, 169, 169, 28, 82, 210, 33, 213, 179, 170, 38, 92, 15, 96, 252, 171, 94, 7, 209, 2, 187, 22, 153, 9, 236, 197, 71, 179, 212, 197, 186
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 10 2008

Keywords

Comments

Classify all integers 30n+r with r= 1, 7, 11, 13, 17, 19, 23 or 29 as nonprime or prime and assign bit positions 0=LSB, 1, 2, 3, .., 7=MSB to the 8 remainders in the same order. Raise the bit if 30n+r is nonprime, erase it if 30n+r is prime.
The sequence interprets this as a number in base 2 and shows the decimal representation.

Examples

			For n=1, the 8 numbers 31 (r=1), 37 (r=7), 41 (r=11), 43 (r=17), 47 (r=17), 49 (r=19), 53 (r=23) and 59 (r=29) are prime, prime, prime, prime, prime, nonprime, prime, prime, prime, which is rendered into the binary 000100000 = 2^5=32=a(1).
		

Crossrefs

Cf. A105052 (analog in base 10, prime = bit 1, remainder 1 = MSB), A140891 (analog in base 14, prime = bit 0, remainder 1 = LSB).

Extensions

Edited by R. J. Mathar, Jun 17 2008

A215850 Primes p such that 2*p + 1 divides Lucas(p).

Original entry on oeis.org

5, 29, 89, 179, 239, 359, 419, 509, 659, 719, 809, 1019, 1049, 1229, 1289, 1409, 1439, 1499, 1559, 1889, 2039, 2069, 2129, 2339, 2399, 2459, 2549, 2699, 2819, 2939, 2969, 3299, 3329, 3359, 3389, 3449, 3539, 3779, 4019, 4349, 4409, 4919, 5039, 5279, 5399, 5639
Offset: 1

Views

Author

Arkadiusz Wesolowski, Aug 24 2012

Keywords

Comments

An equivalent definition of this sequence: 5 together with primes p such that p == -1 (mod 30) and 2*p + 1 is also prime.
Sequence without the initial 5 is the intersection of A005384 and A132236.
These numbers do not occur in A137715.
From Arkadiusz Wesolowski, Aug 25 2012: (Start)
The sequence contains numbers like 1409 which are in A053027.
a(n) is in A002515 if and only if a(n) is congruent to -1 mod 60. (End)

Examples

			29 is in the sequence since it is prime and 59 is a factor of Lucas(29) = 1149851.
		

Crossrefs

Supersequence of A230809. Cf. A000032, A132236.

Programs

  • Magma
    [5] cat [n: n in [29..5639 by 30] | IsPrime(n) and IsPrime(2*n+1)];
    
  • Mathematica
    Select[Prime@Range[740], Divisible[LucasL[#], 2*# + 1] &]
    Prepend[Select[Range[29, 5639, 30], PrimeQ[#] && PrimeQ[2*# + 1] &], 5]
  • PARI
    is_A215850(n)=isprime(n)&!real((Mod(2,2*n+1)+quadgen(5))*quadgen(5)^n) \\ - M. F. Hasler, Aug 25 2012

A229947 Primes congruent to {1, 11, 13, 17, 19, 29} mod 30.

Original entry on oeis.org

11, 13, 17, 19, 29, 31, 41, 43, 47, 59, 61, 71, 73, 79, 89, 101, 103, 107, 109, 131, 137, 139, 149, 151, 163, 167, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 239, 241, 251, 257, 269, 271, 281, 283, 311, 313, 317, 331, 347, 349, 359, 373, 379, 389
Offset: 1

Views

Author

Omar E. Pol, Oct 27 2013

Keywords

Comments

For twin primes congruent to {1, 11, 13, 17, 19, 29} mod 30 see A132247.
Complement of A132237, primes congruent to 7 or 23 (mod 30), in the set of primes > 5. - M. F. Hasler, Nov 02 2013

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(500) | p mod 30 in {1,11,13,17, 19,29} ]; // Vincenzo Librandi, Apr 05 2015
  • Mathematica
    Select[Flatten[Table[30n + {1, 11, 13, 17, 19, 29}, {n, 0, 11}]], PrimeQ] (* Alonso del Arte, Nov 01 2013 *)
    Select[Prime@Range[100], MemberQ[{1, 11, 13, 17, 19, 29}, Mod[#, 30]] &] (* Vincenzo Librandi, Apr 05 2015 *)
  • PARI
    is(n)=isprime(n) && setsearch([1,11,13,17,19,29], n%30) \\ Charles R Greathouse IV, Mar 08 2015
    

Formula

a(n) ~ 4/3 n log n. - Charles R Greathouse IV, Mar 08 2015

A263769 Smallest prime q such that q == -1 (mod prime(n)-1).

Original entry on oeis.org

2, 3, 3, 5, 19, 11, 31, 17, 43, 83, 29, 71, 79, 41, 137, 103, 173, 59, 131, 139, 71, 233, 163, 263, 191, 199, 101, 211, 107, 223, 251, 389, 271, 137, 443, 149, 311, 647, 331, 859, 1423, 179, 379, 191, 587, 197, 419, 443
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 25 2015

Keywords

Comments

a(n): A000040(1), A065091(1), A002145(1), A007528(1), A030433(1), A068231(1), A127576(1), A061242(1), A141857(1), A141976(1), A132236(1), A142111(1), A142198(1), A141898(1), A141926(1), A142531(1), A142004(1), A142799(1), A142068(1), A142099(1), ...
Smallest prime q such that (prime(n)^2 + q*prime(n))/(prime(n) + 1) is an integer.

Examples

			a(4) = 5 because 5 == -1 (mod prime(4)-1) and is prime.
		

Crossrefs

Programs

  • Maple
    for n from 1 to 100 do
      k:= ithprime(n)-1;
      q:= 2;
      while (1 + q) mod k <> 0 do
        q:= nextprime(q)
      od;
      A[n]:= q;
    od:
    seq(A[i],i=1..1000); # Robert Israel, Oct 26 2015
  • Mathematica
    Table[q = 2; z = Prime@ n - 1; While[Mod[q, z] != z - 1, q = NextPrime@ q]; q, {n, 59}] (* Michael De Vlieger, Oct 26 2015 *)

Extensions

Corrected and edited by Robert Israel, Oct 26 2015,

A293425 Primes of the form 2^a * 3^b * 5^c - 1 for positive a, b, c.

Original entry on oeis.org

29, 59, 89, 149, 179, 239, 269, 359, 449, 479, 599, 719, 809, 1439, 1499, 1619, 2399, 2699, 2879, 2999, 4049, 4799, 5399, 7499, 8999, 9719, 10799, 11519, 12149, 12959, 13499, 15359, 18749, 20249, 21599, 23039, 25919, 33749, 35999, 40499, 51839, 56249, 59999, 65609, 67499, 69119, 71999
Offset: 1

Views

Author

Muniru A Asiru, Oct 09 2017

Keywords

Comments

a(n) is congruent to 29 (mod 30).

Examples

			a(1) = 29 = 2^1 * 3^1 * 5^1 - 1.
a(2) = 59 = 2^2 * 3^1 * 5^1 - 1.
a(3) = 89 = 2^1 * 3^2 * 5^1 - 1.
a(4) = 149 = 2^1 * 3^1 * 5^2 - 1.
a(5) = 179 = 2^2 * 3^2 * 5^1 - 1.
list of (a, b, c): (1, 1, 1), (2, 1, 1), (1, 2, 1), (1, 1, 2), (2, 2, 1), (4, 1, 1), (1, 3, 1), (3, 2, 1), (1, 2, 2), (5, 1, 1), (3, 1, 2), (4, 2, 1), (1, 4, 1), (5, 2, 1), (2, 1, 3), (2, 4, 1), ...
		

Crossrefs

Programs

  • GAP
    K:=10^5+1;; # to get all terms <= K.
    A:=Filtered([1..K],IsPrime);;
    A293425:=List(Positions(List(A,i->Elements(Factors(i+1))),[2,3,5]),i->A[i]);
    
  • Maple
    N:= 10^6: # to get all terms < N
    R:= {}:
    for c from 1 to floor(log[5]((N+1)/6)) do
    for b from 1 to floor(log[3]((N+1)/2/5^c)) do
         R:= R union select(isprime, {seq(2^a*3^b*5^c-1,
                 a=1..ilog2((N+1)/(3^b*5^c)))})
    od od:
    sort(convert(R,list)); # Robert Israel, Oct 15 2017
  • Mathematica
    With[{n = 10^5}, Sort@ Select[Flatten@ Table[2^a*3^b*5^c - 1, {a, Log2@ n}, {b, Log[3, n/(2^a)]}, {c, Log[5, n/(2^a*3^b)]}], PrimeQ]] (* Michael De Vlieger, Oct 11 2017 *)
  • PARI
    lista(nn) = {forprime(p=2,nn, f = factor(p+1); if ((vecmax(f[,1]) <= 5) && (#f~==3), print1(p, ", ")););} \\ Michel Marcus, Oct 09 2017
    
  • Python
    from itertools import count, islice
    from sympy import integer_log, isprime
    def A293425_gen(): # generator of terms
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x):
            c = x
            for i in range(1,integer_log(x,5)[0]+1):
                for j in range(1,integer_log(m:=x//5**i,3)[0]+1):
                    c -= (m//3**j).bit_length()-1
            return c
        yield from filter(isprime,(bisection(lambda k:n+f(k),n,n)-1 for n in count(1)))
    A293425_list = list(islice(A293425_gen(),30)) # Chai Wah Wu, Mar 31 2025

A141866 Primes of the form 2*3*5*7*k+89, k >= 0.

Original entry on oeis.org

89, 509, 719, 929, 1559, 1979, 2399, 2609, 2819, 3449, 3659, 4079, 4289, 4919, 6389, 6599, 7019, 7229, 7649, 8069, 8699, 9539, 9749, 10169, 10589, 10799, 12269, 12479, 12689, 12899, 13109, 14159, 14369, 15629, 16889, 17099, 17519, 17729, 17939, 18149
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Sep 15 2008

Keywords

Comments

Subsequence of A132236. - R. J. Mathar, Sep 19 2008

Crossrefs

Programs

  • Mathematica
    Select[210 Range[0, 200] + 89, PrimeQ] (* Harvey P. Dale, Nov 11 2013 *)

Extensions

Definition edited, 7019 inserted and extended by R. J. Mathar, Sep 19 2008
Previous Showing 11-20 of 21 results. Next