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 81-90 of 478 results. Next

A236566 Number of ordered ways to write 2*n = p + q with p, q and prime(p + 2) + 2 all prime.

Original entry on oeis.org

0, 0, 1, 2, 2, 1, 2, 3, 2, 1, 3, 2, 1, 2, 1, 1, 4, 2, 1, 2, 3, 3, 4, 5, 4, 4, 5, 2, 4, 4, 3, 5, 3, 1, 5, 6, 4, 3, 6, 2, 4, 8, 4, 3, 6, 3, 4, 3, 3, 4, 5, 4, 3, 6, 6, 5, 8, 3, 4, 7, 2, 3, 5, 2, 4, 4, 3, 3, 6, 5, 4, 6, 3, 4, 7, 3, 5, 4, 2, 4, 4, 1, 2, 7, 4, 2, 5, 3, 5, 6, 4, 4, 4, 2, 3, 4, 4, 4, 5, 2
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 28 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 2.
(ii) If n > 30, then 2*n + 1 can be written as 2*p + q with p, q and prime(p + 2) + 2 all prime.
Part (i) implies both the Goldbach conjecture and the twin prime conjecture. If all primes p with prime(p + 2) + 2 are smaller than an even number N > 2, then for any such a prime p the number N! + N - p is in the interval (N!, N! + N) and hence not prime.
Similarly, part (ii) implies both Lemoine's conjecture (cf. A046927) and the twin prime conjecture.
We have verified part (i) of the conjecture for n up to 2*10^8.

Examples

			a(10) = 1 since 2*10 = 3 + 17 with 3, 17 and prime(3 + 2) + 2 = 11 + 2 = 13 all prime.
a(589) = 1 since 2*589 = 577 + 601 with 577, 601 and prime(577 + 2) + 2 = 4229 + 2 = 4231 all prime.
		

Crossrefs

Programs

  • Mathematica
    p[m_]:=PrimeQ[Prime[m+2]+2]
    a[n_]:=Sum[If[p[Prime[k]]&&PrimeQ[2n-Prime[k]],1,0],{k,1,PrimePi[2n-1]}]
    Table[a[n],{n,1,100}]

A242489 Smallest even k such that lpf(k-1) = prime(n), while lpf(k-3) > prime(n), where lpf=least prime factor (A020639).

Original entry on oeis.org

10, 26, 50, 254, 170, 392, 362, 944, 842, 1892, 1370, 2420, 1850, 2210, 3764, 6314, 3722, 4892, 5042, 7082, 8612, 9380, 7922, 12320, 11414, 10610, 11450, 13844, 18872, 16130, 17162, 20414, 19322, 26672, 24614, 25592, 29504, 37910, 29930, 44930, 36020, 36482
Offset: 2

Views

Author

Vladimir Shevelev, May 16 2014

Keywords

Comments

This sequence is connected with a sufficient condition for the infinitude of twin primes.
Almost all numbers of the form a(n)-3 are primes. For composite numbers of such a form, see A242716.
Primes p for which a(p) = p^2+1 form sequence A062326 for p >= 3. - Vladimir Shevelev, May 21 2014

Examples

			Let n=2, prime(2)=3. Then lpf(10-1)=3, but lpf(10-3)=7>3.
Since k=10 is the smallest such k, then a(2)=10.
		

Crossrefs

