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-4 of 4 results.

A060229 Smaller member of a twin prime pair whose mean is a multiple of A002110(3)=30.

Original entry on oeis.org

29, 59, 149, 179, 239, 269, 419, 569, 599, 659, 809, 1019, 1049, 1229, 1289, 1319, 1619, 1949, 2129, 2309, 2339, 2549, 2729, 2789, 2969, 2999, 3119, 3299, 3329, 3359, 3389, 3539, 3929, 4019, 4049, 4229, 4259, 4649, 4799, 5009, 5099, 5279, 5519, 5639
Offset: 1

Views

Author

Labos Elemer, Mar 21 2001

Keywords

Comments

Equivalently, smaller of twin prime pair with primes in different decades.
Primes p such that p and p+2 are prime factors of Fibonacci(p-1) and Fibonacci(p+1) respectively. - Michel Lagneau, Jul 13 2016
The union of this sequence and A282326 gives A132243. - Martin Renner, Feb 11 2017
The union of {3,5}, A282321, A282323 and this sequence gives A001359. - Martin Renner, Feb 11 2017
The union of {3,5,7}, A282321, A282322, A282323, A282324, this sequence and A282326 gives A001097. - Martin Renner, Feb 11 2017
Number of terms less than 10^k, k=2,3,4,...: 2, 11, 72, 407, 2697, 19507, 146516, ... - Muniru A Asiru, Jan 29 2018

Examples

			For the pair {149,151} (149 + 151)/2 = 5*30.
		

Crossrefs

