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

A045533 Concatenate the n-th and (n+1)st prime.

Original entry on oeis.org

23, 35, 57, 711, 1113, 1317, 1719, 1923, 2329, 2931, 3137, 3741, 4143, 4347, 4753, 5359, 5961, 6167, 6771, 7173, 7379, 7983, 8389, 8997, 97101, 101103, 103107, 107109, 109113, 113127, 127131, 131137
Offset: 1

Views

Author

N. J. A. Sloane, Dec 11 1999

Keywords

Crossrefs

Cf. A077800, A095958 (subsequence), A030461 (primes).

Programs

  • Haskell
    a045533 n = a045533_list !! (n-1)
    a045533_list = f $ map show a000040_list :: [Integer] where
       f (t:ts@(t':_)) = read (t ++ t') : f ts
    -- Reinhard Zumkeller, Apr 20 2012
    
  • Magma
    [Seqint(Intseq(NthPrime(n+1)) cat Intseq(NthPrime(n))): n in [1..50 ] ]; // Marius A. Burtea, Mar 21 2019
  • Mathematica
    #[[1]]*10^IntegerLength[#[[2]]]+#[[2]]&/@Partition[Prime[Range[40]],2,1] (* Harvey P. Dale, Jun 06 2015 *)
  • PARI
    a(n) = eval(concat(Str(prime(n)), Str(prime(n+1)))); \\ Michel Marcus, May 11 2014
    

Formula

a(n) = prime(n)*(10^floor(log_10(prime(n+1)))+1) + prime(n+1). - Conner L. Delahanty, May 10 2014

Extensions

Offset changed to 1, in agreement with (almost?) all references to this sequence, by M. F. Hasler

A256753 Numbers n such that n is both the average of some twin prime pair p, q (q = p+2) (i.e., n = p+1 = q-1) and is also the average of the prime before p and the prime after q.

Original entry on oeis.org

12, 18, 30, 42, 60, 102, 108, 228, 270, 312, 420, 462, 570, 600, 858, 882, 1050, 1092, 1230, 1290, 1302, 1428, 1488, 1620, 1872, 1998, 2028, 2340, 2550, 2688, 2730, 3390, 3462, 3540, 3582, 4020, 4230, 4242, 4272, 4338, 4518, 4650, 4788
Offset: 1

Views

Author

Karl V. Keller, Jr., Apr 09 2015

Keywords

Comments

This sequence is a subsequence of A014574 (average of twin prime pairs).

Examples

			For n=12: 7, 11, 13, 17 are four consecutive primes with 13 = 11 + 2 and (7+17)/2 = 12.
For n=18: 13, 17, 19, 23 are four consecutive primes with 19 = 17 + 2 and (13+23)/2 = 18.
		

Crossrefs

Cf. A077800 (twin primes), A014574.

Programs

  • Mathematica
    Select[Prime[Range[10^3]],PrimeQ[#+2]&&2*#+2==NextPrime[#,-1]+NextPrime[#,2]&]+1 (* Ivan N. Ianakiev, Apr 23 2015 *)
    Select[Partition[Prime[Range[700]],4,1],#[[3]]-#[[2]]==2&&(#[[1]]+#[[4]])/2 == (#[[2]]+#[[3]])/2&][[All,2]]+1 (* Harvey P. Dale, May 06 2022 *)
  • PARI
    lista(nn) = {forprime(p=3, nn, if (isprime(p+2), if (precprime(p-1)+nextprime(p+3) == 2*(p+1), print1(p+1, ", "));););} \\ Michel Marcus, Apr 12 2015
  • Python
    from sympy import isprime,prevprime,nextprime
    for i in range(5,12001,2):
      if isprime(i) and isprime(i+2):
        if prevprime(i)+nextprime(i,2) == 2*(i+1): print(i+1,end=', ')
    

A138389 Binomial primes: positive integers n such that every i not coprime to n and not exceeding n/2 does not divide binomial(n-i-1,i-1).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 17, 19, 20, 21, 23, 24, 25, 29, 31, 33, 35, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199
Offset: 1

Views

Author

Vladimir Shevelev, May 08 2008

Keywords

Comments

Note that every i not exceeding n/2 for which (n,i)=1 divides binomial(n-i-1,i-1). For n>33, a(n) is either prime or square of a prime or a product of twin primes. For a proof, see link of V. Shevelev.
Numbers n such that A178105(n) = 0. - Michel Marcus, Feb 07 2016

Crossrefs

Programs

  • Mathematica
    Select[Range@ 200, Function[n, NoneTrue[Select[Range@ Floor[n/2], ! CoprimeQ[#, n] &], Divisible[Binomial[n - # - 1, # - 1], #] &]]] (* Michael De Vlieger, Feb 07 2016, Version 10 *)
  • PARI
    isok(n) = {my(md = -1); for (d=2, n\2, if (((binomial(n-d-1,d-1) % d) == 0) && (gcd(n, d) > 1), if (md == -1, md = d, md = min(d, md)));); (md == -1);} \\ Michel Marcus, Feb 07 2016

A175612 Pairs of cousin semiprimes (m, m+4).

Original entry on oeis.org

6, 10, 10, 14, 21, 25, 22, 26, 34, 38, 35, 39, 51, 55, 58, 62, 65, 69, 82, 86, 87, 91, 91, 95, 111, 115, 115, 119, 118, 122, 119, 123, 129, 133, 141, 145, 142, 146, 155, 159, 183, 187, 201, 205, 202, 206, 205, 209, 209, 213, 213, 217, 214, 218, 215, 219, 217, 221
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 24 2010

Keywords

Crossrefs

Cf. A077800.

Programs

Extensions

Edited and terms checked by D. S. McNeil, Nov 26 2010

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 *)

A182481 a(n) is the least k such that 6*k*n-1 and 6*k*n+1 are twin primes, and a(n)=0, if such k does not exist.

Original entry on oeis.org

1, 1, 1, 3, 1, 2, 1, 4, 2, 1, 3, 1, 4, 5, 2, 2, 1, 1, 2, 2, 7, 5, 1, 3, 1, 2, 5, 16, 2, 1, 7, 1, 1, 5, 2, 2, 9, 1, 8, 1, 5, 9, 4, 5, 1, 3, 1, 4, 3, 2, 7, 1, 20, 5, 2, 8, 14, 1, 3, 21, 43, 4, 6, 3, 5, 8, 4, 9, 2, 1, 3, 1, 14, 15, 9, 30, 1, 4, 22, 7, 20, 21, 9
Offset: 1

Views

Author

Vladimir Shevelev, May 01 2012

Keywords

Comments

Conjecture: a(n)>0; equivalently, for every n, the arithmetic progression {6*k*n-1} contains infinitely many lessers of twin primes (A001359).

Crossrefs

Programs

  • Mathematica
    Table[k = 0; While[! (PrimeQ[6*k*n - 1] && PrimeQ[6*k*n + 1]), k++]; k, {n, 100}] (* T. D. Noe, May 02 2012 *)
  • PARI
    a(n)=my(k);n*=6;until(isprime(n*k++-1)&&isprime(n*k+1),);k \\ Charles R Greathouse IV, May 01 2012

A232880 Twin primes with digital root 2 or 4.

Original entry on oeis.org

11, 13, 29, 31, 101, 103, 137, 139, 191, 193, 227, 229, 281, 283, 461, 463, 569, 571, 641, 643, 659, 661, 821, 823, 857, 859, 1019, 1021, 1091, 1093, 1289, 1291, 1451, 1453, 1487, 1489, 1667, 1669, 1721, 1723, 2027, 2029, 2081, 2083, 2549, 2551, 2657, 2659
Offset: 1

Views

Author

Gary Croft, Dec 01 2013

Keywords

Comments

All twin primes except (3, 5) have one of 3 digital root pairings: {2, 4}, {5, 7} or {8, 1}: see A232881 for {5, 7} and A232882 for {8, 1}.
Or primes congruent to 11 or 13 mod 18 such that the number congruent to 13 or 11 mod 18 is also prime. - Alonso del Arte, Dec 02 2013

Examples

			11 and 13 are in the sequence because they form a twin prime pair in which 11 has a digital root of 2 and 13 has one of 4.
Likewise 29 and 31 form a twin prime pair with 29 has 2 for a digital root and 31 has 4.
		

Crossrefs

Programs

  • Mathematica
    partialList = Select[18Range[100] - 7, PrimeQ[#] && PrimeQ[# + 2] &]; A232880 = Sort[Flatten[Join[partialList, partialList + 2]]] (* Alonso del Arte, Dec 02 2013 *)
    dRoot[n_] := 1 + Mod[n - 1, 9]; tw = Select[Prime[Range[1000]], PrimeQ[# + 2] &]; Select[Union[tw, tw + 2], MemberQ[{2, 4}, dRoot[#]] &] (* T. D. Noe, Dec 10 2013 *)
  • PARI
    p=5; forprime(q=7,1e4,if(q-p==2 && q%9==4, print1(p", "q", ")); p=q) \\ Charles R Greathouse IV, Aug 26 2014

A232881 Twin primes with digital root 5 or 7.

Original entry on oeis.org

5, 41, 59, 149, 239, 311, 347, 419, 599, 617, 1031, 1049, 1229, 1301, 1319, 1427, 1481, 1607, 1697, 1787, 1877, 1931, 1949, 2111, 2129, 2237, 2309, 2381, 2687, 3119, 3299, 3371, 3389, 3461, 3767, 3821, 3929, 4001, 4019, 4091, 4127, 4217, 4271, 4649, 4721
Offset: 1

Views

Author

Gary Croft, Dec 01 2013

Keywords

Comments

All twin primes except (3,5) have one of 3 digital root pairings: {2,4}, {5,7} or {8,1}: see A232880 for {2,4} and A232882 for {8,1}.

Examples

			41 and 43 are in the sequence because they form a twin prime pair in which 41 has a digital root of 5 and 43 has a digital root of 7. Likewise 59 and 61 form a twin prime pair where 59 has a digital root of 5 and 61 has one of 7.
		

Crossrefs

Programs

  • Mathematica
    dRoot[n_] := 1 + Mod[n - 1, 9]; tw = Select[Prime[Range[1000]], PrimeQ[# + 2] &]; Select[Union[tw, tw + 2], MemberQ[{5, 7}, dRoot[#]] &] (* T. D. Noe, Dec 10 2013 *)

A232882 Twin primes with digital root 8 or 1.

Original entry on oeis.org

17, 19, 71, 73, 107, 109, 179, 181, 197, 199, 269, 271, 431, 433, 521, 523, 809, 811, 827, 829, 881, 883, 1061, 1063, 1151, 1153, 1277, 1279, 1619, 1621, 1871, 1873, 1997, 1999, 2087, 2089, 2141, 2143, 2267, 2269, 2339, 2341, 2591, 2593, 2789, 2791, 2969
Offset: 1

Views

Author

Gary Croft, Dec 01 2013

Keywords

Comments

All twin primes except (3,5) have one of 3 digital root pairings: {2,4}, {5,7} or {8,1}: see A232880 for {2,4} and A232881 for {5,7}.
Twin primes of the form 9n +- 1. [Bruno Berselli, Aug 26 2014]

Examples

			17 and 19 are in the sequence because they form a twin prime pair in which 17 has a digital root of 8 and 19 has one of 1. Likewise 71 and 73 form a twin prime pair where 71 has 8 for a digital root and 73 has 1.
		

Crossrefs

Programs

  • Mathematica
    dRoot[n_] := 1 + Mod[n - 1, 9]; tw = Select[Prime[Range[1000]], PrimeQ[# + 2] &]; Select[Union[tw, tw + 2], MemberQ[{1, 8}, dRoot[#]] &] (* T. D. Noe, Dec 10 2013 *)

A074040 Product of first n twin prime pair products.

Original entry on oeis.org

15, 525, 75075, 24249225, 21800053275, 38433493923825, 138322144631846175, 716923675626858725025, 7458156997546211316435075, 86984485062381462583582279725, 1656445549042930191979157352803175
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 13 2002

Keywords

Examples

			The first two twin prime pairs are (3,5) and (5,7), their products: 15 and 35, therefore a(2)=15*35=525.
		

Crossrefs

Programs

  • Mathematica
    a = {4, 6, 12, 18, 30, 42, 60, 72, 102, 108, 138, 150} (* A014574 *); Table[ Product[a[[k]]^2 - 1, {k, 1, n}], {n, 1, 12}]
    Rest[FoldList[Times,1,Times@@@Select[Partition[Prime[Range[50]],2,1],#[[2]]-#[[1]]==2&]]] (* Harvey P. Dale, Jan 19 2015 *)
    step[{list_, q_}] := Module[{p=NextPrime[q]}, {Join[list, If[PrimeQ[p+2], {{p,p+2}}, {}]], p}]
    pairList[n_] := First[NestWhile[step, {{{3, 5}}, 3}, Length[First[step[#]]]<=n&]]
    a037074[n_] := Map[Apply[Times, #]&, pairList[n]]
    a074040[n_] := Rest[FoldList[Times, 1, a037074[n]]]
    a074040[11] (* Hartmut F. W. Hoft, Apr 27 2021 *)

Formula

a(1) = A037074(1) and a(n) = a(n-1)*A037074(n) for n>1.
a(n) = A079164(2*n).

Extensions

Edited by Robert G. Wilson v, Aug 17 2002
Corrections in Comment and Example, and added references. Hartmut F. W. Hoft, Apr 27 2021
Previous Showing 11-20 of 108 results. Next