Programs

  • Mathematica
    lpf[n_]:=lpf[n]=First[Select[Divisors[n],PrimeQ[#]&]];
    Table[test=Prime[n];NestWhile[#+2&,test^2+1,!((lpf[#-1]==test)&&(lpf[#-3]>test))&],{n,2,60}] (* Peter J. C. Moses, May 21 2014 *)
  • PARI
    a(n) = {k = 6; p = prime(n); while ((factor(k-1)[1, 1] != p) || (factor(k-3)[1, 1] <= p), k+= 2); k;} \\ Michel Marcus, May 16 2014

Formula

a(n) >= prime(n)^2+1. - Vladimir Shevelev, May 21 2014

Extensions

More terms from Michel Marcus, May 16 2014

A062301 Number of ways writing n-th prime as a sum of two primes.

Original entry on oeis.org

0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Labos Elemer, Jul 05 2001

Keywords

Comments

a(n) = 1 if and only if n is in A006512. - Robert Israel, Apr 04 2018

Crossrefs

Programs

  • GAP
    P:=Filtered([1..1000],IsPrime);; a:=List(List(List(P, i -> Partitions(i,2)), k -> Filtered(k, i -> IsPrime(i[1]) and IsPrime(i[2]))),Length); # Muniru A Asiru, Apr 05 2018
  • Maple
    a:= n-> `if`(isprime(ithprime(n)-2), 1, 0):
    seq(a(n), n=1..105);  # Alois P. Heinz, Oct 02 2020
  • Mathematica
    Table[Sum[(PrimePi[Prime[n] - i] - PrimePi[Prime[n] - i - 1]) (PrimePi[i] - PrimePi[i - 1]), {i, Floor[Prime[n]/2]}], {n, 100}] (* Wesley Ivan Hurt, Apr 04 2018 *)
  • PARI
    a(n) = isprime(prime(n) - 2) \\ David A. Corneth, Apr 04 2018
    

Extensions

Offset changed to 1 by David A. Corneth, Apr 04 2018

A078892 Numbers n such that phi(n) - 1 is prime, where phi is Euler's totient function (A000010).

Original entry on oeis.org

5, 7, 8, 9, 10, 12, 13, 14, 15, 16, 18, 19, 20, 21, 24, 25, 26, 27, 28, 30, 31, 33, 35, 36, 38, 39, 42, 43, 44, 45, 49, 50, 51, 52, 54, 56, 61, 62, 64, 65, 66, 68, 69, 70, 72, 73, 77, 78, 80, 81, 84, 86, 90, 91, 92, 93, 95, 96, 98, 99, 102, 103, 104, 105, 109, 111, 112, 117
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 12 2002

Keywords

Comments

For all primes p: p is in the sequence iff p is the greater member of a twin prime pair (A006512), see A078893.
Union of A006512 and A078893. - Ray Chandler, May 26 2008

Crossrefs

Programs

A081762 Primes p such that p*(p-2) divides 2^(p-1)-1.

Original entry on oeis.org

3, 5, 17, 37, 257, 457, 1297, 2557, 4357, 6481, 8009, 11953, 26321, 44101, 47521, 47881, 49681, 57241, 65537, 74449, 84421, 97813, 141157, 157081, 165601, 225457, 278497, 310591, 333433, 365941, 403901, 419711, 476737, 557041, 560737, 576721, 1011961, 1033057
Offset: 1

Views

Author

Benoit Cloitre, Apr 09 2003

Keywords

Comments

Primes p such that p-2 divides 2^(p-1) - 1. The only member in A006512 is 5. - Robert Israel, Dec 03 2014
N=647089 is the smallest composite number such that (n-1)^2-1 divides 2^(n-1)-1. - M. F. Hasler, Jul 24 2015

Programs

  • Maple
    select(p -> isprime(p) and 2 &^ (p-1) - 1  mod (p-2) = 0, [seq(2*i+1,i=1..10^6)]);  # Robert Israel, Dec 03 2014
  • Mathematica
    Select[Prime[Range[2,81000]],PowerMod[2,#-1,#(#-2)]==1&] (* Harvey P. Dale, Sep 11 2023 *)
  • PARI
    lista(nn) = {forprime(p = 3, nn, if (! ((2^(p-1)-1) % (p*(p-2))), print1(p, ", "));)} \\ Michel Marcus, Dec 02 2013
    
  • Python
    from sympy import prime
    from gmpy2 import powmod
    A081762_list = [p for p in (prime(n) for n in range(2,10**5)) if powmod(2,p-1,p*(p-2)) == 1] # Chai Wah Wu, Dec 03 2014

Extensions

More terms from Michel Marcus, Dec 02 2013

A095958 Twin prime pairs concatenated in decimal representation.

Original entry on oeis.org

35, 57, 1113, 1719, 2931, 4143, 5961, 7173, 101103, 107109, 137139, 149151, 179181, 191193, 197199, 227229, 239241, 269271, 281283, 311313, 347349, 419421, 431433, 461463, 521523, 569571, 599601, 617619, 641643, 659661
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 14 2004

Keywords

Comments

a(n) mod 3 = 0 for n>1, proof: A007953(a(n)) = 2*A007953(A001359(n)+1) and A007953(A001359(n)) mod 3 = 2 for n>1, therefore A007953(a(n)) mod 3 = 0.

Examples

			29 = A001359(5), 29 + 2 = 31 = A006512(5): a(5) = 2931.
		

Crossrefs

Cf. A077800, subsequence of A045533.

Programs

  • Haskell
    a095958 n = a095958_list !! (n-1)
    a095958_list = f $ map show a077800_list :: [Integer] where
       f (t:t':ts) = read (t ++ t') : f ts
    -- Reinhard Zumkeller, Apr 20 2012
    
  • Magma
    [Seqint( Intseq(NthPrime(n+1)) cat Intseq(NthPrime(n)) ): n in [1..150 ]| NthPrime(n+1)-NthPrime(n) eq 2 ]; // Marius A. Burtea, Mar 21 2019
  • Mathematica
    concat[{a_,b_}]:=FromDigits[Flatten[IntegerDigits/@{a,b}]]; concat/@ Select[Partition[ Prime[ Range[150]],2,1],#[[2]]-#[[1]]==2&] (* Harvey P. Dale, Apr 20 2012 *)

A167495 Records in A167494.

Original entry on oeis.org

2, 3, 5, 13, 31, 61, 139, 283, 571, 1153, 2311, 4651, 9343, 19141, 38569, 77419, 154873, 310231, 621631, 1243483, 2486971, 4974721
Offset: 1

Views

Author

Vladimir Shevelev, Nov 05 2009

Keywords

Comments

Conjecture: each term > 3 of the sequence is the greater member of a twin prime pair (A006512).
Indices of the records are 1, 2, 4, 6, 9, 10, 15, 18, 21, 25, 28, 30, 38, 72, 90, ... [R. J. Mathar, Nov 05 2009]
One can formulate a similar conjecture without verification of the primality of the terms (see Conjecture 4 in my paper). [Vladimir Shevelev, Nov 13 2009]

Crossrefs

Programs

  • Mathematica
    nxt[{n_, a_}] := {n + 1, If[EvenQ[n], a + GCD[n+1, a], a + GCD[n-1, a]]};
    A167494 = DeleteCases[Differences[Transpose[NestList[nxt, {1, 2}, 10^7]][[2]]], 1];
    Tally[A167494][[All, 1]] //. {a1___, a2_, a3___, a4_, a5___} /; a4 <= a2 :> {a1, a2, a3, a5} (* Jean-François Alcover, Oct 29 2018, using Harvey P. Dale's code for A167494 *)

Extensions

Simplified the definition to include all records; one term added by R. J. Mathar, Nov 05 2009
a(16) to a(21) from R. J. Mathar, Nov 19 2009
a(22) from Jean-François Alcover, Oct 29 2018

A173037 Numbers k such that k-4, k-2, k+2 and k+4 are prime.

Original entry on oeis.org

9, 15, 105, 195, 825, 1485, 1875, 2085, 3255, 3465, 5655, 9435, 13005, 15645, 15735, 16065, 18045, 18915, 19425, 21015, 22275, 25305, 31725, 34845, 43785, 51345, 55335, 62985, 67215, 69495, 72225, 77265, 79695, 81045, 82725, 88815, 97845
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Feb 07 2010

Keywords

Comments

Average k of the four primes in two twin prime pairs (k-4, k-2) and (k+2, k+4) which are linked by the cousin prime pair (k-2, k+2).
All terms are odd composites; except for a(1) they are multiples of 5.
Subsequence of A087679, of A087680 and of A164385.
All terms except for a(1) are multiples of 15. - Zak Seidov, May 18 2014
One of (k-1, k, k+1) is always divisible by 7. - Fred Daniel Kline, Sep 24 2015
Terms other than a(1) must be equivalent to 1 mod 2, 0 mod 3, 0 mod 5, and 0,+/-1 mod 7. Taken together, this requires terms other than a(1) to have the form 210k+/-15 or 210k+105. However, not all numbers of that form belong to this sequence. - Keith Backman, Nov 09 2023

Examples

			9 is a term because 9-4 = 5 is prime, 9-2 = 7 is prime, 9+2 = 11 is prime and 9+4 = 13 is prime.
		

Crossrefs

Programs

  • Magma
    [ p+4: p in PrimesUpTo(100000) | IsPrime(p) and IsPrime(p+2) and IsPrime(p+6) and IsPrime(p+8) ]; // Klaus Brockhaus, Feb 09 2010
    
  • Mathematica
    Select[Range[100000],AllTrue[#+{4,2,-2,-4},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 30 2015 *)
  • PARI
    is(n)=isprime(n-4) && isprime(n-2) && isprime(n+2) && isprime(n+4) \\ Charles R Greathouse IV, Sep 24 2015
    
  • Python
    from sympy import primerange
    def aupto(limit):
        p, q, r, alst = 2, 3, 5, []
        for s in primerange(7, limit+5):
            if p+2 == q and p+6 == r and p+8 == s: alst.append(p+4)
            p, q, r = q, r, s
        return alst
    print(aupto(10**5)) # Michael S. Branicky, Feb 03 2022

Formula

For n >= 2, a(n) = 15*A112540(n-1). - Michel Marcus, May 19 2014
From Jeppe Stig Nielsen, Feb 18 2020: (Start)
For n >= 2, a(n) = 30*A014561(n-1) + 15.
For n >= 2, a(n) = 10*A007811(n-1) + 5.
a(n) = A007530(n) + 4.
a(n) = A125855(n) + 5. (End)

Extensions

Edited and extended beyond a(9) by Klaus Brockhaus, Feb 09 2010

A173255 Smaller member p of a twin prime pair (p, p+2) such that the sum p+(p+2) is a fifth power: 2*(p+1) = k^5 for some integer k.

Original entry on oeis.org

4076863487, 641194278911, 16260080320511, 174339220049999, 420586798122287, 388931440807883087, 1715002302605720111, 2051821692518399999, 4617724356355049999, 5873208011345484287, 58698987193722272687, 76578949263222449999, 180701862444484649999, 562030251929933709311
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Feb 14 2010

Keywords

Comments

Since k^5 = 2*(p+1) is even, k is also even.
The lesser of twin primes p (except for 3) are congruent to -1 modulo 3 (see third comment in A001359), the greater of twin primes p+2 (except for 5) are congruent to 1 modulo 3. Therefore p+1 is a multiple of 3. Since k^5 = 2*(p+1) is a multiple of 3, k is also a multiple of 3. Hence k is divisible by 2 and by 3, i.e. a multiple of 6.
The lesser of twin primes except for 3 (A001359) are congruent to 1, 7 or 9 modulo 10; this applies also to the terms of the present sequence, a subsequence of A001359.

Examples

			p = 4076863487 and p+2 form a twin prime pair, their sum 8153726976 = 96^5 is a fifth power. Hence 4076863487 is in the sequence.
p = 641194278911 and p+2 form a twin prime pair, their sum 1282388557824 = 264^5 is a fifth power. Hence 641194278911 is in the sequence.
p = 388931440807883087 and p+2 form a twin prime pair, their sum 777862881615766176 = 3786^5 is a fifth power. Hence 388931440807883087 is in the sequence.
3786 is the smallest value of k that gives a prime when divided by 6, it corresponds to a(6): 3786 = 6*631 and 631 is prime. The next value of k that gives a prime when divided by 6 is 10326 and corresponds to a(11): 10326 = 6*1721 and 1721 is prime.
If p is a term and k^5 the corresponding fifth power, then a fifth-power multiple c^5*k^5 does not necessarily correspond to a term q. The fifth power 96^5 corresponds to a(1), but q = 2^5*96^5/2-1 = 130459631615 = 5*7607*3429989 is not prime, much less is (q, q+2) a twin prime pair.
If p is a term and k^5 the corresponding fifth power, and if k^5 is the product c^5*d^5 of two fifth powers where d is even, then d^5 does not necessarily correspond to a term q. The fifth power 3786^5 = 3^5*1262^5 corresponds to a(6), but q = 1262^5/2-1 = 1600540908674415 = 3*5*577*55171*3351883 is not prime, much less is (q, q+2) a twin prime pair.
		

Crossrefs

Programs

  • Magma
    /* gives triples  */ [ : k in [2..10500 by 2] | IsPrime(p) and IsPrime(p+2) where p is (k^5 div 2)-1 ];
  • Mathematica
    Select[Range[2, 10^5, 2]^5/2 - 1, And@@PrimeQ[# + {0, 2}] &] (* Amiram Eldar, Dec 24 2019 *)

Extensions

Edited, non-specific references and keywords base, hard removed, MAGMA program added and listed terms verified by the Associate Editors of the OEIS, Feb 26 2010
More terms from Amiram Eldar, Dec 24 2019

A181492 Primes of the form p=3*2^k+1 such that p-2 is also a prime.

Original entry on oeis.org

7, 13, 193, 786433
Offset: 1

Views

Author

M. F. Hasler, Oct 30 2010

Keywords

Comments

Sequence A181490 lists the exponents k, sequences A181491 and A181493 the corresponding lesser twin prime and their average.
a(5) > 3 * 2^3000 + 1. - Max Z. Scialabba, Dec 24 2023

Crossrefs

Programs

  • Mathematica
    Select[3 2^Range[100]+1,And@@PrimeQ[{#,#-2}]&] (* Harvey P. Dale, Jun 19 2013 *)
  • PARI
    for( k=1,999, ispseudoprime(3<
    				

Formula

A181492 = A181491 + 2 = A181493 + 1 = 3*2^A181490 + 1 = intersection of A004119 or A103204 or A181495 with A006512 or A001097.
Previous Showing 81-90 of 478 results. Next