Programs

  • GAP
    Filtered(List([0..200], k -> 30*k-1), 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 29 ]; // Vincenzo Librandi, Feb 13 2017
    
  • Maple
    isA060229 := proc(n)
        if modp(n+1,30) =0 and isprime(n) and isprime(n+2) then
            true;
        else
            false;
        end if;
    end proc:
    A060229 := proc(n)
        option remember;
        if n =1 then
            29;
        else
            for a from procname(n-1)+2 by 2 do
                if isA060229(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A060229(n),n=1..80) ; # R. J. Mathar, Feb 19 2017
  • Mathematica
    Select[Prime@ Range[10^3], PrimeQ[# + 2] && Mod[# + 1, 30] == 0 &] (* Michael De Vlieger, Jul 14 2016 *)
  • PARI
    isok(n) = isprime(n) && isprime(n+2) && !((n+1) % 30); \\ Michel Marcus, Dec 11 2013
    

Extensions

Minor edits by Ray Chandler, Apr 02 2009

A060231 Smaller of twin primes whose middle term is a multiple of A002110(5)=2310.

Original entry on oeis.org

2309, 9239, 11549, 25409, 34649, 43889, 55439, 78539, 92399, 110879, 117809, 133979, 152459, 168629, 180179, 224069, 226379, 230999, 244859, 251789, 267959, 270269, 284129, 297989, 300299, 309539, 314159, 316469, 330329, 376529, 390389
Offset: 1

Views

Author

Labos Elemer, Mar 21 2001

Keywords

Comments

Number of terms less than 10^k: 0, 0, 0, 0, 2, 9, 66, 422, 3255, ... - Muniru A Asiru, Jan 29 2018

Examples

			For the pair {9239,9241} (9239+9241)/2 = 4*2310.
		

Crossrefs

Programs

  • GAP
    P:=Filtered([1..10^5], IsPrime);;
    P1:=List(Filtered(Filtered(List([1..Length(P)-1], n -> [P[n],P[n+1]]),i -> i[2]-i[1] = 2), j -> (j[1]+j[2]) mod 2310 = 0), k -> k[1]); # Muniru A Asiru, Jan 29 2018
    
  • Maple
    select(n->isprime(n) and isprime(n+2), [seq(2310*k-1, k=1..10^3)]);  # Muniru A Asiru, Jan 29 2018
  • Mathematica
    Select[2310*Range[200],And@@PrimeQ[#+{1,-1}]&]-1 (* Harvey P. Dale, Aug 23 2013 *)
  • PARI
    is(n)=(n+1)%2310==0 && isprime(n+2) && isprime(n) \\ Charles R Greathouse IV, Jan 30 2018

Extensions

Minor edits by Ray Chandler, Apr 02 2009

A060232 Smaller of twin primes whose mean (average) is a multiple of A002110(6)=30030.

Original entry on oeis.org

180179, 270269, 300299, 330329, 390389, 420419, 540539, 660659, 840839, 1231229, 1261259, 1501499, 1621619, 1861859, 1921919, 1951949, 2012009, 2372369, 2762759, 2972969, 3663659, 3693689, 3723719, 3903899, 4084079
Offset: 1

Views

Author

Labos Elemer, Mar 21 2001

Keywords

Examples

			For the pair {5735729,5735731} (5735729+5735731)/2 = 191*30030.
		

Crossrefs

Programs

  • GAP
    P:=Filtered([1..10^5], IsPrime);;
    P1:=List(Filtered(Filtered(List([1..Length(P)-1], n -> [P[n],P[n+1]]),i -> i[2]-i[1]=2), j -> (j[1] + j[2]) mod 30030 = 0), k -> k[1]); # Muniru A Asiru, Jan 29 2018
  • Maple
    for n from 1 to 10^5 do if (ithprime(n+1) - ithprime(n)) = 2 and (ithprime(n+1) + ithprime(n)) mod 30030 = 0 then print(ithprime(n)); fi; od; # Muniru A Asiru, Jan 29 2018
    # More efficient:
    select(t -> isprime(t) and isprime(t+2), [seq(30030*k-1, k=1..10^3)]); # Robert Israel, Jan 29 2018
  • Mathematica
    Select[Partition[Prime[Range[300000]],2,1],#[[2]]-#[[1]]==2&&Divisible[Mean[ #],30030]&][[All,1]] (* Harvey P. Dale, Apr 23 2022 *)

Extensions

Minor edits by Ray Chandler, Apr 04 2009
Definition clarified by Harvey P. Dale, Apr 23 2022

A060255 Smaller of twin primes {p, p+2} whose average p+1 = k*q is the least multiple of the n-th primorial number q such that k*q-1 and k*q+1 are twin primes.

Original entry on oeis.org

3, 5, 29, 419, 2309, 180179, 4084079, 106696589, 892371479, 103515091679, 4412330782859, 29682952539239, 22514519501013539, 313986271960080719, 22750921955774182169, 912496437361321252439, 26918644902158976946979, 1290172194953476680815969, 1901713815361424627522739779
Offset: 1

Views

Author

Labos Elemer, Mar 22 2001

Keywords

Comments

a(349) has 1001 digits. - Michael S. Branicky, Apr 19 2025

Examples

			a(13) = -1 + (2*3*5*7*...*41)*k(13) = 304250263527210*74 and {22514519501013539, 22514519501013542} are the corresponding primes; k(13)=74 is the smallest suitable multiplier. Twin primes obtained from primorial numbers with k=1 multiplier seem to be much rarer (see A057706).
For j=1,2,3,4,5,6, a(j)=A001359(1), A059960(1), A060229(1), A060230(1), A060231(1), A060232(1) respectively.
		

Crossrefs

Programs

  • PARI
    a(n) = {my(q = prod(k=1, n, prime(k))); for(k=1, oo, if (isprime(q*k-1) && isprime(q*k+1), return(q*k-1)););} \\ Michel Marcus, Jul 10 2018
    
  • Python
    from itertools import count
    from sympy import primorial, isprime
    def a(n):
        p = primorial(n)
        return next(m-1 for m in count(p, p) if isprime(m-1) and isprime(m+1))
    print([a(n) for n in range(1, 20)]) # Michael S. Branicky, Apr 18 2025

Formula

a(n) = p = k(n)*q(n)-1, where q(n)=A002110(n) and k(n)=A060256(n) is the smallest integer whose multiplication by the n-th primorial yields p+1.

Extensions

a(2)=5 corrected by Ray Chandler, Apr 03 2009
a(18) and beyond from Michael S. Branicky, Apr 18 2025
Showing 1-4 of 4 results.